From 2566e314e8351ffbceae9a2688d90a5c811d49e5 Mon Sep 17 00:00:00 2001 From: FChannel <=> Date: Fri, 22 Jan 2021 21:12:26 -0800 Subject: client to server conversion --- static/posts.html | 179 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 179 insertions(+) create mode 100644 static/posts.html (limited to 'static/posts.html') diff --git a/static/posts.html b/static/posts.html new file mode 100644 index 0000000..ebe8f4e --- /dev/null +++ b/static/posts.html @@ -0,0 +1,179 @@ +{{ define "posts" }} +{{ $board := .Board }} +{{ $len := len .Posts }} +{{ range .Posts }} +{{ $opId := .Id }} +{{ if eq $board.InReplyTo "" }} +
+{{ end }} +
+
+ {{ if eq $board.ModCred $board.Domain $board.Actor }} + [Delete Post] + {{ end }} + {{ if .Attachment }} + {{ if eq $board.ModCred $board.Domain $board.Actor }} + [Delete Attachment] + {{ end }} + File: {{ (index .Attachment 0).Name }}({{ (index .Attachment 0).Size }}) +
+ + {{ end }} + {{ .Name }}{{ if .AttributedTo }} {{.AttributedTo }} {{ else }} Anonymous {{ end }}{{ .Published }} No. {{ .Id }} {{ if ne .Type "Tombstone" }}[Report]{{ end }} +

{{.Content}}

+ {{ if .Replies }} + {{ $replies := .Replies }} + {{ if gt $replies.TotalItems 5 }} + {{ $replies.TotalItems }} replies{{ if gt $replies.TotalImgs 0}} and {{ $replies.TotalImgs }} images{{ end }}, Click here to view all. + {{ end }} + {{ range $replies.OrderedItems }} +
+
+
>>
+
+ {{ if eq $board.ModCred $board.Domain $board.Actor }} + [Delete Post] + {{ end }} + {{ if .Attachment }} + {{ if eq $board.ModCred $board.Domain $board.Actor }} + [Delete Attachment] + {{ end }} + File {{ (index .Attachment 0).Name }} ({{ (index .Attachment 0).Size }}) +
+ + {{ end }} + {{ .Name }}{{ if .AttributedTo }} {{.AttributedTo }} {{ else }} Anonymous {{ end }}{{ .Published }} No. {{ .Id }} {{ if ne .Type "Tombstone" }}[Report]{{ end }} + {{ $parentId := .Id }} + {{ if .Replies.OrderedItems }} + {{ range .Replies.OrderedItems }} + + + {{ end }} + {{ end }} +

{{.Content}}

+
+
+
+ + {{ end }} + {{ end }} +
+
+ +{{ end }} +{{ end }} -- cgit v1.2.3