Files
Kontrollverlust/templates/feed.html
T
2026-09-03 22:20:55 +02:00

35 lines
1.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{{define "content"}}
{{with .Form}}
{{if .CanPost}}
<section id="compose">
{{/* enctype ist Pflicht, sonst schickt der Browser nur den Dateinamen
statt der Datei -- ohne JavaScript gibt es keinen zweiten Versuch. */}}
<form method="post" action="/entry/create" enctype="multipart/form-data">
<input type="hidden" name="page" value="{{.Page}}">
{{with $.Err}}<p class="msg">{{.Msg}}</p>{{end}}
<label for="content">Neuer Beitrag</label>
<textarea id="content" name="content" rows="4" maxlength="1000"
placeholder="Was gibt's Neues?">{{.Compose.Content}}</textarea>
<label for="file">Bild <span class="muted">(optional)</span></label>
<input id="file" name="file" type="file" accept="image/*">
{{if .Compose.HadFile}}
<p class="msg">Dein Bild musst du erneut auswählen – Browser können
Dateifelder aus Sicherheitsgründen nicht vorbelegen.</p>
{{end}}
<button type="submit">Eintrag erstellen</button>
</form>
</section>
{{else if .IsTOR}}
<p class="muted">Über TOR ist das Schreiben von Beiträgen derzeit nicht
möglich. Lesen, Abstimmen und Melden funktionieren.</p>
{{end}}
<section id="feed">
{{range .Entries}}{{template "entry" .}}{{else}}
<p class="muted">Noch keine Beiträge.</p>
{{end}}
</section>
{{template "pager" .}}
{{end}}
{{end}}