1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-08-19 20:56:23 -07:00
gochan/templates/front.html

50 lines
2.1 KiB
HTML

{{- template "page_header.html" .}}
<div id="top-pane">
<h1 id="site-title">{{.siteConfig.SiteName}}</h1>
<span id="site-slogan">{{.siteConfig.SiteSlogan}}</span>
</div><br />
<div id="frontpage">
<div class="section-block front-intro-container">
<div class="section-body front-intro">
{{- template "front_intro.html" . -}}
</div>
</div>
<div class="section-block">
<div class="section-title-block text-bold">Boards</div>
<div class="section-body">
{{- range $_, $section := .sections -}}
{{if not $section.Hidden}}
<ul style="float:left; list-style: none">
<li class="text-bold text-underline text-center">{{$section.Name}}</li>
{{range $_, $board := $.boards -}}
{{- if and (eq $board.SectionID $section.ID) (ne $board.Dir $.siteConfig.Modboard) -}}
<li><a href="{{webPathDir $board.Dir}}" title="{{$board.Description}}">/{{$board.Dir}}/</a> — {{$board.Title}}</li>
{{- end -}}
{{- end}}
</ul>
{{end}}
{{end}}
</div>
</div>
{{- if gt .siteConfig.MaxRecentPosts 0}}
<div class="section-block">
<div class="section-title-block text-bold">Recent Posts</div>
<div class="section-body">
<div id="recent-posts">
{{- range $i, $post := $.recentPosts}}
<div class="recent-post">
{{if and $post.HasEmbed (eq $post.ThumbURL "") -}}
<div class="file-deleted-box"><a href="{{$post.URL}}" class="front-reply" target="_blank">Post embed</a></div>
{{- else if and (not $post.FileDeleted) (ne $post.Filename "") -}}
<a href="{{$post.URL}}" class="front-reply" target="_blank"><img src="{{$post.ThumbURL}}" alt="post thumbnail" {{if gt $post.ThumbnailWidth 0}}width="{{$post.ThumbnailWidth}}" height="{{$post.ThumbnailHeight}}"{{end}}/></a><br />
{{- else -}}
<div class="file-deleted-box"><a href="{{$post.URL}}" class="front-reply" target="_blank">No file</a></div>
{{- end}}<br />
<a href="{{webPathDir $post.Board}}">/{{$post.Board}}/</a><hr />
{{$post.MessageSample}}
</div>{{end}}
</div>
</div>{{end}}
</div>
</div>
{{template "page_footer.html" .}}