aboutsummaryrefslogtreecommitdiff
path: root/static/top.html
blob: fa4cb9e9764b14acaca113698ca4d9f9336206c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{{ define "top" }}
<div style="margin: 0 auto; width: 700px; 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 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>
</div>
{{ end }}