feat: finish CV
This commit is contained in:
parent
941c59b7a7
commit
187900fd5b
16 changed files with 1604 additions and 166 deletions
File diff suppressed because it is too large
Load diff
|
@ -2,13 +2,13 @@
|
||||||
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
|
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
|
||||||
{{- $pages := slice -}}
|
{{- $pages := slice -}}
|
||||||
{{- if or $.IsHome $.IsSection -}}
|
{{- if or $.IsHome $.IsSection -}}
|
||||||
{{- $pages = where $pctx.RegularPages "Params.redact" "ne" true -}}
|
{{- $pages = where $pctx.RegularPages "Params.redact" "ne" true -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- $pages = where $pctx.Pages "Params.redact" "ne" true -}}
|
{{- $pages = where $pctx.Pages "Params.redact" "ne" true -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
||||||
{{- if ge $limit 1 -}}
|
{{- if ge $limit 1 -}}
|
||||||
{{- $pages = $pages | first $limit -}}
|
{{- $pages = $pages | first $limit -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
||||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||||
|
|
|
@ -19,31 +19,26 @@
|
||||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
|
|
||||||
{{ range $.Site.Data.locations }}
|
{{- range $.Site.Data.locations -}}
|
||||||
L.marker([{{ .lat }}, {{ .lon }}]).addTo(map);
|
/* L.marker([{{ .lat }}, {{ .lon }}]).addTo(map); */
|
||||||
{{ end }}
|
{{- end -}}
|
||||||
|
|
||||||
{{ .Scratch.Set "maxItems" 0 }}
|
|
||||||
{{ .Scratch.Set "numOfItems" 0 }}
|
|
||||||
|
|
||||||
{{ range $key, $value := $.Site.Data.locations }}
|
|
||||||
{{ $childPosts := where $.Site.Pages ".Params.locations" "intersect" ( slice $key ) }}
|
|
||||||
{{ $.Scratch.Set "numOfItems" ( len $childPosts ) }}
|
|
||||||
{{ if ( gt ( $.Scratch.Get "numOfItems" ) ( $.Scratch.Get "maxItems" ) ) }}
|
|
||||||
{{ $.Scratch.Set "maxItems" ( $.Scratch.Get "numOfItems" ) }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
L.heatLayer(
|
L.heatLayer(
|
||||||
[
|
[
|
||||||
{{- range $key, $value := $.Site.Data.locations -}}
|
{{- range .Site.AllPages -}}
|
||||||
{{- $childPosts := where $.Site.Pages ".Params.locations" "intersect" ( slice $key ) -}}
|
{{- with .Params.locations -}}
|
||||||
[ {{ .lat }}, {{ .lon }}, {{ len $childPosts }} ],
|
{{- range . -}}
|
||||||
|
{{- with ( index $.Site.Data.locations . ) -}}
|
||||||
|
[ {{ .lat }}, {{ .lon }} ],
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
],
|
],
|
||||||
{
|
{
|
||||||
max: {{ $.Scratch.Get "maxItems" }},
|
minOpacity: 0.5,
|
||||||
gradient: { 0.4: 'blue', 0.65: 'lime', 1: 'red' }
|
gradient: {0.2: 'blue', 0.5: 'lime', 1: 'red'}
|
||||||
|
|
||||||
}
|
}
|
||||||
).addTo(map);
|
).addTo(map);
|
||||||
</script>
|
</script>
|
||||||
|
@ -59,5 +54,11 @@
|
||||||
{{ define "main-body" }}
|
{{ define "main-body" }}
|
||||||
<article class="site-content__body site-content__body--chart">
|
<article class="site-content__body site-content__body--chart">
|
||||||
<div id="map" style="width: 100%; height: 500px; margin: 0; display: block;"></div>
|
<div id="map" style="width: 100%; height: 500px; margin: 0; display: block;"></div>
|
||||||
|
|
||||||
|
<ul style="grid-area: section-content">
|
||||||
|
{{- range $key, $value := $.Site.Data.locations -}}
|
||||||
|
<li itemscope itemtype="https://schema.org/Place">{{ $key }}</li>
|
||||||
|
{{- end -}}
|
||||||
|
</ul>
|
||||||
</article>
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
{{ define "main-body" }}
|
{{ define "main-body" }}
|
||||||
{{ with .GetPage "cv/organisations" }}
|
{{ with .GetPage "cv/organisations" }}
|
||||||
{{ partial "cv/organisations/items-table.html" . }}
|
{{ partial "cv/organisations/organisations-table.html.tmpl" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
|
@ -24,16 +24,18 @@
|
||||||
var chart = new google.visualization.Timeline(container);
|
var chart = new google.visualization.Timeline(container);
|
||||||
var dataTable = new google.visualization.DataTable();
|
var dataTable = new google.visualization.DataTable();
|
||||||
|
|
||||||
|
{{- $unpaid_past := "#FFFFF0" -}}
|
||||||
|
{{- $paid_past := "#FCFCA6" -}}
|
||||||
|
{{- $unpaid_current := "#BBBBB0" -}}
|
||||||
|
{{- $paid_current := "#BCBC7E" -}}
|
||||||
|
|
||||||
dataTable.addColumn({ type: 'string', id: 'Type' });
|
dataTable.addColumn({ type: 'string', id: 'Type' });
|
||||||
dataTable.addColumn({ type: 'string', id: 'Job Title' });
|
dataTable.addColumn({ type: 'string', id: 'Job Title' });
|
||||||
dataTable.addColumn({ type: 'string', id: 'style', role: 'style' });
|
dataTable.addColumn({ type: 'string', id: 'style', role: 'style' });
|
||||||
dataTable.addColumn({ type: 'date', id: 'Start' });
|
dataTable.addColumn({ type: 'date', id: 'Start' });
|
||||||
dataTable.addColumn({ type: 'date', id: 'End' });
|
dataTable.addColumn({ type: 'date', id: 'End' });
|
||||||
|
|
||||||
dataTable.addRows([
|
dataTable.addRows([
|
||||||
{{- $unpaid_past := "#FFFFF0" -}}
|
|
||||||
{{- $paid_past := "#FCFCA6" -}}
|
|
||||||
{{- $unpaid_current := "#BBBBB0" -}}
|
|
||||||
{{- $paid_current := "#BCBC7E" -}}
|
|
||||||
{{ with ( .GetPage "cv/roles" ).Pages -}}
|
{{ with ( .GetPage "cv/roles" ).Pages -}}
|
||||||
{{- range ( where . ".Params.organisations" "intersect" $titles ) -}}
|
{{- range ( where . ".Params.organisations" "intersect" $titles ) -}}
|
||||||
{{- if ( not ( and ( .Params.redact ) ( ne $.Site.Params.redact "show" ) ) ) -}}
|
{{- if ( not ( and ( .Params.redact ) ( ne $.Site.Params.redact "show" ) ) ) -}}
|
||||||
|
@ -107,10 +109,10 @@
|
||||||
chart.draw(dataTable, options);
|
chart.draw(dataTable, options);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
{{ else }}
|
{{- else -}}
|
||||||
{{ $js := resources.Get "js/roles-chart.js" | resources.ExecuteAsTemplate "/js/render-roles-timeline.js" ( .GetPage "cv/roles" ) | resources.Fingerprint }}
|
{{ $js := resources.Get "js/roles-chart.js" | resources.ExecuteAsTemplate "/js/render-roles-timeline.js" ( .GetPage "cv/roles" ) | resources.Fingerprint }}
|
||||||
<script src="{{ $js.RelPermalink }}" integrity="{{ $js.Data.Integrity }}"></script>
|
<script src="{{ $js.RelPermalink }}" integrity="{{ $js.Data.Integrity }}"></script>
|
||||||
{{ end }}
|
{{- end -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ define "main-header" }}
|
{{ define "main-header" }}
|
||||||
|
@ -168,54 +170,16 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ .Scratch.Set "titles" $titles }}
|
{{ .Scratch.Set "titles" $titles }}
|
||||||
|
|
||||||
<main id="organisation-body" class="site-content__body">
|
<main class="site-content__body organisation">
|
||||||
<section id="description">
|
|
||||||
{{ .Content }}
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="roles-timeline">
|
{{- partial "cv/organisation/description.html.tmpl" ( dict "content" .Content ) -}}
|
||||||
<div id="timeline" aria-label="Roles timeline" role="img">Javascript must be enabled to view this chart.</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="related" class="row">
|
{{- partial "cv/organisation/roles-timeline.html.tmpl" -}}
|
||||||
{{- $titles := .Scratch.Get "titles" -}}
|
|
||||||
|
|
||||||
{{ range ( where ( ( .GetPage "blog" ).Sections ) "Title" "Blog Posts" ) }}
|
{{- partial "cv/organisation/related-items.html.tmpl" ( dict "sc" $ "organisation_titles" ( .Scratch.Get "titles" ) "organisation_title" .Title ) -}}
|
||||||
{{ $section_title := .Title }}
|
|
||||||
{{ with where ( where ( where ( where .Site.Pages "Section" "blog" ) "Parent.Title" .Title ) ".Params.organisations" "intersect" $titles ) ".Params.redact" false }}
|
|
||||||
{{ partial "cv/organisations/organisation-items.html" ( dict "section_title" $section_title "content" . ) }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ range ( where ( ( .GetPage "portfolio" ).Sections ) "Title" "!=" "Appearances" ).ByTitle }}
|
|
||||||
{{ $section_title := .Title }}
|
|
||||||
{{ with where ( where ( where ( where .Site.Pages "Section" "portfolio" ) "Parent.Title" .Title ) ".Params.organisations" "intersect" $titles ) ".Params.redact" false }}
|
|
||||||
{{ partial "cv/organisations/organisation-items.html" ( dict "section_title" $section_title "content" . ) }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ range ( where ( ( .GetPage "cv" ).Sections ) "Title" "Qualifications" ) }}
|
|
||||||
{{ $section_title := .Title }}
|
|
||||||
{{ with where ( where ( where ( where .Site.Pages "Section" "cv" ) "Parent.Title" .Title ) ".Params.organisations" "intersect" $titles ) ".Params.redact" false }}
|
|
||||||
{{ partial "cv/organisations/organisation-items.html" ( dict "section_title" $section_title "content" . ) }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ range ( where ( (.GetPage "cv").Sections ) "Title" "Awards" ) }}
|
|
||||||
{{ $section_title := .Title }}
|
|
||||||
{{ with where ( where ( where ( where .Site.Pages "Section" "cv" ) "Parent.Title" .Title ) ".Params.organisations" "intersect" $titles ) ".Params.redact" false }}
|
|
||||||
{{ partial "cv/organisations/organisation-items.html" ( dict "section_title" $section_title "content" . ) }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ range ( where ( (.GetPage "portfolio").Sections ) "Title" "Appearances" ).ByTitle }}
|
|
||||||
{{ $section_title := .Title }}
|
|
||||||
{{ with where ( where ( where ( where .Site.Pages "Section" "portfolio" ) "Parent.Title" .Title ) ".Params.organisations" "intersect" $titles ) ".Params.redact" false }}
|
|
||||||
{{ partial "cv/organisations/organisation-items.html" ( dict "section_title" $section_title "content" . ) }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
</section>
|
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
{{ else if eq .Type "cv" }}
|
{{ else if eq .Type "cv" }}
|
||||||
<article class="site-content__body site-content__body--chart">
|
<article class="site-content__body site-content__body--chart">
|
||||||
<div id="timeline" aria-label="Roles timeline" role="img">Javascript must be enabled to view this chart.</div>
|
<div id="timeline" aria-label="Roles timeline" role="img">Javascript must be enabled to view this chart.</div>
|
||||||
|
|
9
layouts/partials/cv/organisation/description.html.tmpl
Normal file
9
layouts/partials/cv/organisation/description.html.tmpl
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<!--
|
||||||
|
Renders the description of an organisation.
|
||||||
|
|
||||||
|
@params content Organisation description.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<section id="description" class="organisation__description">
|
||||||
|
{{ .content }}
|
||||||
|
</section>
|
38
layouts/partials/cv/organisation/get-num-of-items.html.tmpl
Normal file
38
layouts/partials/cv/organisation/get-num-of-items.html.tmpl
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
<!--
|
||||||
|
Return the number of a certain type of items an organisation has.
|
||||||
|
|
||||||
|
@params sc Site context.
|
||||||
|
@params section_title Title of the sub-section to show (e.g. "Blog Posts").
|
||||||
|
@params organisation_titles `dict` of organsation titles for this org and all of its children.
|
||||||
|
-->
|
||||||
|
|
||||||
|
{{- $sc := .sc -}}
|
||||||
|
{{- $section_title := .section_title -}}
|
||||||
|
{{- $organisation_titles := .organisation_titles -}}
|
||||||
|
|
||||||
|
{{- $icon := dict
|
||||||
|
"Roles" "🔨"
|
||||||
|
"Blog Posts" "📌"
|
||||||
|
"Web Sites" "✉"
|
||||||
|
"Programs" "P"
|
||||||
|
"Writings" "🖉"
|
||||||
|
"Audiovisuals" "AV"
|
||||||
|
"Others" "?"
|
||||||
|
"Qualifications" "Q"
|
||||||
|
"Awards" "A"
|
||||||
|
"Appearances" "ME"
|
||||||
|
-}}
|
||||||
|
|
||||||
|
{{- $section_items := default
|
||||||
|
( where ( where $sc.Site.Pages "Section" "blog" ) "Parent.Title" $section_title )
|
||||||
|
( default
|
||||||
|
( where ( where $sc.Site.Pages "Section" "cv" ) "Parent.Title" $section_title )
|
||||||
|
( where ( where $sc.Site.Pages "Section" "portfolio" ) "Parent.Title" $section_title )
|
||||||
|
)
|
||||||
|
-}}
|
||||||
|
|
||||||
|
{{- $organisation_items := where $section_items ".Params.organisations" "intersect" $organisation_titles -}}
|
||||||
|
<span class="organisations-table__items-icon{{- if ( eq ( len $organisation_items ) 0 ) }} organisations-table__items-icon--none{{- end -}}">
|
||||||
|
{{- index $icon $section_title -}} <br>
|
||||||
|
{{- ( len $organisation_items ) -}}
|
||||||
|
</span>
|
|
@ -0,0 +1,34 @@
|
||||||
|
<!--
|
||||||
|
Renders related items as an unordered list.
|
||||||
|
|
||||||
|
@params section_title Title of the sub-section to show (e.g. "Blog Posts").
|
||||||
|
@params content Related items.
|
||||||
|
-->
|
||||||
|
|
||||||
|
{{- $section_title := .section_title -}}
|
||||||
|
{{- $content := .content -}}
|
||||||
|
|
||||||
|
<h2 class="subheading">{{ $section_title }} ({{ len $content }})</h2>
|
||||||
|
<ul class="related-items related-items--list">
|
||||||
|
{{- range $content -}}
|
||||||
|
{{- $is_expired := and ( isset .Params "end_date" ) ( lt .Params.end_date ( (time now).Format "2006-01-02" ) ) -}}
|
||||||
|
|
||||||
|
<li class="related-item{{- if $is_expired }} related-item--expired{{- end -}}">
|
||||||
|
<a href="{{- .RelPermalink -}}">
|
||||||
|
{{- .Title | safeHTML -}}
|
||||||
|
</a>
|
||||||
|
|
||||||
|
{{- with .Params.grade -}}
|
||||||
|
<span class="related-item__grade">
|
||||||
|
Grade: {{ . -}}
|
||||||
|
</span>
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- with .Params.end_date -}}
|
||||||
|
<span class="related-item__expiry">
|
||||||
|
<abbr title="expire{{- if $is_expired -}}d{{- else -}}s{{- end -}}">Exp</abbr>: {{ dateFormat "Jan 2 2006" . -}}
|
||||||
|
</span>
|
||||||
|
{{- end -}}
|
||||||
|
</li>
|
||||||
|
{{- end -}}
|
||||||
|
</ul>
|
|
@ -0,0 +1,36 @@
|
||||||
|
<!--
|
||||||
|
Renders related items as tiles.
|
||||||
|
|
||||||
|
@params section_title Title of the sub-section to show (e.g. "Blog Posts").
|
||||||
|
@params organisation_title Title of the organisation.
|
||||||
|
@params content Related items.
|
||||||
|
-->
|
||||||
|
|
||||||
|
{{- $section_title := .section_title -}}
|
||||||
|
{{- $organisation_title := .organisation_title -}}
|
||||||
|
{{- $content := .content -}}
|
||||||
|
|
||||||
|
{{- if gt ( len $content ) 4 -}}
|
||||||
|
<details class="related-items related-items--tiles related-items--collapsible">
|
||||||
|
<summary>
|
||||||
|
{{- else -}}
|
||||||
|
<div id="{{ $section_title | anchorize }}" class="related-items related-items--tiles">
|
||||||
|
{{- end -}}
|
||||||
|
<h2 class="subheading related-items-title">{{ $section_title }} ({{ len $content }})</h2>
|
||||||
|
<div class="index">
|
||||||
|
{{ range first 4 $content }}
|
||||||
|
{{ partialCached "item-tile.html" . ( print $organisation_title "_" $section_title "_" .Title ) }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{- if gt ( len $content ) 4 -}}
|
||||||
|
</summary>
|
||||||
|
|
||||||
|
<div class="index">
|
||||||
|
{{ range after 4 $content }}
|
||||||
|
{{ partial "item-tile.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</details>
|
||||||
|
{{ else }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
|
@ -0,0 +1,30 @@
|
||||||
|
<!--
|
||||||
|
Renders the related items for a given organisation for a given section.
|
||||||
|
|
||||||
|
@params sc Site context
|
||||||
|
@params tls Slug of the top-level section of the sub-section.
|
||||||
|
@params section_title Title of the sub-section to show (e.g. "Blog Posts").
|
||||||
|
@params organisation_titles `dict` of organsation titles for this org and all of its children.
|
||||||
|
-->
|
||||||
|
|
||||||
|
{{- $sc := .sc -}}
|
||||||
|
{{- $tls := .tls -}}
|
||||||
|
{{- $section_title := .section_title -}}
|
||||||
|
{{- $organisation_titles := .organisation_titles -}}
|
||||||
|
|
||||||
|
{{- range ( where ( ( $sc.GetPage $.tls ).Sections ) "Title" $.section_title ) -}}
|
||||||
|
{{- $section_items := where ( where $sc.Site.Pages "Section" $tls ) "Parent.Title" .Title -}}
|
||||||
|
{{- $organisation_items := where $section_items ".Params.organisations" "intersect" $organisation_titles -}}
|
||||||
|
|
||||||
|
{{- with ( where $organisation_items ".Params.redact" "ne" true ) -}}
|
||||||
|
{{- if in ( slice "Qualifications" "Awards" ) $section_title -}}
|
||||||
|
<section id="related-{{ $section_title | anchorize }}" class="related-section related-section--list">
|
||||||
|
{{- partial "cv/organisation/organisation-items-list.html.tmpl" ( dict "organisation_title" $sc.Title "section_title" $section_title "content" . ) -}}
|
||||||
|
</section>
|
||||||
|
{{- else -}}
|
||||||
|
<section id="related-{{ $section_title | anchorize }}" class="related-section related-section--tiles">
|
||||||
|
{{- partial "cv/organisation/organisation-items-tiles.html.tmpl" ( dict "section_title" $section_title "content" . ) -}}
|
||||||
|
</section>
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
26
layouts/partials/cv/organisation/related-items.html.tmpl
Normal file
26
layouts/partials/cv/organisation/related-items.html.tmpl
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
<!--
|
||||||
|
Renders the related items for a given organisation.
|
||||||
|
|
||||||
|
@params sc Site context
|
||||||
|
@params organisation_titles `dict` of organsation titles for this org and all of its children.
|
||||||
|
-->
|
||||||
|
|
||||||
|
{{- $sc := .sc -}}
|
||||||
|
{{- $organisation_titles := .organisation_titles -}}
|
||||||
|
|
||||||
|
<section id="related" class="organisation__related">
|
||||||
|
|
||||||
|
<!-- Blog posts -->
|
||||||
|
{{- partial "cv/organisation/related-items-section.html.tmpl" ( dict "sc" $sc "tls" "blog" "section_title" "Blog Posts" "organisation_titles" $organisation_titles ) -}}
|
||||||
|
|
||||||
|
<!-- Portfolios -->
|
||||||
|
{{- range ( ( $sc.GetPage "portfolio" ).Sections ).ByWeight -}}
|
||||||
|
{{- partial "cv/organisation/related-items-section.html.tmpl" ( dict "sc" $sc "tls" "portfolio" "section_title" .Title "organisation_titles" $organisation_titles ) -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
<!-- Qualifications, Awards and Appearances -->
|
||||||
|
{{- range ( where ( ( $sc.GetPage "cv" ).Sections ) "Title" "not in" ( slice "Organisations" "Roles" ) ).ByWeight }}
|
||||||
|
{{- partial "cv/organisation/related-items-section.html.tmpl" ( dict "sc" $sc "tls" "cv" "section_title" .Title "organisation_titles" $organisation_titles ) -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
</section>
|
|
@ -0,0 +1,7 @@
|
||||||
|
<!--
|
||||||
|
Renders a role timeline for an organisation.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<section id="roles-timeline" class="organisation__timeline">
|
||||||
|
<div id="timeline" aria-label="Roles timeline" role="img">Javascript must be enabled to view this chart.</div>
|
||||||
|
</section>
|
|
@ -0,0 +1,81 @@
|
||||||
|
<section class="site-content__body">
|
||||||
|
<table class="organisations-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">Organisation</th>
|
||||||
|
<th>Children</th>
|
||||||
|
<th>Related Items</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{{- range .Pages -}}
|
||||||
|
{{- $organisation_title := .Title -}}
|
||||||
|
{{- if ( not ( and ( .Params.redact ) ( ne $.Site.Params.redact "show" ) ) ) -}}
|
||||||
|
{{ $organisation_titles := slice ( $organisation_title | plainify ) }}
|
||||||
|
{{ with .Sections }}
|
||||||
|
{{ $organisation_titles = $organisation_titles | append ( partial "cv/organisations/recursive-children-titles.html" . ) }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
{{- if ( and ( .Params.redact ) ( ne $.Site.Params.redact "show" ) ) -}}
|
||||||
|
{{- if ( eq $.Site.Params.redact "black" ) -}}
|
||||||
|
{{- partialCached "redact-black.html" . -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- if .Params.featured_image -}}
|
||||||
|
<img class="organisation-table__logo" loading="lazy" src="
|
||||||
|
{{- if .Resources.GetMatch .Params.featured_image -}}
|
||||||
|
{{- ( .Resources.GetMatch .Params.featured_image ).RelPermalink -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- .Params.featured_image -}}
|
||||||
|
{{- end -}}
|
||||||
|
">
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
{{- if ( and ( .Params.redact ) ( ne $.Site.Params.redact "show" ) ) -}}
|
||||||
|
{{- if ( eq $.Site.Params.redact "black" ) -}}
|
||||||
|
{{- partialCached "redact-black.html" . -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- else -}}
|
||||||
|
<a href="{{ .RelPermalink }}">
|
||||||
|
{{- if .Params.TitleLang -}}<i lang="{{ .Params.TitleLang }}" title="{{ .Params.TitleTrans }}"}>{{- end -}}
|
||||||
|
{{- with .Params.markup_title -}}{{- . | safeHTML -}}{{- else -}}{{- $organisation_title | safeHTML -}}{{- end -}}
|
||||||
|
{{- if .Params.TitleLang -}}</i>{{- end -}}
|
||||||
|
</a>
|
||||||
|
{{- end -}}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<span class="organisations-table__items-icon{{- if ( eq ( len .Sections ) 0 ) }} organisations-table__items-icon--none{{- end -}}">
|
||||||
|
🧑🧒 <br>
|
||||||
|
{{- len .Sections -}}
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
{{- range slice
|
||||||
|
"Roles"
|
||||||
|
"Blog Posts"
|
||||||
|
"Web Sites"
|
||||||
|
"Programs"
|
||||||
|
"Writings"
|
||||||
|
"Audiovisuals"
|
||||||
|
"Others"
|
||||||
|
"Qualifications"
|
||||||
|
"Awards"
|
||||||
|
"Appearances"
|
||||||
|
-}}
|
||||||
|
{{- partialCached "cv/organisation/get-num-of-items.html.tmpl" ( dict "sc" $ "section_title" . "organisation_titles" $organisation_titles ) ( print $organisation_title "_" . ) -}}
|
||||||
|
{{- end -}}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
|
@ -1,10 +1,10 @@
|
||||||
<section class="site-content__body">
|
<section class="site-content__body">
|
||||||
{{ range ( ( where .Pages "Draft" false ).GroupByPublishDate "2006" ) }}
|
{{ range ( ( where .Pages "Draft" false ).GroupByPublishDate "2006" ) }}
|
||||||
{{ if ( not ( eq .Key "0001" ) ) }}
|
{{ if ( not ( eq .Key "0001" ) ) }}
|
||||||
{{ partial "header-tile.html" . }}
|
{{ partialCached "header-tile.html" . .Key }}
|
||||||
{{ range .Pages }}
|
{{ range .Pages }}
|
||||||
{{ if ( not ( .IsDescendant ( .GetPage "/cv/roles" ) ) ) }}
|
{{ if ( not ( .IsDescendant ( .GetPage "/cv/roles" ) ) ) }}
|
||||||
{{ partial "item-tile.html" . }}
|
{{ partialCached "item-tile.html" . .Title }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
{{ $all_organisations := partialCached "get_all_organisations.html" . }}
|
{{ $all_organisations := partialCached "get_all_organisations.html" . }}
|
||||||
<!-- TODO: Replace with hierarchy partial -->
|
<!-- TODO: Replace with hierarchy partial -->
|
||||||
{{- range ( .GetTerms "organisations" ) -}}
|
{{- range ( .GetTerms "organisations" ) -}}
|
||||||
{{ with ( where $all_organisations "Title" ( .Title | plainify ) ) }}
|
{{ with ( union ( union ( where $all_organisations "Title" ( .Title | plainify ) ) ( where $all_organisations "Params.abbreviation" ( .Title | plainify ) ) ) ( where $all_organisations "Params.fka" ( .Title | plainify ) ) ) }}
|
||||||
{{ range . }}
|
{{ range . }}
|
||||||
{{- if ( and ( .Params.redact ) ( ne $.Site.Params.redact "show" ) ) -}}
|
{{- if ( and ( .Params.redact ) ( ne $.Site.Params.redact "show" ) ) -}}
|
||||||
{{- if ( eq $.Site.Params.redact "black" ) -}}
|
{{- if ( eq $.Site.Params.redact "black" ) -}}
|
||||||
|
|
11
layouts/partials/utils/get_content_by_section.html
Normal file
11
layouts/partials/utils/get_content_by_section.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<!--
|
||||||
|
Given a top-level section title slug [blog|cv|portfolio], returns all
|
||||||
|
`Pages` within that top-level section.
|
||||||
|
|
||||||
|
@param sc The site content (`$`)
|
||||||
|
@param section_slug The slug of the section to use [blog|cv|portfolio]
|
||||||
|
|
||||||
|
@returns Pages|nil
|
||||||
|
-->
|
||||||
|
|
||||||
|
{{- where ( ( .sc.GetPage "cv" ).Sections ) "Title" .section_title -}}
|
Loading…
Reference in a new issue