aboutsummaryrefslogtreecommitdiff
path: root/views/index.html
diff options
context:
space:
mode:
authorFChannel <>2022-06-04 23:31:12 -0700
committerFChannel <>2022-06-19 12:53:29 -0700
commita87235f8b978126c0ca9f9eb252f58e6de17622c (patch)
tree592002dda3ac9f4ca1514eb0f473d31fb62faa84 /views/index.html
parente3c83c1ddaea5f42b6fda66d4b86459fd1349b3b (diff)
news CRUD working
Diffstat (limited to 'views/index.html')
-rw-r--r--views/index.html3
1 files changed, 2 insertions, 1 deletions
diff --git a/views/index.html b/views/index.html
index 2bfed28..00ebfb9 100644
--- a/views/index.html
+++ b/views/index.html
@@ -28,9 +28,10 @@
{{ if .page.NewsItems }}
<div class="newsbox" style="margin-top:50px;">
<h2><a href="/news">{{ .page.PreferredUsername }} News</a></h2>
+ {{ $page := .page }}
{{ range $i, $e := .page.NewsItems }}
<div class="newsbox-news">
- <h3><a href="/news/{{.Time}}">{{unixtoreadable $e.Time}} - {{$e.Title}}</a>{{ if $.Board.ModCred }} <a href="/{{ $.Key }}/newsdelete/{{ $e.Time }}">[Delete] </a>{{end}}</h3>
+ <h3><a href="/news/{{.Time}}">{{unixtoreadable $e.Time}} - {{$e.Title}}</a>{{ if $page.Board.ModCred }} <a href="/{{ $page.Key }}/newsdelete/{{ $e.Time }}">[Delete] </a>{{end}}</h3>
<br>
<p>{{$e.Content}}</p>