intake/web/html/home.html
2025-02-12 07:46:19 -08:00

80 lines
1.5 KiB
HTML

{{ define "title" }}Intake{{ end }}
{{ define "content" -}}
<nav>
<details open>
<summary><span class="feed-controls">Channels</span></summary>
{{ if .Channels }}
{{ range .Channels }}
<p><a href="/channel/{{ .Name }}">
{{ if .Active }}
({{ .Active }}) {{ .Name }}
{{ else }}
{{ .Name }}
{{ end }}
</a></p>
{{ end }}
{{ else }}
<p>No channels found.</p>
{{ end }}
<p><a href="/channel/">(Edit channels)</a></p>
</details>
</nav>
<nav>
<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>
</nav>
<nav>
<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>
</nav>
{{- end }}