~{{ .FuzzyWordCount | lang.FormatNumberCustom 0 }} words
-
Published: {{ .PublishDate.Format "January 2" }}{{ if in (slice 1 21 31) .PublishDate.Day}}st{{ else if in (slice 2 22) .PublishDate.Day}}nd{{ else if in (slice 3 23) .PublishDate.Day}}rd{{ else }}th{{ end }}, 1{{ .PublishDate.Format "2006" | lang.FormatNumberCustom 0 }} HE
-
Last modified: {{ .Lastmod.Format "January 2" }}{{ if in (slice 1 21 31) .Lastmod.Day}}st{{ else if in (slice 2 22) .Lastmod.Day}}nd{{ else if in (slice 3 23) .Lastmod.Day}}rd{{ else }}th{{ end }}, 1{{ .Lastmod.Format "2006" | lang.FormatNumberCustom 0 }} HE
-
- {{ $post_age_in_years := math.Round ( div ( div ( now.Sub .PublishDate ).Hours 24 ) 365 ) }}
- {{ if ( or .Params.site .Params.controversial ( gt $post_age_in_years 2 ) ) }}
-
- {{ end }}
-
- {{ if .Params.notes }}
-
- {{ end }}
-
- {{ if and ( .TableOfContents ) ( ne .TableOfContents "" ) }}
-
- {{ end }}
-
+ {{ partial "single/main-header.html" ( dict "pc" . "sc" $ ) }}
{{ end }}
{{ define "main-body" }}
@@ -128,37 +78,51 @@
{{- if ( or .Params.internal_links .Params.external_links ) -}}
{{- with .Params.internal_links -}}
-
Internal Links
-
- {{- range . -}}
- {{ if eq ( printf "%T" . ) "map[string]interface {}" }}
-
+{{- else -}}
+ {{ $.sc.Site.Params.Author.name }}
+{{- end -}}
+
diff --git a/layouts/partials/single/main-header/dates.html b/layouts/partials/single/main-header/dates.html
new file mode 100644
index 0000000..b03e81c
--- /dev/null
+++ b/layouts/partials/single/main-header/dates.html
@@ -0,0 +1,58 @@
+{{- /*
+ Displays dates for an item.
+
+ @params publishDate The date an item was published.
+ @params lastmodDate The date an item was last modified.
+ */
+-}}
+
+{{ $publishDate := .publishDate }}
+{{ $lastmodDate := .lastmodDate }}
+
+
+
+ Published:
+
+
+
+
+ Last modified:
+
+
diff --git a/layouts/partials/single/main-header/item-tile.html b/layouts/partials/single/main-header/item-tile.html
new file mode 100644
index 0000000..529c870
--- /dev/null
+++ b/layouts/partials/single/main-header/item-tile.html
@@ -0,0 +1,70 @@
+{{- /*
+ Renders the header tile for an item.
+
+ @params pc The page context.
+ @params sc The site context.
+*/ -}}
+
+{{- if ( not ( isset . "sc" ) ) -}}
+ {{- errorf "No site context received" -}}
+{{- end -}}
+
+{{- if ( not ( isset . "pc" ) ) -}}
+ {{- errorf "No page context received (%q)" .sc.Page.File.Dir -}}
+{{- end -}}
+
+{{ with .pc.Params.featured_image }}
+
+{{ end }}
+
+
+
+
+
+
+
+ {{- .pc.Title | safeHTML -}}
+
+ {{ with .pc.Params.subtitle }}
+
{{ . | safeHTML }}
+ {{ end }}
+
+
+
+ {{ with ( .pc.Resources.GetMatch .pc.Params.featured_image ) }}
+
diff --git a/layouts/partials/single/main-header/notes.html b/layouts/partials/single/main-header/notes.html
new file mode 100644
index 0000000..17d0771
--- /dev/null
+++ b/layouts/partials/single/main-header/notes.html
@@ -0,0 +1,16 @@
+{{- /*
+ Renders the notes for an item.
+
+ @params note The notes for an item.
+ @params sc Site context.
+ */
+-}}
+
+
+
diff --git a/layouts/partials/single/main-header/series.html b/layouts/partials/single/main-header/series.html
new file mode 100644
index 0000000..372ef6c
--- /dev/null
+++ b/layouts/partials/single/main-header/series.html
@@ -0,0 +1,18 @@
+{{- /*
+ Renders the series of an item.
+
+ @params series A list of series' for the item.
+ */
+-}}
+
+
+
+ Part of series:
+ {{ range .series }}
+ {{ .LinkTitle }}
+ {{ end }}
+
diff --git a/layouts/partials/single/main-header/toc.html b/layouts/partials/single/main-header/toc.html
new file mode 100644
index 0000000..1da4e9e
--- /dev/null
+++ b/layouts/partials/single/main-header/toc.html
@@ -0,0 +1,34 @@
+{{- /*
+ Renders appendices and corrigenda for an item.
+
+ @params toc The page ToC.
+ @params appendices The item's appendices. Optional.
+ @params fileDir The file folder name.
+ */
+-}}
+
+{{ $empty_toc_html := "" }}
+
+{{ if and ( .toc ) ( ne .toc $empty_toc_html ) }}
+
+{{ end }}
diff --git a/layouts/partials/single/main-header/warnings.html b/layouts/partials/single/main-header/warnings.html
new file mode 100644
index 0000000..5a2d3a2
--- /dev/null
+++ b/layouts/partials/single/main-header/warnings.html
@@ -0,0 +1,33 @@
+{{- /*
+ Renders the automatic warnings for an item.
+
+ @params pc The page context.
+ */
+-}}
+
+{{ $post_age_in_years := math.Round ( div ( div ( now.Sub .pc.PublishDate ).Hours 24 ) 365 ) }}
+
+{{ if ( or .pc.Params.site .pc.Params.controversial ( gt $post_age_in_years 2 ) ) }}
+
+{{ end }}
diff --git a/layouts/partials/single/main-header/word-count.html b/layouts/partials/single/main-header/word-count.html
new file mode 100644
index 0000000..64283c5
--- /dev/null
+++ b/layouts/partials/single/main-header/word-count.html
@@ -0,0 +1,9 @@
+{{- /*
+ Displays the length of an item.
+
+ @params wordCount The wordcount of an item.
+ */
+-}}
+
+
+
~{{ .wordCount | lang.FormatNumberCustom 0 }} words
diff --git a/layouts/partials/single/post-meta.html b/layouts/partials/single/post-meta.html
new file mode 100644
index 0000000..1d874ca
--- /dev/null
+++ b/layouts/partials/single/post-meta.html
@@ -0,0 +1,36 @@
+{{- /*
+ Displays the meta information for an item.
+
+ @params pc Page context
+ @params sc Site context
+ */
+-}}
+
+
+
diff --git a/layouts/partials/single/post-meta/categories.html b/layouts/partials/single/post-meta/categories.html
new file mode 100644
index 0000000..6060030
--- /dev/null
+++ b/layouts/partials/single/post-meta/categories.html
@@ -0,0 +1,21 @@
+{{- /*
+ Displays the categories for an item.
+
+ @params categories The item's categories.
+ */
+-}}
+
+
+
+
+
diff --git a/layouts/partials/single/post-meta/life-areas.html b/layouts/partials/single/post-meta/life-areas.html
new file mode 100644
index 0000000..ac7110e
--- /dev/null
+++ b/layouts/partials/single/post-meta/life-areas.html
@@ -0,0 +1,19 @@
+{{- /*
+ Displays the life areas for an item.
+
+ @params areas The item's life areas.
+ */
+-}}
+
+
+
+
+
diff --git a/layouts/partials/text/foreign-text.html b/layouts/partials/text/foreign-text.html
new file mode 100644
index 0000000..95d4ca3
--- /dev/null
+++ b/layouts/partials/text/foreign-text.html
@@ -0,0 +1,15 @@
+{{- /*
+ Displays foreign text.
+
+ @params original The text in the original language.
+ @params lang The language code of the original language.
+ @params translation The text in the parent container's language.
+ */
+-}}
+
+
+{{ .original }}
Comments
++ Comments +
- {{ .RenderShortcodes }} + {{ .RenderShortcodes }}