transmet/templates/pages/news.html

40 lines
1.3 KiB
HTML
Raw Normal View History

2015-07-21 14:10:57 +00:00
{{define "body"}}
<h2 class="news-heading">News</h2>
{{template "flashes" .}}
<div class="news-posts">
2015-07-21 14:10:57 +00:00
{{range $news_post := .news}}
{{template "row-news" dict "post" $news_post "categories" $.categories}}
2015-07-21 14:10:57 +00:00
{{end}}
</div>
2015-07-21 14:10:57 +00:00
{{end}}
<!-- print a news row -->
{{define "row-news"}}
<div class="news-row">
<div class="row">
2015-08-31 03:23:35 +00:00
<div class="col-xs-2">
{{fullCategoryPath .categories .post.Category_id}}
</div>
2015-08-31 03:23:35 +00:00
<div class="col-xs-8">
<strong>{{truncate .post.Title 100}}</strong>
</div>
2015-08-31 03:23:35 +00:00
<div class="col-xs-2">
{{dateFormat .post.Date}}
</div>
2015-08-31 03:23:35 +00:00
</div>
<div class="row">
<div class="col-xs-2">&nbsp;</div>
<div class="col-xs-8">
<a href="{{.post.Url}}">{{truncate .post.Url 100}}</a>
</div>
<div class="col-xs-2"><a href="/edit/{{.post.Id}}">Edit</a></div>
2015-08-31 03:23:35 +00:00
</div>
<div class="row">
<div class="col-xs-2">&nbsp;</div>
<div class="col-xs-8">{{truncate .post.Notes 500}}</div>
<div class="col-xs-2"><a class="delete" href="/delete/{{.post.Id}}">Delete</a></div>
</div>
</div>
2015-07-21 14:10:57 +00:00
{{end}}