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 From cf86acee94652ac7cd8e8f313e6abf6c9901c398 Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Sat, 3 Jul 2021 18:39:34 -0700 Subject: add some styling to news pull request --- static/anews.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'static/anews.html') diff --git a/static/anews.html b/static/anews.html index 127760a..08bfdfa 100644 --- a/static/anews.html +++ b/static/anews.html @@ -22,16 +22,16 @@

{{ .Title }}

- +
{{ range $i, $e := .NewsItems }} {{ end }} -- cgit v1.2.3
+
{{ if $.Board.ModCred }}[Delete] {{end}} - {{unixtoreadable $e.Time}} - {{$e.Title}} - {{ if eq $i 0 }} -

{{$e.Content}}

- {{ end }} + {{unixtoreadable $e.Time}} - {{$e.Title}} +

{{$e.Content}}

+