diff options
| author | Elizabeth Hunt <elizabeth@simponic.xyz> | 2024-08-17 18:29:33 -0400 |
|---|---|---|
| committer | simponic <simponic@hatecomputers.club> | 2024-08-17 18:29:33 -0400 |
| commit | b1775c4408bb00803eba321aa66ab92d6ba45580 (patch) | |
| tree | 90179edff8951b06abb91495ce21c8b1841d2d82 /templates/kennel_cats.html | |
| parent | 0b8883c236a06a14e5e6958ed47f89729b0e41aa (diff) | |
| download | hatecomputers.club-b1775c4408bb00803eba321aa66ab92d6ba45580.tar.gz hatecomputers.club-b1775c4408bb00803eba321aa66ab92d6ba45580.zip | |
kennel (#13)
Reviewed-on: https://git.hatecomputers.club/hatecomputers/hatecomputers.club/pulls/13
Co-authored-by: Elizabeth Hunt <elizabeth@simponic.xyz>
Co-committed-by: Elizabeth Hunt <elizabeth@simponic.xyz>
Diffstat (limited to 'templates/kennel_cats.html')
| -rw-r--r-- | templates/kennel_cats.html | 66 |
1 files changed, 66 insertions, 0 deletions
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 }} |
