Browse Source

added templates to the repo

AETH-erial 10 months ago
parent
commit
c21debb9bc
3 changed files with 52 additions and 1 deletions
  1. 1 1
      .gitignore
  2. 43 0
      pkg/html/templates/home.html
  3. 8 0
      pkg/html/templates/ip_table.html

+ 1 - 1
.gitignore

@@ -6,7 +6,7 @@ temp_*.json
 build/**
 *.out
 
-*.html
+coverage.html
 
 sqlite.db
 *.db

+ 43 - 0
pkg/html/templates/home.html

@@ -0,0 +1,43 @@
+{{ define "home.html" }}
+<!DOCTYPE html>
+    <head>
+        <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+        <link rel="stylesheet" href="/static/bootstrap-5.0.2-dist/css/bootstrap.min.css">
+    </head>
+
+    <body style="background-color: black;">
+        <div class="container-fluid sticky-top pb-0">
+            <div class="row align-items-center justify-content-center h-100 shadow-lg p-0 mb-0 rounded">
+                <div class="col-sm-8 p-3">
+                    <div style="color: rgba(35, 207, 0, 0.87); font-size: xx-large; font-family: monospace;">
+                        <a href="/home" style="color: rgba(35, 207, 0, 0.87)">// Kyoketsu</a>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <div class="container-fluid row">
+            <div class="col"></div>
+            <div class="col-auto p-3 m-3 position-absolute top-50 start-50 translate-middle" style="max-width: 80vw;">
+                <img src="/static/img/chiralworkslogo-dark.png" style="max-height: 120vh;"/>
+            </div>
+            <div class="col"></div>
+        </div>
+        <div class="row container-fluid">
+            <div class="col border border-white text-white"><p class="font-monospace fs-3">FQDN</p></div>
+            <div class="col border border-white text-white"><p class="font-monospace fs-3">IPv4 Address</p></div>
+            <div class="col border border-white text-white"><p class="font-monospace fs-3">Ping Response?</p></div>
+            <div class="col border border-white text-white"><p class="font-monospace fs-3">Listening Ports</p></div>
+        </div>
+        {{ range . }}
+            {{ template "ip_table.html" . }}
+        {{ end }}
+
+    
+    
+        <script src="/static/htmx.min.js"></script>
+    </body>
+
+
+
+</html>
+{{ end }}

+ 8 - 0
pkg/html/templates/ip_table.html

@@ -0,0 +1,8 @@
+{{ define "ip_table.html" }}
+<div class="row container-fluid">
+    <div class="col border border-white text-white"><p class="font-monospace fs-3">{{ .Fqdn }}</p></div>
+    <div class="col border border-white text-white"><p class="font-monospace fs-3">{{ .IpAddress }}</p></div>
+    <div class="col border border-white text-white"><p class="font-monospace fs-3">{{ .PingResponse }}</p></div>
+    <div class="col border border-white text-white"><p class="font-monospace fs-3">{{ .PortString }}</p></div>
+</div>
+{{ end }}