summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2024-03-27 22:55:22 -0600
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2024-03-27 22:55:22 -0600
commit75ba836d6072235fc7a71659f8630ab3c1b210ad (patch)
tree386b65ae6d7a4215c2f7b4944fc2f0922d162491 /templates
parentb2fa4fe9454cbc9c9c0e265e3e6065eaa8726e2f (diff)
downloadhatecomputers.club-75ba836d6072235fc7a71659f8630ab3c1b210ad.tar.gz
hatecomputers.club-75ba836d6072235fc7a71659f8630ab3c1b210ad.zip
add dns form
Diffstat (limited to 'templates')
-rw-r--r--templates/base.html26
-rw-r--r--templates/dns.html37
2 files changed, 52 insertions, 11 deletions
diff --git a/templates/base.html b/templates/base.html
index a60ac55..79e0d12 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -50,6 +50,21 @@
<div class="footer">
<div>
+ {{ if .User }}
+ <a href="https://git.hatecomputers.club/{{ .User.Username }}">git.</a>
+ {{ else }}
+ <a href="https://git.hatecomputers.club">git.</a>
+ {{ end }}
+
+ <span> | </span>
+ <a href="https://mail.hatecomputers.club">e-mail.</a>
+ <span> | </span>
+ <a href="https://auth.hatecomputers.club">sso.</a>
+ </div>
+
+ <br>
+
+ <div class="blinkies">
<img width='150' height='20' src='/static/img/blinkies/hatecomputers-club.gif'>
<img width='150' height='20' src='/static/img/blinkies/autism.gif'>
<img width='150' height='20' src='/static/img/blinkies/fuckcomputers.gif'>
@@ -60,17 +75,6 @@
<img width='150' height='20' src='/static/img/blinkies/eepy.gif'>
<img width='150' height='20' src='/static/img/blinkies/loveuguys.gif'>
</div>
-
- {{ if .User }}
- <a href="https://git.hatecomputers.club/{{ .User.Username }}">git.</a>
- {{ else }}
- <a href="https://git.hatecomputers.club">git.</a>
- {{ end }}
-
- <span> | </span>
- <a href="https://mail.hatecomputers.club">e-mail.</a>
- <span> | </span>
- <a href="https://auth.hatecomputers.club">sso.</a>
</div>
</div>
diff --git a/templates/dns.html b/templates/dns.html
new file mode 100644
index 0000000..0a40cab
--- /dev/null
+++ b/templates/dns.html
@@ -0,0 +1,37 @@
+{{ define "content" }}
+ <table>
+ <tr>
+ <th>Type</th>
+ <th>Name</th>
+ <th>Content</th>
+ <th>TTL</th>
+ </tr>
+ {{ if (eq (len .DNSRecords) 0) }}
+ <tr>
+ <td colspan="4"><span class="blinky">No DNS records found</span></td>
+ </tr>
+ {{ end }}
+ {{ range $record := .DNSRecords }}
+ <tr>
+ <td>{{ $record.Type }}</td>
+ <td>{{ $record.Name }}</td>
+ <td>{{ $record.Content }}</td>
+ <td>{{ $record.TTL }}</td>
+ </tr>
+ {{ end }}
+ </table>
+ <br>
+ <form method="POST" action="/dns">
+ <h2>Add DNS Records</h2>
+ <hr>
+ <label for="type">Type</label>
+ <input type="text" name="type" placeholder="CNAME" required />
+ <label for="name">Name</label>
+ <input type="text" name="name" placeholder="{{ .User.Username }}" required />
+ <label for="content">Content</label>
+ <input type="text" name="content" placeholder="{{ .User.Username }}.dev" required />
+ <label for="ttl">TTL</label>
+ <input type="text" name="ttl" placeholder="43200" required />
+ <input type="submit" value="Add" />
+ </form>
+{{ end }}