diff options
author | FChannel <> | 2021-07-31 11:42:59 -0700 |
---|---|---|
committer | FChannel <> | 2021-07-31 11:42:59 -0700 |
commit | ac288d40da3235b9382d685c9958ad167a758bcd (patch) | |
tree | 676b11c79625a0ec5a6a0c6a52b94f89e1fe72e8 /static | |
parent | f0ce5bc6d4146bc1191b8f8428c387a9085217e5 (diff) |
added archive page and viewing
Diffstat (limited to 'static')
-rw-r--r-- | static/archive.html | 81 | ||||
-rw-r--r-- | static/main.html | 32 | ||||
-rw-r--r-- | static/ncatalog.html | 24 | ||||
-rw-r--r-- | static/npost.html | 18 | ||||
-rw-r--r-- | static/nposts.html | 5 | ||||
-rw-r--r-- | static/posts.html | 6 | ||||
-rw-r--r-- | static/top.html | 55 |
7 files changed, 179 insertions, 42 deletions
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" }} +<title>/{{ .Board.Name }}/ - Archive</title> +<meta name="description" content="{{ (index .Posts 0).Content }}"> +<meta property="og:url" content="{{ (index .Posts 0).Id }}"> +<meta property="og:site_name" content="{{ .Instance.PreferredUsername }}" /> + +<meta property="og:title" content="{{ (index .Posts 0).Name }}"> +<meta property="og:description" content="{{ (index .Posts 0).Content }}"> + +<meta name="twitter:title" content="{{ (index .Posts 0).Name }}"> +<meta name="twitter:description" content="{{ (index .Posts 0).Content }}"> +<meta name="twitter:card" content="summary_large_image"> + +{{ if (index .Posts 0).Preview }} +<meta property="og:image" content="{{ (index .Posts 0).Preview.Href }}" /> +<meta name="twitter:image" content="{{ (index .Posts 0).Preview.Href }}" /> +{{ end }} + +<script src="/static/js/posts.js"></script> +{{ end }} + +{{ define "top" }} +<h1 style="text-align: center; color: #af0a0f;">/{{ .Board.Name }}/ - {{ .Board.PrefName }}</h1> +<p style="text-align: center;">{{ .Board.Summary }}</p> +<h1 style="text-align: center;">Archived Posts</h1> +{{ end }} + +{{ define "content" }} +{{ $board := .Board }} + +<hr> +<ul style="margin: 0; padding: 0; display: inline;"> + <li style="display: inline"><a href="/{{ $board.Name }}">[Return]</a></li> + <li style="display: inline"><a href="/{{ $board.Name }}/catalog">[Catalog]</a></li> + <li style="display: inline"><a href="#bottom">[Bottom]</a></li> + <li style="display: inline"><a href="javascript:location.reload()">[Refresh]</a></li> +</ul> +<hr> + +<table align="center" style="width: 900px;"> + <tr> + <th style="width: 100px">No.</th> + <th>Excerpt</th> + <th style="width: 100px;"></th> + </tr> + {{ range $i, $e := .Posts }} + {{ if mod $i 2 }} + <tr class="box-alt"> + <td>{{ short $board.Actor.Outbox $e.Id }}</td> + <td>{{ shortExcerpt $e }}</td> + <td style="text-align: center;"><a href="/{{ $board.Actor.Name }}/{{ short $board.Actor.Outbox $e.Id }}">[View]</a></td> + </tr> + {{ else }} + <tr class="box"> + <td>{{ short $board.Actor.Outbox $e.Id }}</td> + <td>{{ shortExcerpt $e }}</td> + <td style="text-align: center;"><a href="/{{ $board.Actor.Name }}/{{ short $board.Actor.Outbox $e.Id }}">[View]</a></td> + </tr> + {{ end }} + {{ end }} +</table> + +<hr> +<div style="height: 22px;"> + <ul style="position: absolute; left: 5px; margin: 0; padding: 0; display: inline;"> + <li style="display: inline"><a href="/{{ $board.Name }}">[Return]</a></li> + <li style="display: inline"><a href="/{{ $board.Name }}/catalog">[Catalog]</a></li> + <li style="display: inline"><a id="bottom" href="#top">[Top]</a></li> + <li style="display: inline"><a href="javascript:location.reload()">[Refresh]</a></li> + </ul> +</div> +<hr> + +{{ end }} + +{{ define "script" }} +<script src="/static/js/footerscript.js"></script> +<script> + viewLink("{{ .Board.Name }}", "{{ .Board.Actor.Id }}") +</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 @@ <!DOCTYPE html> <html> <head> - <meta charset="UTF-8"> + <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> - <meta name="keywords" content="Federated Imageboard based on Activtypub"> + <meta name="keywords" content="Federated Imageboard based on Activtypub"> <meta property="og:locale" content="en_US" /> <meta property="og:type" content="website" /> <link rel="icon" type="image/png" href="/static/favicon.png"> @@ -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; } </style> - {{ template "header" . }} + {{ template "header" . }} </head> <body> <ul style="display: inline; padding:0;"> {{ $l := len .Boards }} - <li style="display: inline;">[<a href="/">Home</a>]</li> + <li style="display: inline;">[<a href="/">Home</a>]</li> {{range $i, $e := .Boards}} {{ if eq (sub $l 1) 0 }} - <li style="display: inline;">[ <a href="{{.Location}}">{{$e.Name}} </a>]</li> + <li style="display: inline;">[ <a href="{{.Location}}">{{$e.Name}} </a>]</li> {{ else if eq $i 0 }} <li style="display: inline;">[<a href="{{.Location}}">{{$e.Name}} </a>/</li> {{ else if eq $i (sub $l 1) }} <li style="display: inline;"><a href="{{.Location}}">{{$e.Name}}</a>]</li> {{ else }} - <li style="display: inline;"><a href="{{.Location}}">{{$e.Name}} </a>/</li> + <li style="display: inline;"><a href="{{.Location}}">{{$e.Name}} </a>/</li> {{ end }} {{end}} </ul> @@ -96,9 +104,9 @@ {{ end }} {{ end }} {{ template "top" . }} - + {{ template "content" . }} - + {{ template "bottom" . }} <div align="center" style="width: 500px; margin:0 auto; margin-top: 50px;"> <a href="/">[Home]</a><a href="/static/rules.html">[Rules]</a><a href="/static/faq.html">[FAQ]</a> 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 @@ <hr> <ul style="margin: 0; padding: 0; display: inline"> <li style="display: inline"><a href="/{{ $board.Name }}">[Return]</a></li> + <li style="display: inline"><a href="/{{ $board.Name }}/archive">[Archive]</a></li> <li style="display: inline"><a href="#bottom">[Bottom]</a></li> <li style="display: inline"><a href="javascript:location.reload()">[Refresh]</a></li> -</ul> +</ul> <hr> <div style="padding: 10px; text-align: center;"> {{ range .Posts }} <div style="overflow: hidden; vertical-align: top; padding-right: 24px; padding-bottom: 24px; display: inline-block; width: 180px; max-height: 320px; margin-bottom: 10px;"> - {{ if eq $board.ModCred $board.Domain $board.Actor.Id }} + {{ 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 }} + {{ if eq $board.ModCred $board.Domain $board.Actor.Id }} <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 }} + <a href="/marksensitive?id={{ .Id }}&board={{ $board.Actor.Name }}">[Mark Sensitive]</a> + {{ end }} <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: 180px; max-height: 180px;" src="/static/sensitive.png"><div id="sensitive-text-{{ .Id }}" style="width: 170px; position: absolute; margin-top: 75px; padding: 5px; background-color: black; color: white; cursor: default; ">NSFW Content</div></div></div> - <a id="{{ .Id }}-anchor" href="/{{ $board.Name }}/{{ short $board.Actor.Outbox .Id}}"> + <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: 180px; max-height: 180px;" src="/static/sensitive.png"><div id="sensitive-text-{{ .Id }}" style="width: 170px; position: absolute; margin-top: 75px; padding: 5px; background-color: black; color: white; cursor: default; ">NSFW Content</div></div></div> + <a id="{{ .Id }}-anchor" href="/{{ $board.Name }}/{{ short $board.Actor.Outbox .Id}}"> <div id="media-{{ .Id }}" style="width:180px;"> {{ parseAttachment . true }}</div> </a> <script> @@ -59,9 +60,9 @@ 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> + media.style = "display: none;" + } + </script> {{ end }} <a id="{{ .Id }}-link" href="/{{ $board.Name }}/{{ short $board.Actor.Outbox .Id }}"> <div> @@ -84,10 +85,11 @@ <hr> <ul style="margin: 0; padding: 0; display: inline"> <li style="display: inline"><a href="/{{ $board.Name }}">[Return]</a></li> + <li style="display: inline"><a href="/{{ $board.Name }}/archive">[Archive]</a></li> <li style="display: inline"><a id="bottom" href="#top">[Top]</a></li> <li style="display: inline"><a href="javascript:location.reload()">[Refresh]</a></li> </ul> -<hr> +<hr> {{ 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 @@ <meta property="og:image" content="{{ (index .Posts 0).Preview.Href }}" /> <meta name="twitter:image" content="{{ (index .Posts 0).Preview.Href }}" /> {{ end }} - -<script src="/static/js/posts.js"></script> {{ end }} {{ define "content" }} @@ -25,7 +23,6 @@ <hr> <ul style="margin: 0; padding: 0; display: inline"> <li style="display: inline"><a href="/{{ $board.Name }}">[Return]</a></li> - <li style="display: inline"><a href="/{{ $board.Name }}/catalog">[Catalog]</a></li> <li style="display: inline"><a href="#bottom">[Bottom]</a></li> <li style="display: inline"><a href="javascript:location.reload()">[Refresh]</a></li> </ul> @@ -36,23 +33,24 @@ <hr> <ul style="position: absolute; left: 5px; margin: 0; padding: 0; display: inline"> <li style="display: inline"><a href="/{{ $board.Name }}">[Return]</a></li> - <li style="display: inline"><a href="/{{ $board.Name }}/catalog">[Catalog]</a></li> <li style="display: inline"><a id="bottom" href="#top">[Top]</a></li> <li style="display: inline"><a href="javascript:location.reload()">[Refresh]</a></li> <li style="display: inline"><input id="autoreload-checkbox" type="checkbox" onclick="autoTimer()"> Auto refresh <span id="autoreload-countdown" style="visibility: hidden;">0</span></li> </ul> -{{ $replies := (index .Posts 0).Replies }} +{{ $replies := (index .Posts 0).Replies }} <span style="float: right;">{{ $replies.TotalItems }} / {{ $replies.TotalImgs }}</span> -<div style="width: 500px; margin: 0 auto; text-align: center;"> - <span ><a id="reply-content" href="javascript:quote('{{ $board.Actor.Id }}', '{{ (index .Posts 0).Id }}', 'reply')">[Post a Reply]</a></span> + +<div style="width: 500px; height: 22px; margin: 0 auto; text-align: center;"> +{{ if eq (index .Posts 0).Type "Note" }} +<span ><a id="reply-content" href="javascript:quote('{{ $board.Actor.Id }}', '{{ (index .Posts 0).Id }}', 'reply')">[Post a Reply]</a></span> +{{ end }} </div> + <hr> {{ end }} {{ define "script" }} +<script src="/static/js/posts.js"></script> <script src="/static/js/footerscript.js"></script> <script src="/static/js/timer.js"></script> -<script> - viewLink("{{ .Board.Name }}", "{{ .Board.Actor.Id }}") -</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 @@ <meta name="twitter:title" content="{{ .Title }}"> <meta name="twitter:description" content="{{ .Board.Summary }}"> <meta name="twitter:card" content="summary_large_image"> -<script src="/static/js/posts.js"></script> {{ end }} - {{ define "content" }} {{ $board := .Board }} <hr> <ul style="margin: 0; padding: 0; display: inline"> <li style="display: inline"><a href="/{{ $board.Name }}/catalog">[Catalog]</a></li> + <li style="display: inline"><a href="/{{ $board.Name }}/archive">[Archive]</a></li> <li style="display: inline"><a href="#bottom">[Bottom]</a></li> <li style="display: inline"><a href="javascript:location.reload()">[Refresh]</a></li> </ul> @@ -28,6 +27,7 @@ <hr> <ul style="margin: 0; padding: 0; display: inline"> <li style="display: inline"><a href="/{{ $board.Name }}/catalog">[Catalog]</a></li> + <li style="display: inline"><a href="/{{ $board.Name }}/archive">[Archive]</a></li> <li style="display: inline"><a id="bottom" href="#top">[Top]</a></li> <li style="display: inline"><a href="javascript:location.reload()">[Refresh]</a></li> </ul> @@ -54,5 +54,6 @@ {{ end }} {{ define "script" }} +<script src="/static/js/posts.js"></script> <script src="/static/js/footerscript.js"></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 @@ } </script> {{ end }} - <span style="color: #0f0c5d;"><b>{{ .Name }}</b></span><span style="color: #117743;"><b>{{ if .AttributedTo }} {{.AttributedTo }} {{ else }} Anonymous {{ end }}</b></span><span class="tripcode"> {{ .TripCode }} </span><span>{{ .Published }} <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 }}" href="javascript:quote('{{ $board.Actor.Id }}', '{{ $opId }}', '{{ .Id }}')">{{ short $board.Actor.Outbox .Id }}</a> {{ if ne .Type "Tombstone" }}<a href="javascript:report('{{ $board.Actor.Id }}', '{{ .Id }}')">[Report]</a>{{ end }}</span> + <span style="color: #0f0c5d;"><b>{{ .Name }}</b></span><span style="color: #117743;"><b>{{ if .AttributedTo }} {{.AttributedTo }} {{ else }} Anonymous {{ end }}</b></span><span class="tripcode"> {{ .TripCode }} </span><span>{{ .Published }} <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 }} @@ -68,7 +68,7 @@ <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> + <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> @@ -97,7 +97,7 @@ } </script> {{ end }} - <span style="color: #0f0c5d;"><b>{{ .Name }}</b></span><span style="color: #117743;"><b>{{ if .AttributedTo }} {{.AttributedTo }} {{ else }} Anonymous {{ end }}</b></span><span class="tripcode"> {{ .TripCode }} </span><span>{{ .Published }} <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 }}" href="javascript:quote('{{ $board.Actor.Id }}', '{{ $opId }}', '{{ .Id }}')">{{ short $board.Actor.Outbox .Id }}</a> {{ if ne .Type "Tombstone" }}<a href="javascript:report('{{ $board.Actor.Id }}', '{{ .Id }}')">[Report]</a>{{ end }}</span> + <span style="color: #0f0c5d;"><b>{{ .Name }}</b></span><span style="color: #117743;"><b>{{ if .AttributedTo }} {{.AttributedTo }} {{ else }} Anonymous {{ end }}</b></span><span class="tripcode"> {{ .TripCode }} </span><span>{{ .Published }} <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 }} 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 @@ <h1 style="text-align: center; color: #af0a0f;">/{{ .Board.Name }}/ - {{ .Board.PrefName }}</h1> <p style="text-align: center;">{{ .Board.Summary }}</p> {{ $len := len .Posts }} + {{ if eq $len 0 }} {{ if .Board.InReplyTo }} <h3 id="newpostbtn" state="0" style="text-align: center; margin-top: 80px; display: none;"><a href="javascript:newpost()">[Post a Reply]</a></h3> - {{ else }} + {{ else }} <h3 id="newpostbtn" state="0" style="text-align: center; margin-top: 80px; display: none;"><a href="javascript:newpost()">[Start a New Thread]</a></h3> - {{ end }} + {{ end }} <!-- end if inreplyto--> <div id="newpost"> <form onsubmit="sessionStorage.setItem('element-closed-reply', true)" id="new-post" action="/post" method="post" enctype="multipart/form-data" style="margin-left: 180px;"> <label for="name">Name:</label><br> @@ -35,9 +36,55 @@ </div> </form> </div> + + {{ else }} <!-- special case to distinquish Notes and Archived formatting --> + + {{ if eq (index .Posts 0).Type "Note" }} + {{ if .Board.InReplyTo }} + <h3 id="newpostbtn" state="0" style="text-align: center; margin-top: 80px; display: none;"><a href="javascript:newpost()">[Post a Reply]</a></h3> + {{ else }} + <h3 id="newpostbtn" state="0" style="text-align: center; margin-top: 80px; display: none;"><a href="javascript:newpost()">[Start a New Thread]</a></h3> + {{ end }} <!-- end if inreplyto--> + {{ $len := len .Posts }} + <div id="newpost"> + <form onsubmit="sessionStorage.setItem('element-closed-reply', true)" id="new-post" action="/post" method="post" enctype="multipart/form-data" style="margin-left: 180px;"> + <label for="name">Name:</label><br> + <input type="text" id="name" name="name" placeholder="Anonymous" maxlength="100"><br> + <label for="options">Options:</label><br> + <input type="text" id="options" name="options" maxlength="100" style="margin-right:10px">{{ if .Board.InReplyTo }}<input type="submit" value="Post">{{ end }}<br> + {{ if eq .Board.InReplyTo "" }} + <label for="subject">Subject:</label><br> + <input type="text" id="subject" name="subject" maxlength="100" style="margin-right:10px"><input type="submit" value="Post"><br> + {{ end }} + <label for="comment">Comment:</label><br> + <textarea rows="10" cols="50" id="comment" name="comment" maxlength="2000"></textarea><br> + <input type="hidden" id="inReplyTo" name="inReplyTo" value="{{ .Board.InReplyTo }}"> + <input type="hidden" id="sendTo" name="sendTo" value="{{ .Board.To }}"> + <input type="hidden" id="boardName" name="boardName" value="{{ .Board.Name }}"> + <input type="hidden" id="captchaCode" name="captchaCode" value="{{ .Board.CaptchaCode }}"> + <input type="hidden" id="returnTo" name="returnTo" value="{{ .ReturnTo }}"> + <input type="file" id="file" name="file" {{ if gt $len 1 }} required {{ else }} {{ if eq $len 0 }} required {{ end }} {{ end }} ><br><br> + <input type="checkbox" name="sensitive"><span>Mark attachment as sensitive</span><br><br> + <label stye="display: inline-block;" for="captcha">Captcha:</label> + <br> + <input style="display: inline-block;" type="text" id="captcha" name="captcha" autocomplete="off"><br> + <div style="height: 65px;"> + <img src="{{ .Board.Captcha }}"> + </div> + </form> + </div> + {{ else }} + <h1 style="text-align: center;">Archived Post</h1> + {{ end }} + {{ end }} <!-- end of len eq 0--> </div> <script> - document.getElementById("newpostbtn").style.display = "block"; - document.getElementById("newpost").style.display = "none"; + newpostbtn = document.getElementById("newpostbtn"); + newpost = document.getElementById("newpost"); + + if(newpostbtn) + newpostbtn.style.display = "block"; + if(newpost) + newpost.style.display = "none"; </script> {{ end }} |