mmote.ru/themes/mmotium/layouts/index.html

37 lines
1.1 KiB
HTML

{{ define "main" }}
<div class="page-wrapper">
<section class="posts">
{{ range where .Site.RegularPages "Section" "posts" }}
<article class="post">
<header>
<h2>
<a href="{{.RelPermalink}}">{{.Title}}</a>
</h2>
</header>
<div class="body">
{{- $thumb := .Page.Resources.Get .Params.featured_image -}}
{{if $thumb}}
<a href="{{.RelPermalink}}">
<img class="thumb" src="{{ ($thumb.Fit "150x150").RelPermalink }}">
</a>
{{end}}
<div class="summary">
{{.Summary}}
</div>
</div>
<footer>
<time>{{.Date.Format "02.01.2006"}}</time>
{{ range (.GetTerms "categories") }}
<a class="category" href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
{{ end }}
</footer>
</article>
{{ end }}
</section>
{{ partial "sidebar.html" . }}
</div>
{{ end }}