website/layouts/blog/single.html
2023-03-15 14:29:23 +01:00

34 lines
1.1 KiB
HTML

{{- define "stylesheet" -}}
{{- $style := resources.Get "/scss/blog.scss" | resources.ToCSS (dict "outputStyle" "compressed") -}}
<link rel="preload stylesheet" as="style" href="{{ $style.Permalink }}" type="text/css" media="screen" />
{{- end -}}
{{- define "header" }}
<header id="blog-header">
<h1 class="title">{{ .Title }}</h1>
<p title="{{ .Date | time.Format "2. January 2006, 15:04 MST" }}">{{ .Date | time.Format "2. January 2006" }}</p>
</header>
{{ end }}
{{- define "main" }}
<main>
{{ .Content -}}
<aside>
{{- with .Params.topics }}
<ul class="topics">
{{- range . }}
<li>
<a href="{{ "topics" | relURL}}/{{ . | urlize }}">{{ . }}</a>
</li>
{{ end }}
</ul>
{{- end }}
{{- with .Params.tags }}
tags
{{- range . }}
<a href='{{ "tags" | relURL }}/{{ . | urlize }}'>{{ . }}</a>
{{- end }}
{{- end }}
</aside>
</main>
{{- end }}