diff options
author | Franck Cuny <franck@fcuny.net> | 2022-05-23 17:43:02 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2022-05-23 17:43:02 -0700 |
commit | 14a5a6d480f0c2d71b3f43b272e07c5ce769ad83 (patch) | |
tree | 33c9de5c9d5d2da8d0dc16302dfb9500717a490b /users/fcuny/blog/layouts/_default | |
parent | feat(tahoe): enable sourcegraph (diff) | |
parent | sign the drone configuration (diff) | |
download | world-14a5a6d480f0c2d71b3f43b272e07c5ce769ad83.tar.gz |
Merge remote-tracking branch 'blog/main' into fcuny/migrate-monorepo-blog
Diffstat (limited to 'users/fcuny/blog/layouts/_default')
-rw-r--r-- | users/fcuny/blog/layouts/_default/baseof.html | 11 | ||||
-rw-r--r-- | users/fcuny/blog/layouts/_default/list.html | 10 | ||||
-rw-r--r-- | users/fcuny/blog/layouts/_default/single.html | 54 |
3 files changed, 75 insertions, 0 deletions
diff --git a/users/fcuny/blog/layouts/_default/baseof.html b/users/fcuny/blog/layouts/_default/baseof.html new file mode 100644 index 0000000..410e2bc --- /dev/null +++ b/users/fcuny/blog/layouts/_default/baseof.html @@ -0,0 +1,11 @@ +<!doctype html> +<html lang="en"> + {{ partial "head.html" . }} + <body> + {{- partial "header.html" . -}} + <main> + {{ block "main" . }}{{ end }} + </main> + {{- partial "footer.html" . -}} + </body> +</html> diff --git a/users/fcuny/blog/layouts/_default/list.html b/users/fcuny/blog/layouts/_default/list.html new file mode 100644 index 0000000..d2c59a7 --- /dev/null +++ b/users/fcuny/blog/layouts/_default/list.html @@ -0,0 +1,10 @@ +{{ define "main" }} + +<article> + + {{ $pgs := where .Data.Pages "Params.hidden" "ne" "true" }} + {{ partial "postlist" $pgs }} + +</article> + +{{ end }} diff --git a/users/fcuny/blog/layouts/_default/single.html b/users/fcuny/blog/layouts/_default/single.html new file mode 100644 index 0000000..7a85a05 --- /dev/null +++ b/users/fcuny/blog/layouts/_default/single.html @@ -0,0 +1,54 @@ +{{ 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> + +{{ if .Params.toc }} +<div id="toc_small"> + <summary>Table of contents</summary> + {{ .TableOfContents }} +</div> +{{ end }} + +<article> +{{ .Content }} +</article> + +</div> + +{{ if .Params.toc }} +<div id="toc"> + <strong>Table of contents</strong> + {{ .TableOfContents }} +</div> +{{ end }} + +{{ end }} |