From ac288d40da3235b9382d685c9958ad167a758bcd Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Sat, 31 Jul 2021 11:42:59 -0700 Subject: added archive page and viewing --- static/archive.html | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++ static/main.html | 32 +++++++++++++-------- static/ncatalog.html | 24 +++++++++------- static/npost.html | 18 ++++++------ static/nposts.html | 5 ++-- static/posts.html | 6 ++-- static/top.html | 55 ++++++++++++++++++++++++++++++++--- 7 files changed, 179 insertions(+), 42 deletions(-) create mode 100644 static/archive.html (limited to 'static') diff --git a/static/archive.html b/static/archive.html new file mode 100644 index 0000000..2b7d69a --- /dev/null +++ b/static/archive.html @@ -0,0 +1,81 @@ +{{ define "header" }} +/{{ .Board.Name }}/ - Archive + + + + + + + + + + + +{{ if (index .Posts 0).Preview }} + + +{{ end }} + + +{{ end }} + +{{ define "top" }} +

/{{ .Board.Name }}/ - {{ .Board.PrefName }}

+

{{ .Board.Summary }}

+

Archived Posts

+{{ end }} + +{{ define "content" }} +{{ $board := .Board }} + +
+ +
+ + + + + + + + {{ range $i, $e := .Posts }} + {{ if mod $i 2 }} + + + + + + {{ else }} + + + + + + {{ end }} + {{ end }} +
No.Excerpt
{{ short $board.Actor.Outbox $e.Id }}{{ shortExcerpt $e }}[View]
{{ short $board.Actor.Outbox $e.Id }}{{ shortExcerpt $e }}[View]
+ +
+
+ +
+
+ +{{ end }} + +{{ define "script" }} + + +{{ end }} diff --git a/static/main.html b/static/main.html index 9209ed9..362b7b3 100644 --- a/static/main.html +++ b/static/main.html @@ -2,9 +2,9 @@ - + - + @@ -30,7 +30,7 @@ color: #820404 {{ end }} } - + .popup-box { {{ if .Board.Restricted }} border: 4px solid #d3caf0; @@ -47,8 +47,16 @@ {{ else }} background-color: #f9f9e0; {{ end }} - } - + } + + .box-alt { + {{ if .Board.Restricted }} + background-color: #d3caf0; + {{ else }} + background-color: #f0e2d9; + {{ end }} + } + .quote { color: #789922; } @@ -60,7 +68,7 @@ background-color: #f0e0d6; {{ end }} } - + :target > div > .post { {{ if .Board.Restricted }} background-color: #d6bad0; @@ -72,21 +80,21 @@ color: #117743; } - {{ template "header" . }} + {{ template "header" . }} @@ -96,9 +104,9 @@ {{ end }} {{ end }} {{ template "top" . }} - + {{ template "content" . }} - + {{ template "bottom" . }}
[Home][Rules][FAQ] diff --git a/static/ncatalog.html b/static/ncatalog.html index c7f5b30..8ce418a 100644 --- a/static/ncatalog.html +++ b/static/ncatalog.html @@ -19,25 +19,26 @@
+
{{ range .Posts }}
- {{ if eq $board.ModCred $board.Domain $board.Actor.Id }} + {{ if eq $board.ModCred $board.Domain $board.Actor.Id }} [Delete Post] {{ end }} {{ if .Attachment }} - {{ if eq $board.ModCred $board.Domain $board.Actor.Id }} + {{ if eq $board.ModCred $board.Domain $board.Actor.Id }} [Delete Attachment] - [Mark Sensitive] - {{ end }} + [Mark Sensitive] + {{ end }} - - + +
{{ parseAttachment . true }}
+ media.style = "display: none;" + } + {{ end }}
@@ -84,10 +85,11 @@
-
+
{{ end }} {{ define "bottom" }} {{ end }} diff --git a/static/npost.html b/static/npost.html index 419a1a9..2f0778f 100644 --- a/static/npost.html +++ b/static/npost.html @@ -15,8 +15,6 @@ {{ end }} - - {{ end }} {{ define "content" }} @@ -25,7 +23,6 @@
@@ -36,23 +33,24 @@
-{{ $replies := (index .Posts 0).Replies }} +{{ $replies := (index .Posts 0).Replies }} {{ $replies.TotalItems }} / {{ $replies.TotalImgs }} -
- [Post a Reply] + +
+{{ if eq (index .Posts 0).Type "Note" }} +[Post a Reply] +{{ end }}
+
{{ end }} {{ define "script" }} + - {{ end }} diff --git a/static/nposts.html b/static/nposts.html index 2b05b66..e70b982 100644 --- a/static/nposts.html +++ b/static/nposts.html @@ -10,15 +10,14 @@ - {{ end }} - {{ define "content" }} {{ $board := .Board }}
@@ -28,6 +27,7 @@
@@ -54,5 +54,6 @@ {{ end }} {{ define "script" }} + {{ end }} diff --git a/static/posts.html b/static/posts.html index 8ee3844..0349ebb 100644 --- a/static/posts.html +++ b/static/posts.html @@ -45,7 +45,7 @@ } {{ end }} - {{ .Name }}{{ if .AttributedTo }} {{.AttributedTo }} {{ else }} Anonymous {{ end }} {{ .TripCode }} {{ .Published }} No. {{ short $board.Actor.Outbox .Id }} {{ if ne .Type "Tombstone" }}[Report]{{ end }} + {{ .Name }}{{ if .AttributedTo }} {{.AttributedTo }} {{ else }} Anonymous {{ end }} {{ .TripCode }} {{ .Published }} No. {{ short $board.Actor.Outbox .Id }} {{ if ne .Type "Tombstone" }}[Report]{{ end }}

