diff options
Diffstat (limited to '')
-rw-r--r-- | users/fcuny/notes/layouts/_default/single.html | 27 | ||||
-rw-r--r-- | users/fcuny/notes/static/css/custom.css | 16 |
2 files changed, 42 insertions, 1 deletions
diff --git a/users/fcuny/notes/layouts/_default/single.html b/users/fcuny/notes/layouts/_default/single.html index a8c1dc7..0ab5e35 100644 --- a/users/fcuny/notes/layouts/_default/single.html +++ b/users/fcuny/notes/layouts/_default/single.html @@ -4,7 +4,32 @@ <h1>{{ .Title }}</h1> -<p><span class="published">{{ .Date.Format "January 2021" }}</span></p> +<div class="meta"> + {{- $pub := .Date.Format "2006-01-02" -}} + {{- $mod := "" -}} + {{- if (not .GitInfo) }} + {{- $mod = .Lastmod.Format "2006-01-02" -}} + {{ else }} + {{- $mod = .Page.GitInfo.CommitDate.Format "2006-01-02" -}} + {{ end -}} + {{ if eq $pub $mod }} + <div class="meta_date">published {{ $pub }}</div> + {{ else }} + <div class="meta_date">published {{ $pub }}, last modified {{ $mod }}</div> + {{ end }} + {{ if .Params.tags }} + <div> + {{ if eq (len .Params.tags) 1 }} + in tag + {{ else }} + in tags + {{ end }} + {{ range $idx, $tag := .Params.tags }} + <span class="meta_tags"><a href="/tags/{{ $tag | urlize }}/">{{ $tag }}</a></span> + {{ end }} + </div> + {{ end }} +</div> {{ .Content }} diff --git a/users/fcuny/notes/static/css/custom.css b/users/fcuny/notes/static/css/custom.css index b0ec570..9d4faf1 100644 --- a/users/fcuny/notes/static/css/custom.css +++ b/users/fcuny/notes/static/css/custom.css @@ -53,3 +53,19 @@ pre { font-family: "Roboto Mono", Monaco, "Lucida Console", monospace; overflow: scroll; } + +.tags { + background-color: #eeeeee; + border-radius:8px; + padding:0 .5rem; + font-size: 90%; +} + +.meta_tags a:link, +.meta_tags a:visited { + text-decoration: none; +} + +.meta_date { + font-style: italic; +} |