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 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 static/anews.html (limited to 'static/anews.html') 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 }} -- cgit v1.2.3 From fab8de7187571a4f3f8a30966057d661a858b645 Mon Sep 17 00:00:00 2001 From: knotteye Date: Fri, 2 Jul 2021 15:10:49 -0500 Subject: add deletion of news items --- static/anews.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'static/anews.html') diff --git a/static/anews.html b/static/anews.html index 6527ce5..127760a 100644 --- a/static/anews.html +++ b/static/anews.html @@ -26,7 +26,9 @@ {{ range $i, $e := .NewsItems }} - {{unixtoreadable $e.Time}} - {{$e.Title}} + + {{ if $.Board.ModCred }}[Delete] {{end}} + {{unixtoreadable $e.Time}} - {{$e.Title}} {{ if eq $i 0 }}

{{$e.Content}}

{{ end }} -- cgit v1.2.3