mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-08-14 16:26:23 -07:00
Start making templates more readable
Also change most remaining underscore var names to camelCase
This commit is contained in:
parent
6a96420e3e
commit
267a5eeb6f
16 changed files with 446 additions and 465 deletions
|
@ -1,4 +1,4 @@
|
|||
{{template "page_header.html" .}}
|
||||
{{- template "page_header.html" .}}
|
||||
<div id="top-pane">
|
||||
<span id="site-title">{{.config.SiteName}}</span><br />
|
||||
<span id="site-slogan">{{.config.SiteSlogan}}</span>
|
||||
|
@ -12,26 +12,37 @@
|
|||
<div class="section-block">
|
||||
<div class="section-title-block"><b>Boards</b></div>
|
||||
<div class="section-body">
|
||||
{{range $_, $section := .sections}}{{if not $section.Hidden}}<ul style="float:left; list-style: none">
|
||||
<li style="text-align: center; font-weight: bold"><b><u>{{$section.Name}}</u></b></li>
|
||||
{{range $_, $board := $.boards}}{{if and (eq $board.Section $section.ID) (ne $board.Dir $.config.Modboard)}}
|
||||
<li><a href="{{$.config.SiteWebfolder}}{{$board.Dir}}/" title="{{$board.Description}}">/{{$board.Dir}}/</a> — {{$board.Title}}</li>
|
||||
{{end}}{{end}}
|
||||
</ul>{{end}}{{end}}
|
||||
{{- range $_, $section := .sections -}}
|
||||
{{if not $section.Hidden}}
|
||||
<ul style="float:left; list-style: none">
|
||||
<li style="text-align: center; font-weight: bold"><b><u>{{$section.Name}}</u></b></li>
|
||||
{{range $_, $board := $.boards}}
|
||||
{{if and (eq $board.Section $section.ID) (ne $board.Dir $.config.Modboard)}}
|
||||
<li><a href="{{$.config.SiteWebfolder}}{{$board.Dir}}/" title="{{$board.Description}}">/{{$board.Dir}}/</a> — {{$board.Title}}</li>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</ul>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{if gt .config.MaxRecentPosts 0}}
|
||||
{{- if gt .config.MaxRecentPosts 0}}
|
||||
<div class="section-block">
|
||||
<div class="section-title-block"><b>Recent Posts</b></div>
|
||||
<div class="section-body">
|
||||
<div id="recent-posts">
|
||||
{{range $i, $post := $.recent_posts}}{{$postURL := getPostURL $post "recent" false}}
|
||||
{{- range $i, $post := $.recent_posts}}{{$postURL := getPostURL $post "recent" false}}
|
||||
<div class="recent-post">
|
||||
{{if and (ne $post.Filename "deleted") (ne $post.Filename "")}}<a href="{{$postURL}}" class="front-reply" target="_blank"><img src="{{$.config.SiteWebfolder}}{{$post.BoardName}}/thumb/{{getThreadThumbnail $post.Filename}}" alt="post thumbnail"/></a><br />
|
||||
{{else}}<div class="file-deleted-box" style="text-align:center; float:none;"><a href="{{$postURL}}" class="front-reply" target="_blank">No file</a></div>{{end}}<br />
|
||||
<a href="{{$.config.SiteWebfolder}}{{$post.BoardName}}/">/{{$post.BoardName}}/</a>
|
||||
<hr />
|
||||
{{truncateMessage (stripHTML $post.Message) 40 4}}</div>{{end}}</div>
|
||||
</div>{{end}}</div>
|
||||
{{if and (ne $post.Filename "deleted") (ne $post.Filename "") -}}
|
||||
<a href="{{$postURL}}" class="front-reply" target="_blank"><img src="{{$.config.SiteWebfolder}}{{$post.BoardName}}/thumb/{{getThreadThumbnail $post.Filename}}" alt="post thumbnail"/></a><br />
|
||||
{{else}}
|
||||
<div class="file-deleted-box" style="text-align:center; float:none;"><a href="{{$postURL}}" class="front-reply" target="_blank">No file</a></div>
|
||||
{{- end}}<br />
|
||||
<a href="{{$.config.SiteWebfolder}}{{$post.BoardName}}/">/{{$post.BoardName}}/</a><hr />
|
||||
{{truncateMessage (stripHTML $post.Message) 40 4}}
|
||||
</div>{{end}}
|
||||
</div>
|
||||
</div>{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{template "page_footer.html" .}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue