diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 5f8e2ec..df03897 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,11 +1,25 @@ - {{- partial "head.html" . -}} - - {{- partial "header.html" . -}} -
- {{- block "main" . }}{{- end }} -
- {{- partial "footer.html" . -}} - - + + + + + {{ block "title" . }} + {{ .Site.Title }} + {{ end }} + + + + + + {{ partial "header.html" . }} + {{ block "main" . }} + + {{ end }} + {{ block "footer" . }} + + {{ partial "footer.html" . }} + {{ end }} + + + \ No newline at end of file diff --git a/layouts/_default/list.html b/layouts/_default/list.html index e69de29..e360eae 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -0,0 +1,14 @@ +{{/* This will override the default value set in baseof.html; i.e., "{{.Site.Title}}" in the original example */}} +{{ define "title" }} +{{ .Title }} – {{ .Site.Title }} +{{ end }} +{{ define "main" }} +
+
+

{{ .Title }}

+ {{ range .Pages }} + {{ .Render "summary"}} + {{ end }} +
+
+{{ end }} \ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html index e69de29..519c4b2 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -0,0 +1,10 @@ +{{/* This will override the default value set in baseof.html; i.e., "{{.Site.Title}}" in the original example */}} +{{ define "title" }} +{{ .Title }} – {{ .Site.Title }} +{{ end }} +{{ define "main" }} +
+

{{ .Title }}

+ {{ .Content }} +
+{{ end }} \ No newline at end of file diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html new file mode 100644 index 0000000..ae13901 --- /dev/null +++ b/layouts/_default/summary.html @@ -0,0 +1,12 @@ +
+
+

{{ .Title }}

+ +
+ {{ .Summary }} + +
\ No newline at end of file diff --git a/layouts/index.html b/layouts/index.html index e69de29..e60afe6 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -0,0 +1,20 @@ +{{ define "main" }} +
+
+

{{.Title}}

+ {{ with .Site.Params.Subtitle }} + {{.}} + {{ end }} +
+
+ + {{.Content}} +
+
+ + {{ range first 10 .Pages }} + {{ .Render "summary"}} + {{ end }} +
+
+{{ end }} \ No newline at end of file diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index e69de29..8b437a7 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html deleted file mode 100644 index e69de29..0000000 diff --git a/layouts/partials/header.html b/layouts/partials/header.html index e69de29..9c65a31 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -0,0 +1,2 @@ +
+
\ No newline at end of file