summaryrefslogtreecommitdiffstats
path: root/layouts/blog
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2022-01-03 20:41:21 +0000
committerMatthew Lemon <lemon@matthewlemon.com>2022-01-03 20:41:21 +0000
commit47932676235b90cdf033c31fdc62d52cfed7f168 (patch)
treec65c014cf22074049801f5616cfd40c7cf7cd12c /layouts/blog
parentf4b565e1221c6efe22b89b23c018a0b7215181ff (diff)
better stuff with templates
Diffstat (limited to 'layouts/blog')
-rw-r--r--layouts/blog/li.html24
-rw-r--r--layouts/blog/single.html4
2 files changed, 26 insertions, 2 deletions
diff --git a/layouts/blog/li.html b/layouts/blog/li.html
new file mode 100644
index 0000000..cb44e71
--- /dev/null
+++ b/layouts/blog/li.html
@@ -0,0 +1,24 @@
+<style>
+ #cat-category {
+ font-size: small;
+ color: red;
+ }
+ #vim-category {
+ font-size: small;
+ color: #2abb01;
+ }
+</style>
+
+<li>
+ <a href="{{ .Permalink }}">
+ {{ .Title }}
+ {{ if isset .Params "category" }}
+ {{ if eq .Params.Category "cats" }}
+ <span id="cat-category">[{{ lower .Params.Category }}]</span>
+ {{ else if (eq .Params.Category "vim") }}
+ <span id="vim-category">[{{ lower .Params.Category }}]</span>
+ {{ end }}
+ {{ end }}
+ <small><time>{{ .Date.Format "2 Jan, 2006" }}</time></small>
+ </a>
+</li>
diff --git a/layouts/blog/single.html b/layouts/blog/single.html
index a89da2b..698be33 100644
--- a/layouts/blog/single.html
+++ b/layouts/blog/single.html
@@ -5,9 +5,9 @@
<div>
{{- if isset .Params "date" -}}
{{ if eq .Lastmod .Date }}
- <time>{{ .Date.Format "Monday 2 Jan 2006" }}</time>
+ <time>{{ .Date.Format "Monday 2 Jan, 2006" }}</time>
{{ else }}
- Updated <time>{{ .Lastmod.Format "January 2, 2006" }}</time>
+ Updated <time>{{ .Lastmod.Format "Monday 2 Jan, 2006" }}</time>
{{ end }}
{{- end -}}
</div>