diff --git a/content/blog/_index.md b/content/blog/_index.md index 7eeaa0d..6dc09d4 100644 --- a/content/blog/_index.md +++ b/content/blog/_index.md @@ -1,7 +1,8 @@ --- title: Blog -mainType: https://schema.org/Blog -itemsType: https://schema.org/BlogPosting" itemprop="blogPost +mainType: Blog +itemsType: BlogPosting +itemsProp: blogPost cascade: params: images: diff --git a/content/cv/_index.md b/content/cv/_index.md index 473f39c..ffc0584 100644 --- a/content/cv/_index.md +++ b/content/cv/_index.md @@ -1,8 +1,11 @@ --- title: CV +layout: cv type: cv --- -This section is for things you have done in your life, e.g. jobs, roles, qualifications. +This section is for things you have done in your life, e.g. jobs, roles, +qualifications. -Click on the sections below to view more details about each experience, or filter the timeline below by using the buttons just above it. +Click on the sections below to view more details about each experience, or +filter the timeline below by using the buttons just above it. diff --git a/layouts/_partials/cv/organisation/get_organisation_roles_for_chart.html b/layouts/_partials/cv/organisation/get_organisation_roles_for_chart.html new file mode 100644 index 0000000..add31f6 --- /dev/null +++ b/layouts/_partials/cv/organisation/get_organisation_roles_for_chart.html @@ -0,0 +1,60 @@ +{{- /* + Renders an organisation's roles in a timeline. + + @params sc Site context. + @params pc Page context. + @params organisation_titles Post organisation titles. + */ +-}} + + + +{{- if ( not ( isset . "sc" ) ) -}} + {{- errorf "No site context passed" -}} +{{- end -}} + +{{- if ( not ( isset . "pc" ) ) -}} + {{- errorf "No page context passed" -}} +{{- end -}} + +{{- if ( not ( isset . "organisation_titles" ) ) -}} + {{- errorf "No organisation_titles defined (%q)" .pc.Page.File.Path -}} +{{- end -}} + +{{- $roles := slice -}} + + + +{{- with ( .pc.GetPage "cv/roles" ).Pages -}} + {{- range ( where . "Params.organisations" "intersect" $.organisation_titles ) -}} + {{- if ( not ( and ( .Params.redact ) ( ne $.sc.Site.Params.redact "show" ) ) ) -}} + {{- + $roles = $roles | append ( + printf `["%s", "%s", "%s", %s, %s]` + ( + partialCached + "cv/organisation/get_role_organisation_string.html" + ( dict "sc" $.sc "pc" . ) + . + ) + ( + partialCached + "cv/organisation/get_role_role_string.html" + ( dict "sc" $.sc "pc" . ) + . + ) + ( + partialCached + "cv/organisation/get_role_colour.html" + ( dict "end_date" .Params.end_date "is_paid" .Params.paid ) + .Params.end_date .Params.paid + ) + ( partialCached "cv/organisation/get_role_start_date.html" .Date .Date ) + ( partialCached "cv/organisation/get_role_end_date.html" .Params.end_date .Params.end_date ) + ) + -}} + {{- end -}} + {{- end -}} +{{ end -}} + +{{- return ( delimit $roles ", ") -}} diff --git a/layouts/_partials/item-tile.html b/layouts/_partials/item-tile.html index 6a7fe3e..0ef309b 100644 --- a/layouts/_partials/item-tile.html +++ b/layouts/_partials/item-tile.html @@ -25,9 +25,9 @@ id="{{ .Title | urlize }}" class="h-entry u-url link--tile" href="{{ .RelPermalink }}" - itemprop="blogPost" + itemprop="{{- ( $.GetPage .Section ).Params.itemsProp -}}" itemscope - itemtype="https://schema.org/BlogPosting" + itemtype="https://schema.org/{{- default "CreativeWork" ( $.GetPage .Section ).Params.itemsType -}}" >
+ +{{- if ( not ( isset . "sc" ) ) -}} + {{- errorf "No site context passed" -}} +{{- end -}} + +{{- if ( not ( isset . "pc" ) ) -}} + {{- errorf "No page context passed" -}} +{{- end -}} + +{{- if ( not ( isset . "organisation_titles" ) ) -}} + {{- errorf "No organisation_titles defined" -}} +{{- end -}} + + + + diff --git a/layouts/_partials/scripts/show_post_locations_on_map.js b/layouts/_partials/scripts/show_post_locations_on_map.js index 065871e..32877b2 100644 --- a/layouts/_partials/scripts/show_post_locations_on_map.js +++ b/layouts/_partials/scripts/show_post_locations_on_map.js @@ -23,24 +23,22 @@ - +map.fitBounds(latLons); diff --git a/layouts/_partials/single/footer-scripts.html b/layouts/_partials/single/footer-scripts.html index c544b2e..28df56e 100644 --- a/layouts/_partials/single/footer-scripts.html +++ b/layouts/_partials/single/footer-scripts.html @@ -43,14 +43,12 @@ {{ if .pc.HasShortcode "chart" }} {{- $configJs := ( .pc.Page.Resources.GetMatch "charts-init" | fingerprint ) -}} - {{ end }} diff --git a/layouts/baseof.html b/layouts/baseof.html index 0aac68c..43a69ff 100644 --- a/layouts/baseof.html +++ b/layouts/baseof.html @@ -9,16 +9,16 @@ itemtype="https://schema.org/Blog" > - + {{- partialCached "head/meta.html" . -}} {{- block "title" . -}} - {{- partialCached "head/title.html" ( slice .Site.Title .Site.Params.tagline ) .Site.Title .Site.Params.tagline -}} + {{- partialCached "head/title.html" ( slice ( .Page.Title | plainify ) .Site.Title ) .Site.Title .Page.Title -}} {{- end -}} diff --git a/layouts/baseof.section.html b/layouts/baseof.section.html new file mode 100644 index 0000000..4b3ce19 --- /dev/null +++ b/layouts/baseof.section.html @@ -0,0 +1,106 @@ + + +{{ partialCached "copying.html" . }} + + + + + {{- partialCached "head/meta.html" . -}} + + + {{- block "title" . -}} + {{- partialCached "head/title.html" ( slice ( .Page.Title | plainify ) .Site.Title ) .Site.Title .Page.Title -}} + {{- end -}} + + + {{- partialCached "head/references.html" ( dict "sc" $ "pc" . ) -}} + + {{- with .OutputFormats.Get "rss" -}} + + {{- end -}} + + + {{- partialCached "head/stylesheets.html" . -}} + + + {{- if .Param "math" -}} + {{- partialCached "head/math.html" . -}} + {{- end -}} + + {{- block "header-scripts" . -}}{{- end -}} + + {{- block "header-styles" . -}}{{- end -}} + + + + {{- block "header" . -}} + {{- partialCached "header/site-header.html" . -}} + {{- end -}} + +
+ {{ block "main-header" . }} +
+

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

