aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorFChannel <>2022-06-12 23:04:13 -0700
committerFChannel <>2022-06-19 12:53:29 -0700
commitcc3e8e57154409469267b0526807a907d5166147 (patch)
tree59acbf28290c8658a538f8843a1d0d9e1a598baf /views
parent0418dab57f9cf19540234d157a512e30a70a7152 (diff)
admin page layout/css - truncate long new line posts
Diffstat (limited to 'views')
-rw-r--r--views/admin.html7
-rw-r--r--views/manage.html11
-rw-r--r--views/partials/posts.html5
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>