theme-blog-ewen/layouts/index.html

37 lines
1.3 KiB
HTML
Raw Normal View History

2020-04-12 08:16:04 +00:00
{{ partial "header" . }}
{{ partial "nav" . }}
{{ partial "sidebar" . }}
<section class="page-content">
<div class="container">
{{- $pctx := . -}}
{{ if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages := $pctx.RegularPages -}}
{{ $paginator := .Paginate (where $pages "Params.hidden" "ne" true) }}
{{ range sort .Paginator.Pages }}
<article>
<h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
<div class="tags-list">
{{ if .Params.tags }}
{{ partial "tags" .Params.tags }}
{{ end }}
</div>
<span class="article-date">{{ i18n "publishedIn" }} <a href="{{ .CurrentSection.URL }}">{{ .CurrentSection.Name }}</a> {{ i18n "on" }} {{ .Date.Format "2006-01-02" }}. {{ i18n "readingTime" }} {{ i18n "readingTimeValue" .ReadingTime }}.</span>
<div class="post-content">
{{ if .Description }}
2020-11-13 09:08:49 +00:00
{{ .Description | markdownify | safeHTML }}
2020-04-12 08:16:04 +00:00
<span class="button"><a href="{{ .Permalink }}">{{ i18n "readMore" }}</a></span>
{{ else }}
2020-11-13 09:08:49 +00:00
{{ .Summary | markdownify | safeHTML }}
2020-04-12 08:16:04 +00:00
{{ if .Truncated }}
<span class="button"><a href="{{ .Permalink }}">{{ i18n "readMore" }}</a></span>
{{ end }}
{{ end }}
</div>
</article>
{{ end }}
</div>
{{ template "_internal/pagination.html" . }}
</section>
{{ partial "footer" . }}