diff options
author | FChannel <=> | 2021-01-22 21:12:26 -0800 |
---|---|---|
committer | FChannel <=> | 2021-01-22 21:12:26 -0800 |
commit | 2566e314e8351ffbceae9a2688d90a5c811d49e5 (patch) | |
tree | e802622593c540265e464beecf76696b65e229ed /static/top.html | |
parent | 626fee35bacd68baf6e9bb38ca71d88fff700b13 (diff) |
client to server conversion
Diffstat (limited to 'static/top.html')
-rw-r--r-- | static/top.html | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/static/top.html b/static/top.html new file mode 100644 index 0000000..d28043f --- /dev/null +++ b/static/top.html @@ -0,0 +1,37 @@ +{{ define "top" }} +<div style="margin: 0 auto; width: 400px; margin-bottom: 100px;"> + <h1 style="text-align: center; color: #af0a0f;">/{{ .Board.Name }}/ - {{ .Board.PrefName }}</h1> + <p style="text-align: center;">{{ .Board.Summary }}</p> + {{ $len := len .Posts }} + {{ if .Board.InReplyTo }} + <h3 id="newpostbtn" state="0" style="text-align: center; margin-top: 80px;"><a href="javascript:newpost()">[Post a Reply]</a></h3> + {{ else }} + <h3 id="newpostbtn" state="0" style="text-align: center; margin-top: 80px;"><a href="javascript:newpost()">[Start a New Thread]</a></h3> + {{ end }} + <div id="newpost" style="display: none;"> + <form id="new-post" action="/post" method="post" enctype="multipart/form-data"> + <label for="name">Name:</label><br> + <input type="text" id="name" name="name" placeholder="Anonymous"><br> + <label for="options">Options:</label><br> + <input type="text" id="options" name="options">{{ 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"><input type="submit" value="Post"><br> + {{ end }} + <label for="comment">Comment:</label><br> + <textarea rows="10" cols="50" id="comment" name="comment"></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="file" id="file" name="file" {{ if gt $len 1 }} required {{ else }} {{ if eq $len 0 }} required {{ end }} {{ end }} ><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> +</div> +{{ end }} |