Add partials

This commit is contained in:
ItsDrike 2021-08-24 19:49:26 +02:00
parent 16103599b3
commit 9f753226f6
No known key found for this signature in database
GPG key ID: B5F6B41F708C3ADD
6 changed files with 52 additions and 11 deletions

View file

@ -0,0 +1,9 @@
{{ if not .Date.IsZero }}
<span title='{{ .Date.Format "January 2 2006" }}'>{{ .Date.Format "2006-01-02" }}</span>
{{ end }}
{{ if .Params.tags }}
{{ range $1, $e := .Params.tags }}
<a href="/tags/{{ urlize . }}">#{{ . }}</a>
{{ end }}
{{ end }}

View file

@ -0,0 +1,14 @@
<h1>{{ .Title }}</h1>
{{ if .IsPage }}
<p>{{ partial "content-details.html" . }}</p>
{{ end }}
<hr>
<div class="content">
{{ if .TableOfContents }}
<div class="content">
{{ .TableOfContents }}
</div>
{{ end }}
{{ .Content }}
</div>

View file

@ -0,0 +1,7 @@
<div class="media-body">
<a href="{{ .RelPermalink }}">
<h5>{{ .Title }}</h5>
</a>
<small>{{ partial "content-details.html" . }}</small>
<p>{{ partial "summary.html" . }}</p>
</div>

View file

@ -0,0 +1,5 @@
{{ if .Content }}
{{ .Summary | chomp }}{{ if .Truncated }}&hellip;{{ end }}
{{ else if .Params.subtitle }}
{{ .Params.subtitle | markdownify | emojify }}
{{ end }}