s1llyw0rdz/web/handler/html/index.html
2021-11-24 07:30:19 +01:00

30 lines
No EOL
1.1 KiB
HTML

{{ define "content" }}
<div class="cols">
<section>
<h2>Set your status</h2>
{{ if .form.Error }}
<p>{{ .form.Error }}</p>
{{ end }}
{{ if .flash }}
<p>{{ .flash }}</p>
{{ end }}
<form action="/status-save" method="post">
<div class="field">
<textarea name="content" placeholder="What's new?" required style="width: 100%; box-sizing: border-box; height: 100px;" autofocus></textarea>
</div>
<br>
<input type="submit" value="Submit">
<p>Drag to your bookmarks to update from anywhere: <a href="javascript:void(open('https://status.cafe/status-new','status.cafe','resizable,scrollbars,width=360,height=200'))">Set status</a></p>
</form>
</section>
<section>
<h2>Status stream</h2>
{{ range .statuses }}
<article class="status">
<div class="username"><a href="/users/{{ .User }}">{{ .User }}</a>, {{ .TimeAgo }}</div>
<p>{{ .Content }}</p>
</article>
{{ end }}
</section>
</div>
{{ end }}