2019-01-01 04:53:20 -05:00
|
|
|
{{ define "head" }}
|
2019-01-03 05:25:14 -05:00
|
|
|
{{ if .Params.featuredImg -}}
|
2019-01-07 07:39:51 -05:00
|
|
|
<style>.bg-img {background-image: url('{{.Params.featuredImg}}');}</style>
|
2019-01-01 04:53:20 -05:00
|
|
|
{{- else if .Params.images -}}
|
|
|
|
{{- range first 1 .Params.images -}}
|
2019-01-03 05:25:14 -05:00
|
|
|
<style>.bg-img {background-image: url('{{. | absURL}}');}</style>
|
2019-01-01 04:53:20 -05:00
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{ end }}
|
|
|
|
|
2018-10-23 01:15:50 -04:00
|
|
|
{{ define "header" }}
|
|
|
|
{{ partial "header.html" . }}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ define "main" }}
|
2019-01-01 04:53:20 -05:00
|
|
|
{{- if (or .Params.images .Params.featuredImg) }}
|
|
|
|
<div class="bg-img"></div>
|
2018-12-31 07:03:32 -05:00
|
|
|
{{- end }}
|
2018-10-23 01:15:50 -04:00
|
|
|
<main class="site-main section-inner animated fadeIn faster">
|
2023-10-28 12:55:23 -04:00
|
|
|
{{- if and (not (eq .Site.Params.legacyLayout nil)) (.Site.Params.legacyLayout) -}}
|
2018-10-23 01:15:50 -04:00
|
|
|
<article class="thin">
|
|
|
|
<header class="post-header">
|
|
|
|
<div class="post-meta"><span>{{ .Date.Format .Site.Params.dateform }}</span></div>
|
|
|
|
<h1>{{ .Title }}</h1>
|
|
|
|
</header>
|
2023-10-28 12:55:23 -04:00
|
|
|
<div class="content">
|
2023-11-12 10:26:10 -05:00
|
|
|
{{ .Content | replaceRE "(<h[1-6] id=\"([^\"]+)\".+)(</h[1-6]+>)" `${1}<a href="#${2}" class="anchor" aria-hidden="true">{{- partial "svg.html" (dict "context" . "name" "content-anchor") -}}</a>${3}` | safeHTML }}
|
2023-08-06 09:16:12 -04:00
|
|
|
</div>
|
2023-10-28 12:55:23 -04:00
|
|
|
{{- if .Site.Params.relatedPosts }}
|
|
|
|
{{- partial "related-posts.html" . -}}
|
|
|
|
{{- end }}
|
|
|
|
<hr class="post-end">
|
2023-10-29 02:35:27 -04:00
|
|
|
<footer class="post-info">{{- partial "posts_single_info.html" . -}}</footer>
|
2023-10-28 12:55:23 -04:00
|
|
|
</article>
|
|
|
|
{{- else -}}
|
|
|
|
<article class="thin">
|
|
|
|
<header class="post-header">
|
|
|
|
<div class="post-meta"><span>{{ .Date.Format .Site.Params.dateform }}</span></div>
|
|
|
|
<h1>{{ .Title }}</h1>
|
|
|
|
</header>
|
|
|
|
<div class="post-info">{{- partial "posts_single_info.html" . -}}</div>
|
2023-08-06 09:16:12 -04:00
|
|
|
<hr class="post-end">
|
|
|
|
<div class="content">
|
2023-11-12 10:26:10 -05:00
|
|
|
{{ .Content | replaceRE "(<h[1-6] id=\"([^\"]+)\".+)(</h[1-6]+>)" `${1}<a href="#${2}" class="anchor" aria-hidden="true">{{- partial "svg.html" (dict "context" . "name" "content-anchor") -}}</a>${3}` | safeHTML }}
|
2023-08-06 09:16:12 -04:00
|
|
|
</div>
|
|
|
|
{{- if .Site.Params.relatedPosts }}
|
|
|
|
{{- partial "related-posts.html" . -}}
|
|
|
|
{{- end }}
|
2018-10-23 01:15:50 -04:00
|
|
|
</article>
|
2023-10-28 12:55:23 -04:00
|
|
|
{{- end -}}
|
2018-12-24 09:17:22 -05:00
|
|
|
{{- if .Params.toc }}
|
|
|
|
<aside id="toc">
|
2018-12-24 09:56:07 -05:00
|
|
|
<div class="toc-title">{{ i18n "tableOfContents" }}</div>
|
2018-12-24 09:17:22 -05:00
|
|
|
{{ .TableOfContents }}
|
|
|
|
</aside>
|
|
|
|
{{- end }}
|
2018-10-23 01:15:50 -04:00
|
|
|
<div class="post-nav thin">
|
|
|
|
{{- with .NextInSection }}
|
|
|
|
<a class="next-post" href="{{ .Permalink }}">
|
2023-11-12 10:26:10 -05:00
|
|
|
<span class="post-nav-label">{{- partial "svg.html" (dict "context" . "name" "next") -}} {{ i18n "newer" }}</span><br><span>{{ .Title }}</span>
|
2018-10-23 01:15:50 -04:00
|
|
|
</a>
|
|
|
|
{{- end }}
|
|
|
|
{{- with .PrevInSection }}
|
|
|
|
<a class="prev-post" href="{{ .Permalink }}">
|
2023-11-12 10:26:10 -05:00
|
|
|
<span class="post-nav-label">{{ i18n "older" }} {{- partial "svg.html" (dict "context" . "name" "previous") -}}</span><br><span>{{ .Title }}</span>
|
2018-10-23 01:15:50 -04:00
|
|
|
</a>
|
|
|
|
{{- end }}
|
|
|
|
</div>
|
2018-12-29 22:06:38 -05:00
|
|
|
<div id="comments" class="thin">
|
2018-12-31 07:03:32 -05:00
|
|
|
{{- partial "comments.html" . -}}
|
2018-12-11 00:41:01 -05:00
|
|
|
</div>
|
2018-10-23 01:15:50 -04:00
|
|
|
</main>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ define "footer" }}
|
|
|
|
{{ partialCached "footer.html" . }}
|
2023-08-06 09:16:12 -04:00
|
|
|
{{ end }}
|