2020-07-20 16:02:07 +01:00
|
|
|
{{ define "main" }}
|
2019-03-31 13:32:06 +01:00
|
|
|
|
2020-08-27 15:25:39 +01:00
|
|
|
{{ if (and .Site.Params.profileMode.enabled .IsHome) }}
|
2020-08-27 15:07:45 +01:00
|
|
|
{{- partial "indexProfile.html" . }}
|
|
|
|
{{else}} {{/* if not profileMode */}}
|
|
|
|
|
2020-09-11 19:36:58 +01:00
|
|
|
{{- if not .IsHome | and .Title }}
|
2020-08-27 15:07:45 +01:00
|
|
|
<header class="page-header">
|
|
|
|
<h1>{{ .Title }}</h1>
|
|
|
|
</header>
|
2020-07-25 05:57:20 +01:00
|
|
|
{{ end }}
|
2020-09-11 19:36:58 +01:00
|
|
|
|
2020-09-19 12:59:05 +01:00
|
|
|
|
2020-09-11 19:36:58 +01:00
|
|
|
{{ $pages := .RegularPages }}
|
|
|
|
|
|
|
|
{{ if .IsHome }}
|
|
|
|
{{ $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{ $paginator := .Paginate $pages }}
|
2019-03-31 13:32:06 +01:00
|
|
|
|
2020-03-09 15:56:13 +00:00
|
|
|
{{- range $index, $page := $paginator.Pages }}
|
2019-03-31 13:32:06 +01:00
|
|
|
|
2020-03-09 17:50:02 +00:00
|
|
|
{{- $class := "post-entry" }}
|
2020-03-09 15:56:13 +00:00
|
|
|
{{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0)) }}
|
2020-09-19 12:59:05 +01:00
|
|
|
{{- if .Site.Params.homeInfoParams | or .Site.Params.disableSpecial1stPost}}
|
|
|
|
{{- partial "homeInfo.html" . }}
|
|
|
|
{{else}}
|
2020-03-09 17:50:02 +00:00
|
|
|
{{- $class = "first-entry" }}
|
2020-09-19 12:59:05 +01:00
|
|
|
{{ end }}
|
2020-03-09 15:56:13 +00:00
|
|
|
{{- else if .Data.Term }}
|
2020-03-09 17:50:02 +00:00
|
|
|
{{- $class = "post-entry tag-entry" }}
|
2020-03-09 15:56:13 +00:00
|
|
|
{{- end }}
|
2020-03-09 17:50:02 +00:00
|
|
|
<article class="{{ $class }}">
|
2020-09-14 13:15:22 +01:00
|
|
|
{{ if .Params.cover }}
|
|
|
|
<figure class="entry-cover">
|
|
|
|
<img src="{{ .Params.cover | absURL }}" alt="cover image for {{ .Title }}">
|
|
|
|
</figure>
|
|
|
|
{{ end }}
|
2019-03-31 13:32:06 +01:00
|
|
|
<header class="entry-header">
|
2020-07-24 16:16:33 +01:00
|
|
|
<h2>
|
|
|
|
{{ .Title }}
|
2020-07-28 08:06:53 +01:00
|
|
|
{{- if .Draft }}<div class="entry-isdraft"><sup>  [draft]</sup></div>{{- end }}
|
2020-07-24 16:16:33 +01:00
|
|
|
</h2>
|
2018-01-08 16:28:39 +00:00
|
|
|
</header>
|
2020-08-28 12:14:50 +01:00
|
|
|
{{if (ne .Site.Params.hideSummary true)}}
|
2019-03-31 13:32:06 +01:00
|
|
|
<section class="entry-content">
|
2020-07-20 15:23:30 +01:00
|
|
|
<p>{{ .Summary | plainify | htmlUnescape }}...</p>
|
2019-03-31 13:32:06 +01:00
|
|
|
</section>
|
2020-08-28 12:14:50 +01:00
|
|
|
{{ end }}
|
2019-03-31 13:32:06 +01:00
|
|
|
<footer class="entry-footer">
|
2019-08-19 21:12:49 +01:00
|
|
|
<time>{{ .Date.Format "January 2, 2006" }}</time>
|
2020-07-26 14:45:58 +01:00
|
|
|
{{ if $.Site.Params.ShowReadingTime }} .
|
2020-09-22 08:10:40 +01:00
|
|
|
{{ $default_txt := print .ReadingTime " " "min" }}
|
|
|
|
{{ i18n "read_time" .ReadingTime | default $default_txt }}{{ end }}
|
2020-07-26 14:47:04 +01:00
|
|
|
{{ if or .Params.author .Site.Params.author }} . {{ .Params.author | default .Site.Params.author }}{{ end }}
|
2018-01-08 16:28:39 +00:00
|
|
|
</footer>
|
2020-09-06 17:16:58 +01:00
|
|
|
<a class="entry-link" aria-label="post link to {{ .Title | plainify }}" href="{{ .Permalink }}"></a>
|
2018-01-08 16:28:39 +00:00
|
|
|
</article>
|
2020-03-09 15:56:13 +00:00
|
|
|
{{- end }}
|
2019-03-31 13:32:06 +01:00
|
|
|
|
2020-03-09 15:56:13 +00:00
|
|
|
{{- if gt $paginator.TotalPages 1 }}
|
2019-03-31 13:32:06 +01:00
|
|
|
<footer class="page-footer">
|
2018-01-08 16:28:39 +00:00
|
|
|
<nav class="pagination">
|
2020-03-09 15:56:13 +00:00
|
|
|
{{- if $paginator.HasPrev }}
|
2020-07-26 14:38:27 +01:00
|
|
|
<a class="prev" href="{{ $paginator.Prev.URL }}">« {{ i18n "prev_page" }}</a>
|
2020-03-09 15:56:13 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- if $paginator.HasNext }}
|
2020-07-26 14:38:27 +01:00
|
|
|
<a class="next" href="{{ $paginator.Next.URL }}">{{ i18n "next_page" }} »</a>
|
2020-03-09 15:56:13 +00:00
|
|
|
{{- end }}
|
2018-01-08 16:28:39 +00:00
|
|
|
</nav>
|
|
|
|
</footer>
|
2020-03-09 15:56:13 +00:00
|
|
|
{{- end }}
|
2020-08-27 15:07:45 +01:00
|
|
|
{{end}}{{/* end profileMode */}}
|
2020-07-20 16:02:07 +01:00
|
|
|
{{ end }}{{/* end main */}}
|