hatecomputers.club/templates/guestbook.html

48 lines
1.3 KiB
HTML
Raw Normal View History

2024-03-26 18:00:05 -04:00
{{ define "content" }}
2024-03-29 18:35:04 -04:00
<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 }}
2024-03-31 13:47:54 -04:00
>{{ if .EntryForm }}{{ .EntryForm.Message }}{{ end }}</textarea>
2024-03-29 18:35:04 -04:00
<div
class="h-captcha"
data-sitekey="{{ .HcaptchaArgs.SiteKey }}"
></div>
<br>
<button type="submit" class="btn btn-primary">sign.</button>
</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>
2024-03-26 18:00:05 -04:00
{{ end }}