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