2020-09-23 03:22:32 -04:00
|
|
|
{{- define "main" }}
|
2019-03-31 08:32:06 -04:00
|
|
|
|
2022-03-27 09:14:06 -04:00
|
|
|
{{- if (and site.Params.profileMode.enabled .IsHome) }}
|
2020-09-23 08:53:57 -04:00
|
|
|
{{- partial "index_profile.html" . }}
|
2020-09-23 03:22:32 -04:00
|
|
|
{{- else }} {{/* if not profileMode */}}
|
2020-08-27 10:07:45 -04:00
|
|
|
|
2020-09-11 14:36:58 -04:00
|
|
|
{{- if not .IsHome | and .Title }}
|
2020-08-27 10:07:45 -04:00
|
|
|
<header class="page-header">
|
2021-02-08 10:00:34 -05:00
|
|
|
{{- partial "breadcrumbs.html" . }}
|
2022-04-29 22:12:51 -04:00
|
|
|
<h1>
|
|
|
|
{{ .Title }}
|
|
|
|
{{- if and (or (eq .Kind `term`) (eq .Kind `section`)) (.Param "ShowRssButtonInSectionTermList") }}
|
2023-04-23 10:17:46 -04:00
|
|
|
{{- with .OutputFormats.Get "rss" }}
|
|
|
|
<a href="{{ .RelPermalink }}" title="RSS" aria-label="RSS">
|
2022-04-29 22:12:51 -04:00
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
|
|
|
stroke-linecap="round" stroke-linejoin="round" height="23">
|
|
|
|
<path d="M4 11a9 9 0 0 1 9 9" />
|
|
|
|
<path d="M4 4a16 16 0 0 1 16 16" />
|
|
|
|
<circle cx="5" cy="19" r="1" />
|
|
|
|
</svg>
|
|
|
|
</a>
|
|
|
|
{{- end }}
|
2023-04-23 10:17:46 -04:00
|
|
|
{{- end }}
|
2022-04-29 22:12:51 -04:00
|
|
|
</h1>
|
2021-01-27 10:49:21 -05:00
|
|
|
{{- if .Description }}
|
|
|
|
<div class="post-description">
|
2021-09-02 04:06:33 -04:00
|
|
|
{{ .Description | markdownify }}
|
2021-01-27 10:49:21 -05:00
|
|
|
</div>
|
|
|
|
{{- end }}
|
2020-08-27 10:07:45 -04:00
|
|
|
</header>
|
2020-09-23 03:22:32 -04:00
|
|
|
{{- end }}
|
2020-09-19 07:59:05 -04:00
|
|
|
|
2021-09-02 04:13:08 -04:00
|
|
|
{{- if .Content }}
|
2021-09-02 04:03:47 -04:00
|
|
|
<div class="post-content">
|
|
|
|
{{- if not (.Param "disableAnchoredHeadings") }}
|
|
|
|
{{- partial "anchored_headings.html" .Content -}}
|
|
|
|
{{- else }}{{ .Content }}{{ end }}
|
|
|
|
</div>
|
2021-09-02 04:13:08 -04:00
|
|
|
{{- end }}
|
2021-09-02 04:03:47 -04:00
|
|
|
|
2020-10-13 08:47:39 -04:00
|
|
|
{{- $pages := union .RegularPages .Sections }}
|
2020-09-11 14:36:58 -04:00
|
|
|
|
2020-09-23 03:22:32 -04:00
|
|
|
{{- if .IsHome }}
|
|
|
|
{{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
|
2022-08-20 05:01:07 -04:00
|
|
|
{{- $pages = where $pages "Params.hiddenInHomeList" "!=" "true" }}
|
2021-03-30 08:37:36 -04:00
|
|
|
{{- end }}
|
2020-09-11 14:36:58 -04:00
|
|
|
|
2021-03-30 08:37:36 -04:00
|
|
|
{{- $paginator := .Paginate $pages }}
|
2021-02-10 10:47:40 -05:00
|
|
|
|
2022-03-27 09:14:06 -04:00
|
|
|
{{- if and .IsHome site.Params.homeInfoParams (eq $paginator.PageNumber 1) }}
|
2021-02-10 10:47:40 -05:00
|
|
|
{{- partial "home_info.html" . }}
|
|
|
|
{{- end }}
|
|
|
|
|
2021-03-30 08:37:36 -04:00
|
|
|
{{- $term := .Data.Term }}
|
2020-03-09 11:56:13 -04:00
|
|
|
{{- range $index, $page := $paginator.Pages }}
|
2019-03-31 08:32:06 -04:00
|
|
|
|
2020-03-09 13:50:02 -04:00
|
|
|
{{- $class := "post-entry" }}
|
2021-02-10 10:28:08 -05:00
|
|
|
|
2022-03-27 09:14:06 -04:00
|
|
|
{{- $user_preferred := or site.Params.disableSpecial1stPost site.Params.homeInfoParams }}
|
2021-02-10 10:28:08 -05:00
|
|
|
{{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) (not $user_preferred)) }}
|
2020-03-09 13:50:02 -04:00
|
|
|
{{- $class = "first-entry" }}
|
2020-10-10 10:04:13 -04:00
|
|
|
{{- else if $term }}
|
2020-03-09 13:50:02 -04:00
|
|
|
{{- $class = "post-entry tag-entry" }}
|
2020-03-09 11:56:13 -04:00
|
|
|
{{- end }}
|
2021-02-10 10:28:08 -05:00
|
|
|
|
2020-03-09 13:50:02 -04:00
|
|
|
<article class="{{ $class }}">
|
2022-03-27 09:14:06 -04:00
|
|
|
{{- $isHidden := (site.Params.cover.hidden | default site.Params.cover.hiddenInList) }}
|
2020-12-29 06:14:03 -05:00
|
|
|
{{- partial "cover.html" (dict "cxt" . "IsHome" true "isHidden" $isHidden) }}
|
2019-03-31 08:32:06 -04:00
|
|
|
<header class="entry-header">
|
2020-07-24 11:16:33 -04:00
|
|
|
<h2>
|
2021-03-30 08:37:36 -04:00
|
|
|
{{- .Title }}
|
2021-09-04 02:33:12 -04:00
|
|
|
{{- if .Draft }}<sup><span class="entry-isdraft"> [draft]</span></sup>{{- end }}
|
2020-07-24 11:16:33 -04:00
|
|
|
</h2>
|
2018-01-08 11:28:39 -05:00
|
|
|
</header>
|
2021-03-30 08:37:36 -04:00
|
|
|
{{- if (ne (.Param "hideSummary") true) }}
|
2022-04-19 11:03:05 -04:00
|
|
|
<div class="entry-content">
|
2021-03-30 08:37:36 -04:00
|
|
|
<p>{{ .Summary | plainify | htmlUnescape }}{{ if .Truncated }}...{{ end }}</p>
|
2022-04-19 11:03:05 -04:00
|
|
|
</div>
|
2020-09-23 03:22:32 -04:00
|
|
|
{{- end }}
|
2021-01-24 07:35:00 -05:00
|
|
|
{{- if not (.Param "hideMeta") }}
|
2019-03-31 08:32:06 -04:00
|
|
|
<footer class="entry-footer">
|
2020-10-20 09:08:29 -04:00
|
|
|
{{- partial "post_meta.html" . -}}
|
2018-01-08 11:28:39 -05:00
|
|
|
</footer>
|
2021-01-24 07:35:00 -05:00
|
|
|
{{- end }}
|
2020-09-06 12:16:58 -04:00
|
|
|
<a class="entry-link" aria-label="post link to {{ .Title | plainify }}" href="{{ .Permalink }}"></a>
|
2018-01-08 11:28:39 -05:00
|
|
|
</article>
|
2020-03-09 11:56:13 -04:00
|
|
|
{{- end }}
|
2019-03-31 08:32:06 -04:00
|
|
|
|
2020-03-09 11:56:13 -04:00
|
|
|
{{- if gt $paginator.TotalPages 1 }}
|
2019-03-31 08:32:06 -04:00
|
|
|
<footer class="page-footer">
|
2018-01-08 11:28:39 -05:00
|
|
|
<nav class="pagination">
|
2020-03-09 11:56:13 -04:00
|
|
|
{{- if $paginator.HasPrev }}
|
2022-08-15 09:55:55 -04:00
|
|
|
<a class="prev" href="{{ $paginator.Prev.URL | absURL }}">
|
|
|
|
« {{ i18n "prev_page" }}
|
|
|
|
{{- if (.Param "ShowPageNums") }}
|
|
|
|
{{- sub $paginator.PageNumber 1 }}/{{ $paginator.TotalPages }}
|
|
|
|
{{- end }}
|
|
|
|
</a>
|
2020-03-09 11:56:13 -04:00
|
|
|
{{- end }}
|
|
|
|
{{- if $paginator.HasNext }}
|
2022-08-15 09:55:55 -04:00
|
|
|
<a class="next" href="{{ $paginator.Next.URL | absURL }}">
|
|
|
|
{{- i18n "next_page" }}
|
|
|
|
{{- if (.Param "ShowPageNums") }}
|
|
|
|
{{- add 1 $paginator.PageNumber }}/{{ $paginator.TotalPages }}
|
|
|
|
{{- end }} »
|
|
|
|
</a>
|
2020-03-09 11:56:13 -04:00
|
|
|
{{- end }}
|
2018-01-08 11:28:39 -05:00
|
|
|
</nav>
|
|
|
|
</footer>
|
2020-03-09 11:56:13 -04:00
|
|
|
{{- end }}
|
2021-03-30 08:37:36 -04:00
|
|
|
|
|
|
|
{{- end }}{{/* end profileMode */}}
|
|
|
|
|
2021-02-10 10:28:08 -05:00
|
|
|
{{- end }}{{- /* end main */ -}}
|