diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2023-08-27 01:36:12 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2023-08-27 01:36:12 +0530 |
commit | 77d4a98a666ef6c2c18c10f2f2d62210f9eeb752 (patch) | |
tree | 11c75334b682009ff015a0fcd2e8eddc7eb4d315 /layouts/_default |
first commit
Diffstat (limited to 'layouts/_default')
-rw-r--r-- | layouts/_default/baseof.html | 16 | ||||
-rw-r--r-- | layouts/_default/list.html | 13 | ||||
-rw-r--r-- | layouts/_default/single.html | 3 |
3 files changed, 32 insertions, 0 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..9bc0b22 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<html> + {{- partial "head.html" . -}} + <body> + {{ if ne .Kind "home" }} + <!-- don't show header on index.html --> + {{- partial "header.html" . -}} + {{ end }} + + <main id="site-{{ if eq .Kind "home" }}home{{ else }}{{ .Section }}{{ end }}-page"> + {{- block "main" . }}{{- end }} + </main> + + {{- partial "footer.html" . -}} + </body> +</html> diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..5ecbbe0 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,13 @@ +{{ define "main" }} + <div id="{{.Section}}-list"> + <h1>{{ if .Params.heading }}{{ .Params.heading }}{{ else }}{{ .Title }}{{ end }}</h1> + + {{ .Content }} + + {{ range (union .Sections .Pages).ByDate.Reverse }} + <p> + <a href="{{ .RelPermalink }}">{{ .Title }}</a> + </p> + {{ end }} + </div> +{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..e0e8308 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,3 @@ +{{ define "main" }} + {{ .Content }} +{{ end }} |