{{ define "head" }}
<link rel="alternate" type="application/atom+xml" title="Atom feed" href="/feed.atom" />
{{ end }}

{{ define "content" }}
<div class="cols">
    <section>
        {{ if .logged }}
        <h2>Set your status</h2>
        {{ if .form.Error }}
        <p>{{ .form.Error }}</p>
        {{ end }}
        <form action="/add" method="post">
            {{ .csrfField }}
            {{ template "status_form" .status }}
        </form>
        <p>
            <a href="/about/status-updater">word count updater</a> bookmarklet<br>
            <a href="/current-status">word count widget</a> for your homepage
        </p>
        <p><img src="/users/{{ .logged }}/badge.png"/><br><textarea style="width: 100%; max-width: 500px; box-sizing: border-box;"><a href="https://sillywordz.kissing.computer/users/{{ .logged }}"><img src="https://sillywordz.kissing.computer/users/{{ .logged }}/badge.png" alt="Sillywordz Profile"/></a></textarea></p>
        {{ else }}
        <h2>Welcome!</h2>
        <p>sillywordz is a place to share progress on your current writing projects.</p>
        <p><a href="/register">Register now!</a></p>
        {{ end }}
        <p><img src="/assets/button.png"/><br><textarea style="width: 100%; max-width: 500px; box-sizing: border-box;"><a href="https://sillywordz.kissing.computer/"><img src="https://status.cafe/assets/button.png" alt="Sillywordz"/></a></textarea></p></p>
        <p><a href="/feed.atom">Subscribe via Atom</a></p>
    </section>
    <section>
        <h2>Stream of updates!</h2>
        {{ range .statuses }}
        <article class="status">
            {{ template "status" . }}
        </article>
        {{ end }}
    </section>
</div>
{{ end }}
