diff options
author | FChannel <> | 2022-06-19 12:47:32 -0700 |
---|---|---|
committer | FChannel <> | 2022-06-19 16:03:29 -0700 |
commit | b02f813e519dc890f2eb4827ff52cff3ff90c828 (patch) | |
tree | d020fbdefda52542aab3f4250bf93533e9f38504 /static/posts.html | |
parent | cd99df8d6781c3f0a191d119ea0ddf8c4a16089f (diff) |
v0.1.0
Diffstat (limited to 'static/posts.html')
-rw-r--r-- | static/posts.html | 122 |
1 files changed, 0 insertions, 122 deletions
diff --git a/static/posts.html b/static/posts.html deleted file mode 100644 index 936ed58..0000000 --- a/static/posts.html +++ /dev/null @@ -1,122 +0,0 @@ -{{ define "posts" }} -{{ $board := .Board }} -{{ $len := len .Posts }} -{{ range .Posts }} -{{ $thread := . }} -{{ $opId := .Id }} -{{ if eq $board.InReplyTo "" }} -<hr> -{{ end }} -<div style="overflow: auto;"> - <div id="{{ short $board.Actor.Outbox .Id }}" style="overflow: visible; margin-bottom: 12px;"> - {{ if eq $board.ModCred $board.Domain $board.Actor.Id }} - [<a href="/delete?id={{ .Id }}&board={{ $board.Actor.Name }}">Delete Post</a>] - {{ end }} - {{ if .Attachment }} - {{ if eq $board.ModCred $board.Domain $board.Actor.Id }} - [<a href="/banmedia?id={{ .Id }}&board={{ $board.Actor.Name }}">Ban Media</a>] - [<a href="/deleteattach?id={{ .Id }}&board={{ $board.Actor.Name }}">Delete Attachment</a>] - [<a href="/marksensitive?id={{ .Id }}&board={{ $board.Actor.Name }}">Mark Sensitive</a>] - {{ end }} - <span style="display: block;">File: <a id="{{ .Id }}-img" href="{{ proxy (index .Attachment 0).Href}}">{{ shortImg (index .Attachment 0).Name }}</a><span id="{{ .Id }}-size"> ({{ convertSize (index .Attachment 0).Size }})</span></span> - <div id="hide-{{ .Id }}" style="display: none;">[Hide]</div> - <div id="sensitive-{{ .Id }}" style="display: none;"><div style="position: relative; text-align: center;"><img id="sensitive-img-{{ .Id }}" style="float: left; margin-right: 10px; margin-bottom: 10px; max-width: 250px; max-height: 250px;" src="/static/sensitive.png"><div id="sensitive-text-{{ .Id }}" style="width: 240px; position: absolute; margin-top: 110px; padding: 5px; background-color: black; color: white; cursor: default; ">NSFW Content</div></div></div> - <div id="media-{{ .Id }}">{{ parseAttachment . false }}</div> - <script> - media = document.getElementById("media-{{ .Id }}") - if(({{ .Sensitive }} && {{ $board.Actor.Restricted }}) || ({{ isOnion .Id }} && !{{ isOnion $board.Domain }})){ - sensitive = document.getElementById("sensitive-{{ .Id }}") - hide = document.getElementById("hide-{{ .Id }}") - sensitive.onclick = function(){document.getElementById("media-{{ .Id }}").style="display: block;"; document.getElementById("sensitive-{{ .Id }}").style="display: none;"; document.getElementById("hide-{{ .Id }}").style="display: block; cursor: pointer;"} - hide.onclick = function(){document.getElementById("media-{{ .Id }}").style="display: none;"; document.getElementById("sensitive-{{ .Id }}").style="display: block;"; document.getElementById("hide-{{ .Id }}").style="display: none;"} - sensitive.style = "display: block" - media.style = "display: none;" - } - - if({{ isOnion .Id }} && !{{ isOnion $board.Domain }}) { - sensitive = document.getElementById("sensitive-{{ .Id }}") - document.getElementById("sensitive-img-{{ .Id }}").src = "/static/onion.png" - document.getElementById("sensitive-text-{{ .Id }}").innerText = "Tor Instance" - hide = document.getElementById("hide-{{ .Id }}") - sensitive.onclick = function(){document.getElementById("media-{{ .Id }}").style="display: block;"; document.getElementById("sensitive-{{ .Id }}").style="display: none;"; document.getElementById("hide-{{ .Id }}").style="display: block; cursor: pointer;"} - hide.onclick = function(){document.getElementById("media-{{ .Id }}").style="display: none;"; document.getElementById("sensitive-{{ .Id }}").style="display: block;"; document.getElementById("hide-{{ .Id }}").style="display: none;"} - sensitive.style = "display: block" - media.style = "display: none;" - } - </script> - {{ end }} - <span class="subject"><b>{{ .Name }}</b></span> - <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 }}/{{ short $board.Actor.Outbox $opId }}#{{ short $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 }}>{{ short $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> - {{ if .Replies }} - {{ $replies := .Replies }} - {{ if gt $replies.TotalItems 5 }} - {{ if gt $len 1 }} - <span>{{ $replies.TotalItems }} replies{{ if gt $replies.TotalImgs 0}} and {{ $replies.TotalImgs }} images{{ end }}, Click <a id="view" post="{{.Id}}" href="/{{ $board.Name }}/{{ short $board.Actor.Outbox .Id }}">here</a> to view all.</span> - {{ end }} - {{ end }} - {{ range $replies.OrderedItems }} - <div id="{{ short $board.Actor.Outbox .Id }}"> - <div style="display: inline-block; overflow: auto;"> - <div style="float: left; display: block; margin-right: 5px;">>></div> - <div class="post" style="overflow: auto; padding: 5px; margin-bottom: 2px;"> - {{ if eq $board.ModCred $board.Domain $board.Actor.Id }} - [<a href="/delete?id={{ .Id }}&board={{ $board.Actor.Name }}">Delete Post</a>] - {{ end }} - {{ if .Attachment }} - {{ if eq $board.ModCred $board.Domain $board.Actor.Id }} - [<a href="/banmedia?id={{ .Id }}&board={{ $board.Actor.Name }}">Ban Media</a>] - [<a href="/deleteattach?id={{ .Id }}&board={{ $board.Actor.Name }}">Delete Attachment</a>] - [<a href="/marksensitive?id={{ .Id }}&board={{ $board.Actor.Name }}">Mark Sensitive</a>] - {{ end }} - <span style="display: block;">File <a id="{{ .Id }}-img" href="{{ proxy (index .Attachment 0).Href}}">{{ shortImg (index .Attachment 0).Name }}</a> <span id="{{ .Id }}-size">({{ convertSize (index .Attachment 0).Size }})</span></span> - <div id="hide-{{ .Id }}" style="display: none;">[Hide]</div> - <div id="sensitive-{{ .Id }}" style="display: none;"><div style="position: relative; text-align: center;"><img id="sensitive-img-{{ .Id }}" style="float: left; margin-right: 10px; margin-bottom: 10px; max-width: 250px; max-height: 250px;" src="/static/sensitive.png"><div id="sensitive-text-{{ .Id }}" style="width: 240px; position: absolute; margin-top: 110px; padding: 5px; background-color: black; color: white; cursor: default; ">NSFW Content</div></div></div> - <div> </div> - <div id="media-{{ .Id }}" sensitive="0">{{ parseAttachment . false }}</div> - <script> - media = document.getElementById("media-{{ .Id }}") - - if(({{ .Sensitive }} && {{ $board.Actor.Restricted }}) || {{ isOnion .Id }} && !{{ isOnion $board.Domain }}){ - sensitive = document.getElementById("sensitive-{{ .Id }}") - hide = document.getElementById("hide-{{ .Id }}") - sensitive.onclick = function(){document.getElementById("media-{{ .Id }}").style="display: block;"; document.getElementById("sensitive-{{ .Id }}").style="display: none;"; document.getElementById("hide-{{ .Id }}").style="display: block; cursor: pointer;"} - hide.onclick = function(){document.getElementById("media-{{ .Id }}").style="display: none;"; document.getElementById("sensitive-{{ .Id }}").style="display: block;"; document.getElementById("hide-{{ .Id }}").style="display: none;"} - sensitive.style = "display: block" - media.style = "display: none;" - } - - if({{ isOnion .Id }} && !{{ isOnion $board.Domain }}) { - sensitive = document.getElementById("sensitive-{{ .Id }}") - document.getElementById("sensitive-img-{{ .Id }}").src = "/static/onion.png" - document.getElementById("sensitive-text-{{ .Id }}").innerText = "Tor Instance" - hide = document.getElementById("hide-{{ .Id }}") - sensitive.onclick = function(){document.getElementById("media-{{ .Id }}").style="display: block;"; document.getElementById("sensitive-{{ .Id }}").style="display: none;"; document.getElementById("hide-{{ .Id }}").style="display: block; cursor: pointer;"} - hide.onclick = function(){document.getElementById("media-{{ .Id }}").style="display: none;"; document.getElementById("sensitive-{{ .Id }}").style="display: block;"; document.getElementById("hide-{{ .Id }}").style="display: none;"} - sensitive.style = "display: block" - media.style = "display: none;" - } - </script> - {{ end }} - <span class="subject"><b>{{ .Name }}</b></span> - <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 }}/{{ short $board.Actor.Outbox $opId }}#{{ short $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 }}>{{ short $board.Actor.Outbox .Id }}</a> {{ if ne .Type "Tombstone" }}[<a href="javascript:report('{{ $board.Actor.Id }}', '{{ .Id }}')">Report</a>]{{ end }}</span> - {{ $parentId := .Id }} - {{ if .Replies.OrderedItems }} - {{ range .Replies.OrderedItems }} - <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> - </div> - </div> - </div> - {{ end }} - {{ end }} - </div> -</div> -{{ end }} -{{ end }} |