diff options
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/base.html | 26 | ||||
| -rw-r--r-- | templates/dns.html | 37 |
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 }} |
