32 lines
879 B
HTML
32 lines
879 B
HTML
{{define "body"}}
|
|
<h2 class="news-heading">News</h2>
|
|
{{template "flashes" .}}
|
|
<div class="news-posts">
|
|
{{range $news_post := .news}}
|
|
{{template "row-news" dict "post" $news_post "categories" $.categories}}
|
|
{{end}}
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
<!-- print a news row -->
|
|
{{define "row-news"}}
|
|
<div class="news-row">
|
|
<div class="row">
|
|
<div class="col-xs-12">
|
|
<h3>{{.post.Title}}</h3>
|
|
</div>
|
|
<div class="col-xs-12">
|
|
{{dateFormat .post.Date}}
|
|
</div>
|
|
<div class="col-xs-12">
|
|
<a href="{{.post.Url}}">{{.post.Url}}</a>
|
|
</div>
|
|
<div class="col-xs-12">
|
|
Category: {{fullCategoryPath .categories .post.Category_id}}
|
|
</div>
|
|
</div>
|
|
<div>{{.post.Notes}}</div>
|
|
</div>
|
|
{{end}}
|