+ + {{- .Content -}} + + +
+ {{ end }} + + {{ block "main-body" . }} + {{- partial "items-grid.html" . -}} + {{ end }} + + {{ block "main-footer" . }}{{ end }} +
+ + {{- block "footer" . -}} + + {{- end -}} + + diff --git a/layouts/baseof.single.html b/layouts/baseof.single.html new file mode 100644 index 0000000..38bca6b --- /dev/null +++ b/layouts/baseof.single.html @@ -0,0 +1,138 @@ + + +{{ partialCached "copying.html" . }} + + + + + {{- partialCached "head/meta.html" . -}} + + + {{- block "title" . -}} + {{- partialCached "head/title.html" ( slice ( .Page.Title | plainify ) .Site.Title ) .Site.Title .Page.Title -}} + {{- end -}} + + + {{- partialCached "head/references.html" ( dict "sc" $ "pc" . ) -}} + + {{- with .OutputFormats.Get "rss" -}} + + {{- end -}} + + + {{- partialCached "head/stylesheets.html" . -}} + + + {{- if .Param "math" -}} + {{- partialCached "head/math.html" . -}} + {{- end -}} + + {{- block "header-scripts" . -}} + {{ with .Params.locations }} + + {{ end }} + {{- end -}} + + {{- block "header-styles" . -}} + {{ with .Params.styles }} + + {{ end }} + {{ with .Params.locations }} + + {{ end }} + {{- end -}} + + + + {{- block "header" . -}} + {{- partialCached "header/site-header.html" . -}} + {{- end -}} + +
+ {{ block "main-header" . }} + {{- partial "single/main-header.html" ( dict "pc" . "sc" $ ) -}} + {{ end }} + + {{ block "main-body" . }} +
+ {{- with .Summary -}} +
+

Summary

+

{{- . -}}

+
+ {{ end }} + + {{- if ( or .Params.internal_links .Params.external_links ) -}} + {{- partial "single/main-body/links.html" ( dict "pc" . "sc" $ ) -}} + {{- end -}} + + {{- partial "single/main-body/content.html" ( dict "pc" . "sc" $ ) -}} + + {{ block "main-body-additional" . }}{{ end }} +
+ + {{- with .Page.Resources.Get "comments.md" -}} + {{- partial "single/main-body/comments.html" ( dict "pc" . "sc" $ ) -}} + {{- end -}} + + {{ end }} + + {{ block "main-footer" . }} + {{- partial "single/post-meta.html" ( dict "pc" . "sc" $ ) -}} + {{ end }} +
+ + {{- block "footer" . -}} + + {{- end -}} + + diff --git a/layouts/blog/section.html b/layouts/blog/section.html index 6ffd524..48d82e9 100644 --- a/layouts/blog/section.html +++ b/layouts/blog/section.html @@ -1,11 +1,5 @@ {{ define "main-class" }}--section layouts-blog-section{{ end }} -{{ define "main-type" }}{{ .Params.mainType }}{{ end }} - -{{ define "footer-scripts" }} - -{{ end }} - {{ define "main-header" }}

