diff options
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/api_keys.html | 16 | ||||
| -rw-r--r-- | templates/dns.html | 28 | ||||
| -rw-r--r-- | templates/guestbook.html | 57 |
3 files changed, 79 insertions, 22 deletions
diff --git a/templates/api_keys.html b/templates/api_keys.html index 0aa3094..cd4d274 100644 --- a/templates/api_keys.html +++ b/templates/api_keys.html @@ -1,23 +1,23 @@ {{ define "content" }} <table> <tr> - <th>Key</th> - <th>Created At</th> - <th>Revoke</th> + <th>key.</th> + <th>created at.</th> + <th>revoke.</th> </tr> {{ if (eq (len .APIKeys) 0) }} <tr> - <td colspan="5"><span class="blinky">No API Keys Found</span></td> + <td colspan="5"><span class="blinky">no api keys found</span></td> </tr> {{ end }} {{ range $key := .APIKeys }} <tr> <td>{{ $key.Key }}</td> - <td>{{ $key.CreatedAt }}</td> + <td class="time">{{ $key.CreatedAt }}</td> <td> <form method="POST" action="/keys/delete"> <input type="hidden" name="key" value="{{ $key.Key }}" /> - <input type="submit" value="Revoke" /> + <input type="submit" value="revoke." /> </form> </td> </tr> @@ -25,9 +25,9 @@ </table> <br> <form method="POST" action="/keys" class="form"> - <h2>Add An API Key</h2> + <h2>generate key.</h2> <hr> - <input type="submit" value="Generate" /> + <input type="submit" value="generate." /> {{ if .FormError }} {{ if (len .FormError.Errors) }} {{ range $error := .FormError.Errors }} diff --git a/templates/dns.html b/templates/dns.html index a794789..d16ed89 100644 --- a/templates/dns.html +++ b/templates/dns.html @@ -1,16 +1,17 @@ {{ define "content" }} <table> <tr> - <th>Type</th> - <th>Name</th> - <th>Content</th> - <th>TTL</th> - <th>Internal</th> - <th>Delete</th> + <th>type.</th> + <th>name.</th> + <th>content.</th> + <th>ttl.</th> + <th>internal.</th> + <th>created.</th> + <th>delete.</th> </tr> {{ if (eq (len .DNSRecords) 0) }} <tr> - <td colspan="6"><span class="blinky">No DNS records found</span></td> + <td colspan="7"><span class="blinky">no dns records found.</span></td> </tr> {{ end }} {{ range $record := .DNSRecords }} @@ -20,6 +21,7 @@ <td>{{ $record.Content }}</td> <td>{{ $record.TTL }}</td> <td>{{ $record.Internal }}</td> + <td class="time">{{ $record.CreatedAt }}</td> <td> <form method="POST" action="/dns/delete"> <input type="hidden" name="id" value="{{ $record.ID }}" /> @@ -31,10 +33,10 @@ </table> <br> <form method="POST" action="/dns" class="form"> - <h2>Add DNS Records</h2> + <h2>add dns records.</h2> <p>note that the name <em>must</em> be a subdomain of <em>{{ .User.Username }}</em></p> <hr> - <label for="type">Type</label> + <label for="type">type.</label> <input type="text" name="type" placeholder="CNAME" {{ if not .RecordForm }} placeholder="CNAME" @@ -42,7 +44,7 @@ value="{{ .RecordForm.Type }}" {{ end }} required /> - <label for="name">Name</label> + <label for="name">name.</label> <input type="text" name="name" {{ if not .RecordForm }} placeholder="{{ .User.Username }} || endpoint.{{ .User.Username }}..." @@ -50,7 +52,7 @@ value="{{ .RecordForm.Name }}" {{ end }} required/> - <label for="content">Content</label> + <label for="content">content.</label> <input type="text" name="content" {{ if not .RecordForm }} placeholder="{{ .User.Username }}.dev" @@ -58,7 +60,7 @@ value="{{ .RecordForm.Content }}" {{ end }} required /> - <label for="ttl">TTL</label> + <label for="ttl">ttl.</label> <input type="text" name="ttl" {{ if not .RecordForm }} placeholder="43200" @@ -67,7 +69,7 @@ {{ end }} required /> <label for="internal"> - Internal + internal. <input style='display:inline;width:auto;' type="checkbox" name="internal" {{ if .RecordForm.Internal }} checked diff --git a/templates/guestbook.html b/templates/guestbook.html index 859daaf..f304666 100644 --- a/templates/guestbook.html +++ b/templates/guestbook.html @@ -1,3 +1,58 @@ {{ define "content" }} - <h1>guestbook</h1> + +<form action="/guestbook" method="post" class="form"> + <h1>sign the guestboooook!!!!</h1> + <p>leave a message for the world to see (keep it civil plz and no spam >:3).</p> + <hr> + <label for="name">name.</label> + <input type="text" id="name" name="name" class="form-control" + {{ if not .EntryForm }} + placeholder="john doe" + {{ else }} + value="{{ .EntryForm.Name }}" + {{ end }} + required> + <label for="message">message.</label> + <textarea id="message" name="message" class="form-control" + {{ if not .EntryForm }} + placeholder="hoi!" + {{ end }} + >{{ if .EntryForm }}{{ .EntryForm.Message }}{{ end }} + </textarea> + + <div + class="h-captcha" + data-sitekey="{{ .HcaptchaArgs.SiteKey }}" + data-theme="dark" + ></div> + <br> + <button type="submit" class="btn btn-primary">sign.</button> + <br> + {{ if .FormError }} + {{ if (len .FormError.Errors) }} + {{ range $error := .FormError.Errors }} + <div class="error">{{ $error }}</div> + {{ end }} + {{ end }} + {{ end }} +</form> + +<hr> + +{{ if (eq (len .GuestbookEntries) 0) }} +<div class="blinky">no entries yet.</div> +{{ else }} + <h1>peeps that said hi.</h1> + <br> + {{ range .GuestbookEntries }} + <div class="entry"> + <div>name: <span class="entry-name">{{ .Name }}</span></div> + <div class="time">{{ .CreatedAt }}</div> + <div class="entry-message">{{ .Message }}</div> + </div> + {{ end }} +{{ end }} + +<script src="https://js.hcaptcha.com/1/api.js" async defer></script> + {{ end }} |
