From faae38726dd804e3246514d88f93794c23a0cdb2 Mon Sep 17 00:00:00 2001 From: knotteye Date: Fri, 2 Jul 2021 14:20:16 -0500 Subject: show only the last 3 news items on index, link to a page with all news items --- static/anews.html | 44 ++++++++++++++++++++++++++++++++++++++++++++ static/index.html | 2 +- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 static/anews.html (limited to 'static') diff --git a/static/anews.html b/static/anews.html new file mode 100644 index 0000000..6527ce5 --- /dev/null +++ b/static/anews.html @@ -0,0 +1,44 @@ +{{ define "header" }} +{{ .Title }} + + + + + + + + + + + + + + +{{ end }} + +{{ define "top" }}{{ end }} +{{ define "content" }} +
+

{{ .Title }}

+ +
+ + + {{ range $i, $e := .NewsItems }} + + + + {{ end }} +
{{unixtoreadable $e.Time}} - {{$e.Title}} + {{ if eq $i 0 }} +

{{$e.Content}}

+ {{ end }} +
+
+ +
+{{ end }} +{{ define "bottom" }}{{ end }} + +{{ define "script" }} +{{ end }} diff --git a/static/index.html b/static/index.html index 518c012..106a6b3 100644 --- a/static/index.html +++ b/static/index.html @@ -39,7 +39,7 @@
{{ .PreferredUsername }} news + {{ .PreferredUsername }} news {{ range $i, $e := .NewsItems }} -- cgit v1.2.3
-