@@ -40,8 +34,8 @@ {{ end }} {{ end }}

- {{ .Content }} + {{ .Content }}
{{ end }} {{ define "main-body" }} - {{ if .IsDescendant ( .GetPage "/cv/organisations" ) }} - {{ $titles := slice ( .Title | plainify ) }} - {{ with .Sections }} - {{ $titles = $titles | append ( partial "cv/organisations/recursive-children-titles.html" . ) }} - {{ end }} - {{ .Scratch.Set "titles" $titles }} - -
- - {{- partial "cv/organisation/description.html" ( dict "content" .Content ) -}} - - {{- partial "cv/organisation/roles-timeline.html" -}} - - {{- partial "cv/organisation/related-items.html" ( dict "sc" $ "organisation_titles" ( .Scratch.Get "titles" ) "organisation_title" .Title ) -}} - -
- - {{ else if eq .Type "cv" }} -
- -
- {{ else }} - {{ partial "items-grid.html" . }} - {{ end }} -{{ end }} - -{{ define "main-footer" }} - {{ if .IsDescendant ( .GetPage "/cv/organisations" ) }} - - {{ end }} + {{ partial "items-grid.html" . }} {{ end }} diff --git a/layouts/home.html b/layouts/home.html index 0766eaf..1b9c25e 100644 --- a/layouts/home.html +++ b/layouts/home.html @@ -1,3 +1,7 @@ +{{ define "title" }} + {{- partialCached "head/title.html" ( slice .Site.Title .Site.Params.tagline ) .Site.Title .Site.Params.tagline -}} +{{ end }} + {{ define "main-class" }}--homepage{{ end }} {{ define "header" }} {{ end }} diff --git a/layouts/portfolio/section.html b/layouts/portfolio/section.html index d6f211f..ad2db56 100644 --- a/layouts/portfolio/section.html +++ b/layouts/portfolio/section.html @@ -1,59 +1,5 @@ {{ define "main-class" }}--section layouts-portfolio-section{{ end }} -{{ define "footer-scripts" }} - -{{ end }} - {{ define "main-header" }}

{{ .Title | safeHTML }}. diff --git a/layouts/section.html b/layouts/section.html deleted file mode 100644 index b3a8bbf..0000000 --- a/layouts/section.html +++ /dev/null @@ -1,25 +0,0 @@ -{{ define "title" }} - {{- partialCached "head/title.html" ( slice ( .Page.Title | plainify ) .Site.Title ) .Site.Title .Page.Title -}} -{{ end }} - -{{ define "main-class" }}--section layouts-default-section{{ end }} - -{{ define "main-type" }}.{{ .Params.mainType }}{{ end }} -{{ define "item-type" }}{{ .Params.itemsType }}{{ end }} - -{{ define "main-header" }} -
-

{{ .Title | safeHTML }} - {{ range .AlternativeOutputFormats -}} - - RSS feed - - {{ end }} -

- {{ .Content }} -
-{{ end }} - -{{ define "main-body" }} - {{ partial "items-grid.html" . }} -{{ end }} diff --git a/layouts/single.html b/layouts/single.html deleted file mode 100644 index da6a9f9..0000000 --- a/layouts/single.html +++ /dev/null @@ -1,54 +0,0 @@ -{{ define "title" }} - {{- partialCached "head/title.html" ( slice ( .Page.Title | plainify ) .Site.Title ) .Site.Title .Page.Title -}} -{{ end }} - -{{ define "head-description" }}{{ .Summary | plainify }}{{ end }} - -{{ define "main-class" }}--single layouts-default-single{{ end }} - -{{ define "header-scripts" }} - {{ with .Params.locations }} - - {{ end }} -{{ end }} - -{{ define "header-styles" }} - {{ with .Params.styles }} - - {{ end }} - {{ with .Params.locations }} - - {{ end }} -{{ end }} - -{{ define "footer-scripts" }} - {{- partialCached "single/footer-scripts.html" ( dict "pc" . "sc" $ ) . }} -{{ end }} - -{{ define "main-header" }} - {{ partial "single/main-header.html" ( dict "pc" . "sc" $ ) }} -{{ end }} - -{{ define "main-body" }} -
- {{- if ( or .Params.internal_links .Params.external_links ) -}} - {{- partial "single/main-body/links.html" ( dict "pc" . "sc" $ ) -}} - {{- end -}} - - {{- partial "single/main-body/content.html" ( dict "pc" . "sc" $ ) -}} -
-{{ end }} - -{{ define "main-footer" }} - {{ partial "single/post-meta.html" ( dict "pc" . "sc" $ ) }} -{{ end }}