summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/base.html2
-rw-r--r--templates/dns.html2
-rw-r--r--templates/kennel_cats.html66
3 files changed, 69 insertions, 1 deletions
diff --git a/templates/base.html b/templates/base.html
index 036a748..7486f45 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -35,6 +35,8 @@
<span> | </span>
<a href="/keys">api keys.</a>
<span> | </span>
+ <a href="/kennel/cats">kennel.</a>
+ <span> | </span>
<a href="/profile">{{ .User.DisplayName }}.</a>
<span> | </span>
<a href="/logout">logout.</a>
diff --git a/templates/dns.html b/templates/dns.html
index 2f3f0a7..e04cbfa 100644
--- a/templates/dns.html
+++ b/templates/dns.html
@@ -37,7 +37,7 @@
<p>note that the name <em>must</em> be a subdomain of <em>{{ .User.Username }}</em></p>
<hr>
<label for="type">type.</label>
- <input type="text" name="type" placeholder="CNAME"
+ <input type="text" name="type"
{{ if not .RecordForm }}
placeholder="CNAME"
{{ else }}
diff --git a/templates/kennel_cats.html b/templates/kennel_cats.html
new file mode 100644
index 0000000..ce31738
--- /dev/null
+++ b/templates/kennel_cats.html
@@ -0,0 +1,66 @@
+{{ define "content" }}
+ <table>
+ <tr>
+ <th>name.</th>
+ <th>link.</th>
+ <th>description.</th>
+ <th>spritesheet.</th>
+ <th>created at.</th>
+ <th>remove.</th>
+ </tr>
+ {{ if (eq (len .Cats) 0) }}
+ <tr>
+ <td colspan="6"><span class="blinky">no cats found</span></td>
+ </tr>
+ {{ end }}
+ {{ range $cat := .Cats }}
+ <tr>
+ <td>{{ $cat.Name }}</td>
+ <td><a href="{{ $cat.Link }}">{{ $cat.Link }}</a></td>
+ <td>{{ $cat.Description }}</td>
+ <td><a href="{{ $cat.Spritesheet }}"><img width="100" src="{{ $cat.Spritesheet }}"></a></td>
+ <td class="time">{{ $cat.CreatedAt }}</td>
+ <td>
+ <form method="POST" action="/kennel/cats/delete">
+ <input type="hidden" name="id" value="{{ $cat.ID }}" />
+ <input type="submit" value="remove." />
+ </form>
+ </td>
+ </tr>
+ {{ end }}
+ </table>
+ <br>
+ <form method="POST" action="/kennel/cats" class="form" enctype="multipart/form-data">
+ <h2>add cat.</h2>
+ <hr>
+ <label for="name">name.</label>
+ <input type="text" name="name" id="name"
+ {{ if not .CatForm }}
+ placeholder="wallace."
+ {{ else }}
+ value="{{ .CatForm.Name }}"
+ {{ end }}
+ />
+ <label for="description">description.</label>
+ <input type="text" name="description" id="description"
+ {{ if not .CatForm }}
+ placeholder="a cat."
+ {{ else }}
+ value="{{ .CatForm.Description }}"
+ {{ end }}
+ />
+ <label for="link">link.</label>
+ <input type="text" name="link" id="link"
+ {{ if not .CatForm }}
+ placeholder="https://hatecomputers.club"
+ {{ else }}
+ value="{{ .CatForm.Link }}"
+ {{ end }}/>
+
+ <label for="spritesheet" style="margin:0">spritesheet.</label>
+ <h6>if not specified, will use <a href="/static/img/cat_spritesheets/default.gif">the default</a>. check it out for the format we expect. max 50KB.</h6>
+ <input type="file" name="spritesheet" id="spritesheet" />
+
+ <input type="submit" value="mrow." />
+ </form>
+{{ end }}