1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-08-14 16:26:23 -07:00
gochan/templates/boardpage.html

65 lines
2.6 KiB
HTML

{{template "page_header.html" .}}
<header>
<h1 id="board-title">/{{$.board.Dir}}/ - {{$.board.Title}}</h1>
<span id="board-subtitle">{{$.board.Subtitle}}</span>
</header><hr />
<div id="right-sidelinks">
<a href="{{.webroot}}{{.board.Dir}}/catalog.html">Board catalog</a><br />
</div>
<div id="threadlinks-top">
<a href="#footer">Scroll to bottom</a>
</div>
{{- template "postbox.html" . -}}<hr />
<form action="/util" method="POST" id="main-form">
{{$global := .}}
{{- range $t, $thread := .threads}}{{$op := $thread.OP}}
<div class="thread">
{{- template "post.html" map "global" $global "board" $.board "post" $op "is_board_page" true -}}
{{- if gt $thread.NumReplies 3 -}}
<b>{{subtract $thread.NumReplies 3}} post{{if gt $thread.NumReplies 4}}s{{end}} omitted</b><br />
{{- end -}}
{{- range $reply_num,$reply := $thread.BoardReplies -}}
{{- template "post.html" map "global" $global "board" $.board "post" $reply -}}
{{- end -}}
</div><hr />
{{- end}}
<div id="right-bottom-content">
<div id="report-delbox">
<input type="hidden" name="board" value="{{.board.Dir}}" />
<input type="hidden" name="boardid" value="{{.board.ID}}" />
<label>[<input type="checkbox" name="fileonly"/>File only]</label> <input type="password" size="10" name="password" id="delete-password" /> <input type="submit" name="delete_btn" value="Delete" onclick="return confirm('Are you sure you want to delete these posts?')" /><br />
Reason: <input type="text" size="10" name="reason" id="reason" /> <input type="submit" name="report_btn" value="Report" /><br />
Edit post <input type="submit" name="edit_btn" value="Edit" />
</div>
</div>
</form>
<div id="left-bottom-content">
<a href="#">Scroll to top</a><br/>
<table id="pages">
<tr>
<td>{{if gt .board.CurrentPage 1}}
<form method="GET" action='{{.board.PagePath "prev"}}'>
<input type="submit" value="Previous" />
</form>
{{- else}}Previous{{end}}</td>
<td>{{range $_,$i := makeLoop .board.NumPages 1 -}}
{{- if eq $.board.CurrentPage $i -}}
[<b>{{$i}}</b>]
{{- else -}}
[<a href="{{$.board.PagePath $i }}">{{$i}}</a>]
{{- end -}}
{{- end}}</td>
<td>{{if lt .board.CurrentPage .board.NumPages}}
<form method="GET" action="{{.board.PagePath `next` }}">
<input type="submit" value="Next" />
</form>
{{else}}Next{{end}}</td>
</tr>
</table>
<span id="boardmenu-bottom">
[<a href="{{$.webroot}}">home</a>]&nbsp;
[{{range $i, $boardlink := $.boards -}}
{{- if gt $i 0}}/{{end}} <a href="{{$boardlink.WebPath `` `boardPage`}}/">{{$boardlink.Dir}}</a> {{end}}]
</span>
</div>
{{- template "page_footer.html" .}}