{{ define "title" }}Intake{{ end }} {{ define "content" -}} <article> <details open> <summary><span class="feed-controls">Channels</span></summary> {{ if .Channels }} {{ range .Channels }} <p><a href="/channel/{{ .Name }}"> {{ if .Active }} {{ .Name }} ({{ .Active }}) {{ else }} {{ .Name }} {{ end }} </a></p> {{ end }} {{ else }} <p>No channels found.</p> {{ end }} </details> </article> <article> <details> <summary><span class="feed-controls">Sources</span></summary> {{ if .Sources }} <table class="intake-sources"> {{ range .Sources }} <tr> <td> <form method="post" action="/source/{{ .Name }}/fetch"> <button type="submit">fetch</button> </form> </td> </td> <td><a href="/source/{{ .Name }}">{{ .Name }}</a></td> </tr> {{ end }} </table> {{ else }} <p>No sources found.</p> {{ end }} </details> </article> <article> <details open> <summary><span class="feed-controls">Add item</span></summary> <form action="/item" method="post"> <p> <input type="text" name="title" class="wide" placeholder="Title"> </p> <p> <input type="url" name="link" class="wide" placeholder="Link"> </p> <p> <textarea name="body" class="wide" placeholder="Body"></textarea> </p> <p> <label for="ttl">TTL:</label> <input type="datetime-local" name="ttl"> </p> <p> <label for="ttd">TTD:</label> <input type="datetime-local" name="ttd"> </p> <p> <label for="tts">TTS:</label> <input type="datetime-local" name="tts"> </p> <p> <input type="submit" value="Add"> </p> </form> </details> </article> {{- end }}