diff --git a/content/cv/_index.md b/content/cv/_index.md index ffc0584..e3e9e2d 100644 --- a/content/cv/_index.md +++ b/content/cv/_index.md @@ -1,7 +1,6 @@ --- title: CV -layout: cv -type: cv +layout: cv-root --- This section is for things you have done in your life, e.g. jobs, roles, diff --git a/content/portfolio/_index.md b/content/portfolio/_index.md index 2ae4c01..8cafec1 100644 --- a/content/portfolio/_index.md +++ b/content/portfolio/_index.md @@ -1,6 +1,6 @@ --- title: Portfolio -type: portfolio +layout: portfolio-root --- This section is for things you have produced, whatever their formats and media. diff --git a/layouts/_partials/single/main-body/corrigendum.html b/layouts/_partials/single/main-body/corrigenda.html similarity index 72% rename from layouts/_partials/single/main-body/corrigendum.html rename to layouts/_partials/single/main-body/corrigenda.html index c35377c..d3c38e2 100644 --- a/layouts/_partials/single/main-body/corrigendum.html +++ b/layouts/_partials/single/main-body/corrigenda.html @@ -21,17 +21,17 @@

- Corrigendum + Corrigenda

- {{ $file := path.Join $.sc.Page.File.Dir "corrigendum.md" | readFile }} + {{ $file := path.Join $.sc.Page.File.Dir "corrigenda.md" | readFile }} {{ $file | .pc.RenderString }}
diff --git a/layouts/cv/cv.html b/layouts/cv/cv-root.html similarity index 71% rename from layouts/cv/cv.html rename to layouts/cv/cv-root.html index d70485a..ba18557 100644 --- a/layouts/cv/cv.html +++ b/layouts/cv/cv-root.html @@ -1,16 +1,12 @@ {{ define "main-class" }}--section layouts-cv-cv{{ end }} {{ define "header-scripts" }} - {{ if ( or ( eq .Type "cv" ) ( .IsDescendant ( .GetPage "/cv/organisations" ) ) ) }} - - {{ end }} + {{ end }} {{ define "footer-scripts" }} - {{ if ( not ( .IsDescendant ( .GetPage "/cv/organisations" ) ) ) }} - {{ $js := resources.Get "js/roles-chart.js" | resources.ExecuteAsTemplate "/js/render-roles-timeline.js" ( .GetPage "cv/roles" ) | resources.Fingerprint }} - - {{- end -}} + {{ $js := resources.Get "js/roles-chart.js" | resources.ExecuteAsTemplate "/js/render-roles-timeline.js" ( .GetPage "cv/roles" ) | resources.Fingerprint }} + {{ end }} {{ define "main-header" }} diff --git a/layouts/portfolio/section.html b/layouts/portfolio/portfolio-root.html similarity index 70% rename from layouts/portfolio/section.html rename to layouts/portfolio/portfolio-root.html index ad2db56..a0bc3ff 100644 --- a/layouts/portfolio/section.html +++ b/layouts/portfolio/portfolio-root.html @@ -10,18 +10,11 @@ {{ end }} {{ .Content }} - - {{ if ne .Type "portfolio" }} - - {{ end }} {{ end }} {{ define "main-body" }} - {{ if eq .Type "portfolio" }} -
+
- {{ else }} - {{ partial "items-grid.html" . }} - {{ end }} {{ end }} diff --git a/layouts/section.html b/layouts/section.html new file mode 100644 index 0000000..32b1f40 --- /dev/null +++ b/layouts/section.html @@ -0,0 +1,22 @@ +{{ define "main-class" }}--section layouts-default-section{{ end }} + +{{ define "main-header" }} +
+

{{ .Title | safeHTML }}. + {{ range .AlternativeOutputFormats -}} + + + + {{ end }} +

+ {{ .Content }} + + +
+{{ end }} + +{{ define "main-body" }} + {{ partial "items-grid.html" . }} +{{ end }} diff --git a/layouts/single.html b/layouts/single.html new file mode 100644 index 0000000..b13bd61 --- /dev/null +++ b/layouts/single.html @@ -0,0 +1,11 @@ +{{ define "main-class" }}--single layouts-default-single{{ end }} + +{{ define "main-body-additional" }} + {{ if fileExists ( path.Join $.Page.File.Dir "appendices.md" ) }} + {{- partial "single/main-body/appendices.html" ( dict "pc" . "sc" $ ) -}} + {{ end }} + + {{ if fileExists ( path.Join $.Page.File.Dir "corrigenda.md" ) }} + {{- partial "single/main-body/corrigenda.html" ( dict "pc" . "sc" $ ) -}} + {{ end }} +{{ end }}