{{ parseContent $board.Actor $opId .Content $thread }}

{{ if .Replies }} {{ $replies := .Replies }} @@ -68,7 +68,7 @@ [Delete Attachment] [Mark Sensitive] {{ end }} - File {{ shortImg (index .Attachment 0).Name }} ({{ convertSize (index .Attachment 0).Size }}) + File {{ shortImg (index .Attachment 0).Name }} ({{ convertSize (index .Attachment 0).Size }})
@@ -97,7 +97,7 @@ } {{ end }} - {{ .Name }}{{ if .AttributedTo }} {{.AttributedTo }} {{ else }} Anonymous {{ end }} {{ .TripCode }} {{ .Published }} No. {{ short $board.Actor.Outbox .Id }} {{ if ne .Type "Tombstone" }}[Report]{{ end }} + {{ .Name }}{{ if .AttributedTo }} {{.AttributedTo }} {{ else }} Anonymous {{ end }} {{ .TripCode }} {{ .Published }} No. {{ short $board.Actor.Outbox .Id }} {{ if ne .Type "Tombstone" }}[Report]{{ end }} {{ $parentId := .Id }} {{ if .Replies.OrderedItems }} {{ range .Replies.OrderedItems }} diff --git a/static/top.html b/static/top.html index 952feb0..0081fc7 100644 --- a/static/top.html +++ b/static/top.html @@ -3,11 +3,12 @@

/{{ .Board.Name }}/ - {{ .Board.PrefName }}

{{ .Board.Summary }}

{{ $len := len .Posts }} + {{ if eq $len 0 }} {{ if .Board.InReplyTo }} - {{ else }} + {{ else }} - {{ end }} + {{ end }}

@@ -35,9 +36,55 @@
+ + {{ else }} + + {{ if eq (index .Posts 0).Type "Note" }} + {{ if .Board.InReplyTo }} + + {{ else }} + + {{ end }} + {{ $len := len .Posts }} +
+
+
+
+
+ {{ if .Board.InReplyTo }}{{ end }}
+ {{ if eq .Board.InReplyTo "" }} +
+
+ {{ end }} +
+
+ + + + + +

+ Mark attachment as sensitive

+ +
+
+
+ +
+
+
+ {{ else }} +

Archived Post

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