summaryrefslogtreecommitdiff
path: root/layouts/_default/single.html
diff options
context:
space:
mode:
authorMichał Sapka <michal@sapka.me>2023-01-02 22:15:10 +0100
committerMichał Sapka <michal@sapka.me>2023-01-02 22:15:10 +0100
commit98c04aa1e19e9391a19daf903a024e7ebeaeb36b (patch)
treefbc4a9729a479331f0b33fb613250dad619c95ec /layouts/_default/single.html
parent679e6588d1ef6709f9e579f8ab2fa1b3ad2ac9d8 (diff)
feat: blank based on memes
Diffstat (limited to 'layouts/_default/single.html')
-rw-r--r--layouts/_default/single.html33
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 -}}
+ &nbsp;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) }} &middot; {{ end -}}
+ {{- end -}}
+ </div>
+ {{- end -}}
+{{- end }}
+<hr/>
+
+{{ if or .Next .Prev -}}
+<div>
+ {{- with .Prev }} <a class="prev-link" href="{{ .RelPermalink}}"> &#8592; Previous</a> {{ end -}}
+ {{- with .Next -}}<a class="next-link" href="{{ .RelPermalink}}">Next &#8594;</a> {{ end -}}
+</div>
+{{ end -}}
+
+{{ end }}
+