diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/admin.html | 7 | ||||
-rw-r--r-- | views/manage.html | 11 | ||||
-rw-r--r-- | views/partials/posts.html | 5 |
3 files changed, 5 insertions, 18 deletions
diff --git a/views/admin.html b/views/admin.html index e490704..2b733b5 100644 --- a/views/admin.html +++ b/views/admin.html @@ -72,8 +72,5 @@ {{ end }} </div> -<!-- <div id="reported" class="popup-box" style="margin-bottom: 25px; padding: 12px;"> --> -<!-- <h4 style="margin: 0; margin-bottom: 5px;">Reported</h4> --> -<!-- <ul style="display: inline-block; padding: 0; margin: 0; list-style-type: none;"> --> -<!-- </ul> --> -<!-- </div> --> +{{ template "partials/footer" .page }} +{{ template "partials/general_scripts" .page }} diff --git a/views/manage.html b/views/manage.html index e3c03a0..e51644e 100644 --- a/views/manage.html +++ b/views/manage.html @@ -80,14 +80,3 @@ {{ template "partials/footer" .page }} {{ template "partials/general_scripts" .page }} - -<script> - var reported = document.querySelectorAll('#rpost'); - var reportedArray = [].slice.call(reported); - - reportedArray.forEach(function(r, i){ - var id = r.getAttribute("post") - r.innerText = "/" + {{ .page.Board.Name }} + "/" + shortURL("{{ .page.Board.Actor.Id }}", id) - r.href = {{ .page.Domain }} + "/" + {{ .page.Board.Name }} + "/" + shortURL("{{ .page.Board.Actor.Id }}", id) - }) -</script> diff --git a/views/partials/posts.html b/views/partials/posts.html index 67f3d27..8ae1745 100644 --- a/views/partials/posts.html +++ b/views/partials/posts.html @@ -1,5 +1,6 @@ {{ $board := .Board }} {{ $len := len .Posts }} +{{ $page := . }} {{ range .Posts }} {{ $thread := . }} {{ $opId := .Id }} @@ -48,7 +49,7 @@ <span class="name"><b>{{ if .AttributedTo }} {{.AttributedTo }} {{ else }} Anonymous {{ end }}</b></span> <span class="tripcode"> {{ .TripCode }} </span> <span class="timestamp" data-utc="{{.Published | timeToUnix}}">{{ .Published | timeToReadableLong }} <a id="{{ .Id }}-anchor" href="/{{ $board.Name }}/{{ shortURL $board.Actor.Outbox $opId }}#{{ shortURL $board.Actor.Outbox .Id }}">No.</a> <a id="{{ .Id }}-link" title="{{ .Id }}" {{ if eq .Type "Note" }} href="javascript:quote('{{ $board.Actor.Id }}', '{{ $opId }}', '{{ .Id }}')" {{ end }}>{{ shortURL $board.Actor.Outbox .Id }}</a> {{ if ne .Type "Tombstone" }}[<a href="javascript:report('{{ $board.Actor.Id }}', '{{ .Id }}')">Report</a>]{{ end }}</span> - <p id="{{ .Id }}-content" style="white-space: pre-wrap; margin: 10px 30px 10px 30px;">{{ parseContent $board.Actor $opId .Content $thread }}</p> + <p id="{{ .Id }}-content" style="white-space: pre-wrap; margin: 10px 30px 10px 30px;">{{ parseContent $board.Actor $opId .Content $thread .Id $page.PostType }}</p> {{ if .Replies }} {{ $replies := .Replies }} {{ if gt $replies.TotalItems 5 }} @@ -109,7 +110,7 @@ <span id="{{$parentId}}-replyto-{{.Id}}">{{ parseReplyLink $board.Actor.Id $opId .Id .Content }}</span> {{ end }} {{ end }} - <p id="{{ .Id }}-content" style="white-space: pre-wrap; margin: 10px 30px 10px 30px;">{{ parseContent $board.Actor $opId .Content $thread }}</p> + <p id="{{ .Id }}-content" style="white-space: pre-wrap; margin: 10px 30px 10px 30px;">{{ parseContent $board.Actor $opId .Content $thread .Id $page.PostType }}</p> </div> </div> </div> |