2019-01-28 03:11:02 +03:00
|
|
|
{{ define "main" }}
|
2019-03-31 20:28:38 +03:00
|
|
|
<div class="post">
|
|
|
|
<h1 class="post-title">
|
|
|
|
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
|
|
|
|
<div class="post-meta">
|
2019-06-09 12:59:20 +03:00
|
|
|
{{ if .Params.Date }}
|
2019-03-31 20:28:38 +03:00
|
|
|
<span class="post-date">
|
|
|
|
{{ .Date.Format "2006-01-02" }}
|
|
|
|
</span>
|
2019-06-09 12:59:20 +03:00
|
|
|
{{ end }}
|
2019-03-31 20:28:38 +03:00
|
|
|
{{ with .Params.Author }}
|
|
|
|
<span class="post-author">::
|
|
|
|
{{ . }}
|
|
|
|
</span>
|
2019-01-28 03:11:02 +03:00
|
|
|
{{ end }}
|
2019-03-31 20:28:38 +03:00
|
|
|
</div>
|
2019-01-28 03:11:02 +03:00
|
|
|
|
2019-03-31 20:28:38 +03:00
|
|
|
{{ if .Params.tags }}
|
|
|
|
<span class="post-tags">
|
|
|
|
{{ range .Params.tags }}
|
2019-04-05 09:18:21 +03:00
|
|
|
#<a href="{{ (urlize (printf "tags/%s/" .)) | absLangURL }}">{{ . }}</a>
|
2019-01-28 03:11:02 +03:00
|
|
|
{{ end }}
|
2019-03-31 20:28:38 +03:00
|
|
|
</span>
|
|
|
|
{{ end }}
|
2019-01-28 03:11:02 +03:00
|
|
|
|
2019-03-31 20:28:38 +03:00
|
|
|
{{ with .Params.Cover }}
|
|
|
|
<img src="{{ . | absURL }}" class="post-cover" />
|
|
|
|
{{ end }}
|
2019-03-31 20:18:08 +03:00
|
|
|
|
2019-03-31 20:28:38 +03:00
|
|
|
<div class="post-content">
|
2020-01-17 15:11:41 +03:00
|
|
|
{{- with .Content -}}
|
|
|
|
<div>
|
2020-01-23 22:56:58 +03:00
|
|
|
{{ . | replaceRE "(<h[1-9] id=\"([^\"]+)\".+)(</h[1-9]+>)" `${1}<a href="#${2}" class="hanchor" ariaLabel="Anchor"> ⌗</a> ${3}` | safeHTML }}
|
2020-01-17 15:11:41 +03:00
|
|
|
</div>
|
|
|
|
{{- end -}}
|
2019-01-28 03:11:02 +03:00
|
|
|
</div>
|
2019-03-31 20:28:38 +03:00
|
|
|
{{ if or .NextInSection .PrevInSection }}
|
|
|
|
<div class="pagination">
|
|
|
|
<div class="pagination__title">
|
|
|
|
<span
|
|
|
|
class="pagination__title-h">{{ $.Site.Params.ReadOtherPosts }}</span>
|
|
|
|
<hr />
|
|
|
|
</div>
|
|
|
|
<div class="pagination__buttons">
|
|
|
|
{{ if .NextInSection }}
|
|
|
|
<span class="button previous">
|
|
|
|
<a href="{{ .NextInSection.Permalink }}">
|
|
|
|
<span class="button__icon">←</span>
|
|
|
|
<span class="button__text">{{ .NextInSection.Title }}</span>
|
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
{{ end }}
|
|
|
|
{{ if .PrevInSection }}
|
|
|
|
<span class="button next">
|
|
|
|
<a href="{{ .PrevInSection.Permalink }}">
|
|
|
|
<span class="button__text">{{ .PrevInSection.Title }}</span>
|
|
|
|
<span class="button__icon">→</span>
|
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ partial "comments.html" . }}
|
|
|
|
</div>
|
2019-01-28 03:11:02 +03:00
|
|
|
{{ end }}
|