diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 1a1d085..72d531c 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -4,12 +4,21 @@ {{.Title}} -

{{.Title}}

- {{.Content}} - {{ range .Pages }} - - {{end}} + {{ partial "content.html" . }} + + + {{ range .Pages.GroupByDate "2006-01" }} + {{ $month := print .Key "-01"}} + {{ $display := dateFormat "2006-01" $month }} +

+ + + +

+ + {{ range (sort .Pages "Date" "desc") }} + {{ partial "list_item.html" . }} + {{ end }} + {{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 1289c07..7241808 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -4,9 +4,6 @@ {{.Title}} -

{{.Title}}

-

{{.Date}}

-
- {{.Content}} + {{ partial "content.html" . }} diff --git a/layouts/partials/content-details.html b/layouts/partials/content-details.html new file mode 100644 index 0000000..f7b282f --- /dev/null +++ b/layouts/partials/content-details.html @@ -0,0 +1,9 @@ +{{ if not .Date.IsZero }} + {{ .Date.Format "2006-01-02" }} +{{ end }} + +{{ if .Params.tags }} + {{ range $1, $e := .Params.tags }} + #{{ . }} + {{ end }} +{{ end }} diff --git a/layouts/partials/content.html b/layouts/partials/content.html new file mode 100644 index 0000000..ee7d654 --- /dev/null +++ b/layouts/partials/content.html @@ -0,0 +1,14 @@ +

{{ .Title }}

+{{ if .IsPage }} +

{{ partial "content-details.html" . }}

+{{ end }} +
+ +
+ {{ if .TableOfContents }} +
+ {{ .TableOfContents }} +
+ {{ end }} + {{ .Content }} +
diff --git a/layouts/partials/list_item.html b/layouts/partials/list_item.html new file mode 100644 index 0000000..dbd3d79 --- /dev/null +++ b/layouts/partials/list_item.html @@ -0,0 +1,7 @@ +
+ +
{{ .Title }}
+
+ {{ partial "content-details.html" . }} +

{{ partial "summary.html" . }}

+
diff --git a/layouts/partials/summary.html b/layouts/partials/summary.html new file mode 100644 index 0000000..053c05b --- /dev/null +++ b/layouts/partials/summary.html @@ -0,0 +1,5 @@ +{{ if .Content }} + {{ .Summary | chomp }}{{ if .Truncated }}…{{ end }} +{{ else if .Params.subtitle }} + {{ .Params.subtitle | markdownify | emojify }} +{{ end }}