s1llyw0rdz/web/handler/html/index.html

29 lines
886 B
HTML
Raw Normal View History

2021-11-22 09:06:23 +00:00
{{ define "content" }}
2021-11-22 20:23:30 +00:00
<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;" autofocus></textarea>
</div>
<br>
<input type="submit" value="Submit">
</form>
</section>
<section>
<h2>Status stream</h2>
{{ range .statuses }}
<article class="status">
<div class="username"><a href="/{{ .User }}">{{ .User }}</a>, {{ .TimeAgo }}</div>
<p>{{ .Content }}</p>
</article>
{{ end }}
</section>
</div>
2021-11-22 09:06:23 +00:00
{{ end }}