From f6eecc720abaefb954fda9a26aab78bb1d706ba4 Mon Sep 17 00:00:00 2001 From: FChannel <=> Date: Wed, 3 Feb 2021 23:50:10 -0800 Subject: sorted board list --- static/posts.html | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'static/posts.html') diff --git a/static/posts.html b/static/posts.html index 6bdc7b5..7878a1c 100644 --- a/static/posts.html +++ b/static/posts.html @@ -8,11 +8,11 @@ {{ end }}
- {{ if eq $board.ModCred $board.Domain $board.Actor }} + {{ if eq $board.ModCred $board.Domain $board.Actor.Id }} [Delete Post] {{ end }} {{ if .Attachment }} - {{ if eq $board.ModCred $board.Domain $board.Actor }} + {{ if eq $board.ModCred $board.Domain $board.Actor.Id }} [Delete Attachment] {{ end }} File: {{ (index .Attachment 0).Name }}({{ (index .Attachment 0).Size }}) @@ -60,7 +60,7 @@ } {{ end }} - {{ .Name }}{{ if .AttributedTo }} {{.AttributedTo }} {{ else }} Anonymous {{ end }}{{ .Published }} No. {{ .Id }} {{ if ne .Type "Tombstone" }}[Report]{{ end }} + {{ .Name }}{{ if .AttributedTo }} {{.AttributedTo }} {{ else }} Anonymous {{ end }}{{ .Published }} No. {{ .Id }} {{ if ne .Type "Tombstone" }}[Report]{{ end }}

{{.Content}}

{{ if .Replies }} {{ $replies := .Replies }} @@ -74,11 +74,11 @@
>>
- {{ if eq $board.ModCred $board.Domain $board.Actor }} + {{ if eq $board.ModCred $board.Domain $board.Actor.Id }} [Delete Post] {{ end }} {{ if .Attachment }} - {{ if eq $board.ModCred $board.Domain $board.Actor }} + {{ if eq $board.ModCred $board.Domain $board.Actor.Id }} [Delete Attachment] {{ end }} File {{ (index .Attachment 0).Name }} ({{ (index .Attachment 0).Size }}) @@ -126,12 +126,12 @@ } {{ end }} - {{ .Name }}{{ if .AttributedTo }} {{.AttributedTo }} {{ else }} Anonymous {{ end }}{{ .Published }} No. {{ .Id }} {{ if ne .Type "Tombstone" }}[Report]{{ 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}}

@@ -144,15 +144,15 @@ document.getElementById("{{ .Id }}-img").innerText = shortImg("{{ (index .Attachment 0).Name }}"); {{ end }} - document.getElementById("{{ .Id }}-link").innerText = shortURL("{{ $board.Actor }}", "{{ .Id }}"); + document.getElementById("{{ .Id }}-link").innerText = shortURL("{{ $board.Actor.Id }}", "{{ .Id }}"); - document.getElementById("{{ .Id }}-anchor").href = "/{{ $board.Name }}/" + shortURL("{{$board.Actor}}", "{{ $opId }}") + - "#" + shortURL("{{$board.Actor}}", "{{ .Id }}"); - document.getElementById("{{ .Id }}").setAttribute("id", shortURL("{{$board.Actor}}", "{{ .Id }}")); + document.getElementById("{{ .Id }}-anchor").href = "/{{ $board.Name }}/" + shortURL("{{$board.Actor.Id}}", "{{ $opId }}") + + "#" + shortURL("{{$board.Actor.Id}}", "{{ .Id }}"); + document.getElementById("{{ .Id }}").setAttribute("id", shortURL("{{$board.Actor.Id}}", "{{ .Id }}")); var content = document.getElementById("{{ .Id }}-content"); - content.innerHTML = convertContent('{{$board.Actor}}', content.innerText, '{{ $opId }}') + content.innerHTML = convertContent('{{$board.Actor.Id}}', content.innerText, '{{ $opId }}') {{ end }} @@ -165,16 +165,16 @@ document.getElementById("{{ .Id }}-img").innerText = shortImg("{{ (index .Attachment 0).Name }}"); {{ end }} - document.getElementById("{{ .Id }}-link").innerText = shortURL("{{ $board.Actor }}", "{{ .Id }}"); + document.getElementById("{{ .Id }}-link").innerText = shortURL("{{ $board.Actor.Id }}", "{{ .Id }}"); - document.getElementById("{{ .Id }}").setAttribute("id", shortURL("{{ $board.Actor }}", "{{ .Id }}")); + document.getElementById("{{ .Id }}").setAttribute("id", shortURL("{{ $board.Actor.Id }}", "{{ .Id }}")); - document.getElementById("{{ .Id }}-anchor").href = "/{{ $board.Name }}/" + shortURL("{{$board.Actor}}", "{{ $opId }}") + - "#" + shortURL("{{$board.Actor}}", "{{ .Id }}"); + document.getElementById("{{ .Id }}-anchor").href = "/{{ $board.Name }}/" + shortURL("{{$board.Actor.Id}}", "{{ $opId }}") + + "#" + shortURL("{{$board.Actor.Id}}", "{{ .Id }}"); var content = document.getElementById("{{ .Id }}-content"); - content.innerHTML = convertContent('{{$board.Actor}}', content.innerText, '{{ $opId }}') + content.innerHTML = convertContent('{{$board.Actor.Id}}', content.innerText, '{{ $opId }}') {{ end }} {{ end }} -- cgit v1.2.3