summaryrefslogtreecommitdiff
path: root/views/sources.html
diff options
context:
space:
mode:
authorNicolas Sterchele <nicolas@sterchelen.net>2022-08-31 23:08:52 +0200
committerNicolas Sterchele <nicolas@sterchelen.net>2022-08-31 23:19:58 +0200
commitb9281c89737419216b710a87c31686d21adf86bc (patch)
treebc2b2c73b35ead61bee37b75aec1eee2d78c6ef4 /views/sources.html
initial commit
Thanks to Ted Unangst for its work. Originally available here https://humungus.tedunangst.com/r/inks
Diffstat (limited to 'views/sources.html')
-rwxr-xr-xviews/sources.html22
1 files changed, 22 insertions, 0 deletions
diff --git a/views/sources.html b/views/sources.html
new file mode 100755
index 0000000..9997209
--- /dev/null
+++ b/views/sources.html
@@ -0,0 +1,22 @@
+{{ template "header.html" . }}
+<main>
+{{ $csrf := .SaveCSRF }}
+<table>
+{{ range .Sources }}
+<tr class="link">
+{{ if $csrf }}
+<form action="/savesource" method="POST" class="link">
+<input type="hidden" name="CSRF" value="{{ $csrf }}">
+<input type="hidden" name="sourcename" value="{{ .Name }}" autocomplete=off>
+<td><a href="/source/{{ .Name }}">{{ .Name }}</a>
+<td><input tabindex=1 type="text" name="sourcenotes" value="{{ .Notes }}" autocomplete=off>
+<td><input tabindex=1 type="submit" name="submit" value="submit">
+</form>
+{{ else }}
+<td><a href="/source/{{ .Name }}">{{ .Name }}</a>{{ with .Info }} - {{ . }}{{ end }}
+{{ end }}
+{{ end }}
+</table>
+</main>
+</body>
+</html>