about summary refs log tree commit diff
path: root/users/fcuny/notes/layouts/_default/single.html
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-05-23 19:32:36 -0700
committerFranck Cuny <franck@fcuny.net>2022-05-23 19:32:36 -0700
commit69fb19cd967ac301efba635fea9f31bf203cf0cb (patch)
tree8423069a26e5c8c845b0bbe58d2c2ea59a7ac6eb /users/fcuny/notes/layouts/_default/single.html
parentref(blog): remove unneeded files for the blog (diff)
parentdelete Makefile (diff)
downloadworld-69fb19cd967ac301efba635fea9f31bf203cf0cb.tar.gz
Merge remote-tracking branch 'notes/main'
Diffstat (limited to 'users/fcuny/notes/layouts/_default/single.html')
-rw-r--r--users/fcuny/notes/layouts/_default/single.html40
1 files changed, 40 insertions, 0 deletions
diff --git a/users/fcuny/notes/layouts/_default/single.html b/users/fcuny/notes/layouts/_default/single.html
new file mode 100644
index 0000000..7f594ad
--- /dev/null
+++ b/users/fcuny/notes/layouts/_default/single.html
@@ -0,0 +1,40 @@
+{{ define "main" }}
+
+<div>
+
+<h1>{{ .Title }}</h1>
+
+<div id="meta">
+  {{- $pub := .Date.Format "Jan 2, 2006" -}}
+  {{- $mod := "" -}}
+  {{- if (not .GitInfo) }}
+  {{- $mod = .Lastmod.Format "Jan 2, 2006" -}}
+  {{ else }}
+  {{- $mod = .Page.GitInfo.CommitDate.Format "Jan 2, 2006" -}}
+  {{ end -}}
+  {{ if eq $pub $mod }}
+  <div id="meta_date">published {{ $pub }}</div>
+  {{ else }}
+  <div id="meta_date">published {{ $pub }} - last modified {{ $mod }}</div>
+  {{ end }}
+  {{ if .Params.tags }}
+  <div>
+  {{ if eq (len .Params.tags) 1 }}
+  tag:
+  {{ else }}
+  tags:
+  {{ end }}
+  {{ range $idx, $tag := .Params.tags }}
+  <span id="meta_tags"><a href="/tags/{{ $tag | urlize }}/">{{ $tag }}</a></span>
+  {{ end }}
+  </div>
+  {{ end }}
+</div>
+
+<article>
+{{ .Content }}
+</article>
+
+</div>
+
+{{ end }}