intake/web/html/home.html
2025-02-07 14:38:21 -08:00

46 lines
842 B
HTML

{{ 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>
{{- end }}