highlight.html 1.28 KiB
{{ if .posts }}
<div class="highlight">
{{ $highlight := index .posts 0 }}
{{ $highlight = site.GetPage (printf "/posts/%s" $highlight)}}
{{ $list := .posts }}
{{ with $highlight }}
<div class="highlight-post">
{{ partial "posts/post" . }}
</div>
{{ end }}
{{ with $list }}
{{ $first := true }}
<div class="list">
{{ range after 1 . }}
{{ with site.GetPage (printf "/posts/%s" .) }}
<article class="post">
{{- $title := partial "PrepareHTML" .Title -}}
<h1 itemprop="headline"><a href="{{ .Permalink }}" title="{{ safeHTML (i18n "commons.more_aria" (dict "Title" $title)) }}">{{ $title }}</a></h1>
{{ if site.Params.posts.list.show_categories }}
{{- partial "posts/categories" . -}}
{{ end }}
{{- if (partial "GetTextFromHTML" .Params.description_short) -}}
<p itemprop="articleBody">{{ partial "PrepareHTML" .Params.description_short }}</p>
{{- end -}}
<time itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02T15:04" }}">{{ .Date | time.Format ":date_long" }}</time>
</article>
{{ end }}
{{ end }}
</div>
{{ end }}
</div>
{{ end }}