diff options
author | Michał Sapka <michal@sapka.me> | 2023-01-02 22:15:10 +0100 |
---|---|---|
committer | Michał Sapka <michal@sapka.me> | 2023-01-02 22:15:10 +0100 |
commit | 98c04aa1e19e9391a19daf903a024e7ebeaeb36b (patch) | |
tree | fbc4a9729a479331f0b33fb613250dad619c95ec /layouts/_default/single.html | |
parent | 679e6588d1ef6709f9e579f8ab2fa1b3ad2ac9d8 (diff) |
feat: blank based on memes
Diffstat (limited to 'layouts/_default/single.html')
-rw-r--r-- | layouts/_default/single.html | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..47ec310 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,33 @@ +{{ define "title" }} +{{ end }} + +{{ define "main" }} +{{ $imageUrl := .Params.image }} +{{ $image := resources.Get $imageUrl }} +{{ $image := $image.Resize "790x" }} +<img alt="{{ .Params.title }}" src="{{ $image.Permalink }}" width={{ $image.Width }} height={{ $image.Height }}/><BR/> +<hr/> +added on {{ .PublishDate.Format "January 2, 2006" }} +{{- if isset .Params "tags" -}} + {{- $tagsLen := len .Params.tags -}} + {{- if gt $tagsLen 0 -}} + with tags: + {{- range $k, $v := .Params.tags -}} + {{- $url := printf "tags/%s" (. | urlize | lower) -}} + <a href="{{ $url | absURL }}"> {{ . | title }}</a> + {{- if lt $k (sub $tagsLen 1) }} · {{ end -}} + {{- end -}} + </div> + {{- end -}} +{{- end }} +<hr/> + +{{ if or .Next .Prev -}} +<div> + {{- with .Prev }} <a class="prev-link" href="{{ .RelPermalink}}"> ← Previous</a> {{ end -}} + {{- with .Next -}}<a class="next-link" href="{{ .RelPermalink}}">Next →</a> {{ end -}} +</div> +{{ end -}} + +{{ end }} + |