s1llyw0rdz/web/handler/html/index.html
2021-11-27 10:39:34 +01:00

34 lines
No EOL
1.3 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" maxlength="140" placeholder="What's new?" required style="width: 100%; box-sizing: border-box; height: 100px;" autofocus></textarea>
</div>
<input type="submit" value="Submit">
<h3>Update status with bookmarklet</h3>
<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>
<h3>Display status on your homepage</h3>
<p>todo</p>
</form>
</section>
<section>
<h2>Status stream</h2>
{{ range .statuses }}
<article class="status">
{{ template "status" . }}
{{ if eq $.logged .User }}
<nav><a href="/status-remove?id={{ .Id }}">Delete</a> <a href="/statuses/{{ .Id }}/edit">Edit</a></nav>
{{ end }}
</article>
{{ end }}
</section>
</div>
{{ end }}