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">
|
|
|
|
<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="content">
|
2019-01-26 23:20:29 -05:00
|
|
|
{{ .Content | replaceRE "(<h[1-6] id=\"([^\"]+)\".+)(</h[1-6]+>)" `${1}<a href="#${2}" class="anchor" aria-hidden="true"><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"><path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path><line x1="8" y1="12" x2="16" y2="12"></line></svg></a>${3}` | safeHTML }}
|
2018-10-23 01:15:50 -04:00
|
|
|
</div>
|
2019-06-21 01:15:53 -04:00
|
|
|
{{- if .Site.Params.relatedPosts }}
|
|
|
|
{{- partial "related-posts.html" . -}}
|
|
|
|
{{- end }}
|
2018-10-23 01:15:50 -04:00
|
|
|
<hr class="post-end">
|
|
|
|
<footer class="post-info">
|
2019-09-08 09:27:52 -04:00
|
|
|
{{- with $.Param "author" }}
|
|
|
|
<p><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-feather"><path d="M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z"></path><line x1="16" y1="8" x2="2" y2="22"></line><line x1="17.5" y1="15" x2="9" y2="15"></line></svg>{{ . }}</p>
|
|
|
|
{{- end }}
|
2018-10-23 01:15:50 -04:00
|
|
|
{{- with .Params.tags }}
|
|
|
|
<p>
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-tag meta-icon"><path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"></path><line x1="7" y1="7" x2="7" y2="7"></line></svg>
|
|
|
|
{{- range . -}}
|
|
|
|
<span class="tag"><a href="{{ "tags/" | absURL }}{{ . | urlize }}">{{.}}</a></span>
|
|
|
|
{{- end }}
|
|
|
|
</p>
|
|
|
|
{{- end }}
|
2018-12-14 02:17:48 -05:00
|
|
|
<p><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file-text"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>{{ i18n "wordCount" . }}</p>
|
2018-10-23 01:15:50 -04:00
|
|
|
<p><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-calendar"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>{{ dateFormat .Site.Params.dateformNumTime .Date.Local }}</p>
|
2019-01-18 23:15:54 -05:00
|
|
|
{{- if and .GitInfo .Site.Params.gitUrl }}
|
2018-10-23 01:15:50 -04:00
|
|
|
<p><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-git-commit"><circle cx="12" cy="12" r="4"></circle><line x1="1.05" y1="12" x2="7" y2="12"></line><line x1="17.01" y1="12" x2="22.96" y2="12"></line></svg><a href="{{ .Site.Params.gitUrl -}}{{ .GitInfo.Hash }}" target="_blank" rel="noopener">{{ .GitInfo.AbbreviatedHash }}</a> @ {{ dateFormat .Site.Params.dateformNum .GitInfo.AuthorDate.Local }}</p>
|
|
|
|
{{- end }}
|
|
|
|
</footer>
|
|
|
|
</article>
|
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 }}">
|
2018-12-14 02:17:48 -05:00
|
|
|
<span class="post-nav-label"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline></svg> {{ 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 }}">
|
2018-12-14 02:17:48 -05:00
|
|
|
<span class="post-nav-label">{{ i18n "older" }} <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg></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" . }}
|
2018-12-11 11:02:36 -05:00
|
|
|
{{ end }}
|