website/layouts/_default/single.html

32 lines
1,022 B
HTML
Raw Permalink Normal View History

2023-01-15 00:24:10 +01:00
{{- define "stylesheet" -}}
2023-01-15 01:03:14 +01:00
{{- $style := resources.Get "/scss/default.scss" | resources.ToCSS (dict "outputStyle" "compressed") -}}
2023-01-15 00:24:10 +01:00
<link rel="preload stylesheet" as="style" href="{{ $style.Permalink }}" type="text/css" media="screen" />
{{- end -}}
{{- define "main" }}
<main>
{{- if eq .Params.type "post" }}
2022-12-24 14:59:52 +01:00
<p class="date-published" title="{{ .Date | time.Format "2. January 2006, 15:04 MST" }}">{{ .Date | time.Format "2. January 2006" }}</p>
{{- end }}
<h1 class="title">{{ .Title }}</h1>
{{ .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 }}