diff options
Diffstat (limited to 'templates/dns.html')
| -rw-r--r-- | templates/dns.html | 37 |
1 files changed, 37 insertions, 0 deletions
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 }} |
