From b1efd00585f84abc397a040852b67c31d36d177d44367a7581afd3e4389b6fd2 Mon Sep 17 00:00:00 2001 From: Nicholas Johnson Date: Thu, 28 Apr 2022 00:00:00 +0000 Subject: Initial commit --- layouts/_default/baseof.html | 11 +++++++++++ layouts/_default/single.html | 8 ++++++++ layouts/index.atom.xml | 33 +++++++++++++++++++++++++++++++++ layouts/index.html | 14 ++++++++++++++ layouts/partials/footer.html | 4 ++++ layouts/partials/head.html | 9 +++++++++ layouts/partials/header.html | 3 +++ layouts/partials/metadata.html | 9 +++++++++ 8 files changed, 91 insertions(+) create mode 100644 layouts/_default/baseof.html create mode 100644 layouts/_default/single.html create mode 100644 layouts/index.atom.xml create mode 100644 layouts/index.html create mode 100644 layouts/partials/footer.html create mode 100644 layouts/partials/head.html create mode 100644 layouts/partials/header.html create mode 100644 layouts/partials/metadata.html (limited to 'layouts') diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..7bfd004 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,11 @@ + + + {{ partial "head.html" . }} + + {{ partial "header.html" . }} + + {{ block "main" . }}{{ end }} + + {{ partial "footer.html" . }} + + diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..7c58c1a --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,8 @@ +{{ define "main" }} + + + {{ .Content }} + +{{ end }} diff --git a/layouts/index.atom.xml b/layouts/index.atom.xml new file mode 100644 index 0000000..7cb8ae6 --- /dev/null +++ b/layouts/index.atom.xml @@ -0,0 +1,33 @@ +{{ $pctx := . }} +{{- if .IsHome }}{{ $pctx = .Site }}{{ end }} +{{- $pages := slice }} +{{- if or $.IsHome $.IsSection }} +{{- $pages = $pctx.RegularPages }} +{{- else }} +{{- $pages = $pctx.Pages }} +{{- end }} +{{- $limit := .Site.Config.Services.RSS.Limit }} +{{- if ge $limit 1 }} +{{- $pages = $pages | first $limit }} +{{- end -}} + + {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }} + + {{ if not .Date.IsZero }} + {{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}{{ end }} + {{ .Permalink }} + + {{ $.Site.Author.name }} + {{ $.Site.Author.email }} + + Hugo -- gohugo.io{{ range $pages }} + + {{ `<![CDATA[` | safeHTML }}{{ .Title }}]]> + + {{ .Permalink }} + {{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }} + {{- if .Content }} + {{ ` + {{- end }} + {{ end }} + diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..38c3c81 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,14 @@ +{{ define "main" }} +

{{ .Site.Params.indexTitle }}

+

{{ .Site.Params.indexIntro }}

+

Navigation Links

+ +

Journal Entries

+{{ partial "metadata.html" . }} +{{ end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..673e170 --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,4 @@ + diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..2e5db26 --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,9 @@ + + + + + + + + {{ $.Site.Title }} + diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..391a013 --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,3 @@ +
+
{{ $.Site.Params.logo }}
+
diff --git a/layouts/partials/metadata.html b/layouts/partials/metadata.html new file mode 100644 index 0000000..36ae6fb --- /dev/null +++ b/layouts/partials/metadata.html @@ -0,0 +1,9 @@ +{{ range (where .Site.RegularPages.ByTitle "Section" "post").ByPublishDate.Reverse }} +{{ $dateFormat := .Site.Params.dateFormat | default "2 Jan 2006" }} +
+
+

{{ .PublishDate.Format $dateFormat }} - {{ .ReadingTime }} minute read
+ {{ .Title }}

+
+
+{{ end }} -- cgit v1.2.3