various updates
This commit is contained in:
parent
4955708f0e
commit
ee87009471
37 changed files with 1734 additions and 401 deletions
File diff suppressed because it is too large
Load diff
BIN
images/feed-icon.svg
Normal file
BIN
images/feed-icon.svg
Normal file
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
BIN
images/layers-2x.png
Normal file
BIN
images/layers-2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
images/layers.png
Normal file
BIN
images/layers.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 696 B |
BIN
images/marker-icon-2x.png
Normal file
BIN
images/marker-icon-2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
BIN
images/marker-icon.png
Normal file
BIN
images/marker-icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
BIN
images/marker-shadow.png
Normal file
BIN
images/marker-shadow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 618 B |
|
@ -11,19 +11,40 @@ function drawChart() {
|
|||
dataTable.addColumn({ type: 'date', id: 'End' });
|
||||
|
||||
dataTable.addRows([
|
||||
[
|
||||
"Centro de Derechos Humanos Fray Bartolomé de Las Casas, Las Abejas",
|
||||
"BriCO Volunteer",
|
||||
"#FFFFF0",
|
||||
new Date("2023-06-26"),
|
||||
new Date("2023-07-13")
|
||||
],
|
||||
[
|
||||
"CELMRAZ",
|
||||
"Student",
|
||||
"#FFFFF0",
|
||||
new Date("2023-06-05"),
|
||||
new Date("2023-06-23")
|
||||
],
|
||||
[
|
||||
"Instituto Cubano de Amistad con los Pueblos, Cuba Solidarity Campaign",
|
||||
"Brigadista, XVI Brigada Internacional Primero de May",
|
||||
"#FFFFF0",
|
||||
new Date("2023-04-23"),
|
||||
new Date("2023-05-12")
|
||||
],
|
||||
[
|
||||
"Workaway, Volcano Day",
|
||||
"Workawayer",
|
||||
"#BBBBB0",
|
||||
new Date("2023-03-26"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-06-30")
|
||||
],
|
||||
[
|
||||
"Cuba Solidarity Campaign",
|
||||
"Member",
|
||||
"#BBBBB0",
|
||||
new Date("2023-03-03"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-06-30")
|
||||
],
|
||||
[
|
||||
"Workaway, Hospedaje Wounaan",
|
||||
|
@ -51,7 +72,7 @@ function drawChart() {
|
|||
"Developer",
|
||||
"#BBBBB0",
|
||||
new Date("2023-01-19"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-06-30")
|
||||
],
|
||||
[
|
||||
"Workaway, Finca DeLaRey",
|
||||
|
@ -82,18 +103,18 @@ function drawChart() {
|
|||
new Date("2022-11-24")
|
||||
],
|
||||
[
|
||||
"Morecambe Net",
|
||||
"Self-Employed, Morecambe Net",
|
||||
"Web Developer",
|
||||
"#BCBC7E",
|
||||
"#FCFCA6",
|
||||
new Date("2022-10-26"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-02-01")
|
||||
],
|
||||
[
|
||||
"Chartered Institute for Information Security",
|
||||
"Associate Member",
|
||||
"#BBBBB0",
|
||||
"#FFFFF0",
|
||||
new Date("2022-08-09"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-05-31")
|
||||
],
|
||||
[
|
||||
"West Lancs Scouts Active Support",
|
||||
|
@ -105,114 +126,114 @@ function drawChart() {
|
|||
[
|
||||
"Advanced Programming Specialist Group",
|
||||
"Member",
|
||||
"#BBBBB0",
|
||||
"#FFFFF0",
|
||||
new Date("2022-06-06"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-05-26")
|
||||
],
|
||||
[
|
||||
"Computer Arts Society",
|
||||
"Member",
|
||||
"#BBBBB0",
|
||||
"#FFFFF0",
|
||||
new Date("2022-06-06"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-05-26")
|
||||
],
|
||||
[
|
||||
"Computer Conservation Society",
|
||||
"Member",
|
||||
"#BBBBB0",
|
||||
"#FFFFF0",
|
||||
new Date("2022-06-06"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-05-26")
|
||||
],
|
||||
[
|
||||
"Consultancy Specialist Group",
|
||||
"Member",
|
||||
"#BBBBB0",
|
||||
"#FFFFF0",
|
||||
new Date("2022-06-06"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-05-26")
|
||||
],
|
||||
[
|
||||
"Enterprise Architecture Specialist Group",
|
||||
"Member",
|
||||
"#BBBBB0",
|
||||
"#FFFFF0",
|
||||
new Date("2022-06-06"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-05-26")
|
||||
],
|
||||
[
|
||||
"Green IT Specialist Group",
|
||||
"Member",
|
||||
"#BBBBB0",
|
||||
"#FFFFF0",
|
||||
new Date("2022-06-06"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-05-26")
|
||||
],
|
||||
[
|
||||
"Health & Care Specialist Group",
|
||||
"Member",
|
||||
"#BBBBB0",
|
||||
"#FFFFF0",
|
||||
new Date("2022-06-06"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-05-26")
|
||||
],
|
||||
[
|
||||
"Internet Specialist Group",
|
||||
"Member",
|
||||
"#BBBBB0",
|
||||
"#FFFFF0",
|
||||
new Date("2022-06-06"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-05-26")
|
||||
],
|
||||
[
|
||||
"Information Risk Management and Assurance Specialist Group",
|
||||
"Member",
|
||||
"#BBBBB0",
|
||||
"#FFFFF0",
|
||||
new Date("2022-06-06"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-05-26")
|
||||
],
|
||||
[
|
||||
"Information Security Specialist Group",
|
||||
"Member",
|
||||
"#BBBBB0",
|
||||
"#FFFFF0",
|
||||
new Date("2022-06-06"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-05-26")
|
||||
],
|
||||
[
|
||||
"IT Ethics Specialist Group",
|
||||
"Member",
|
||||
"#BBBBB0",
|
||||
"#FFFFF0",
|
||||
new Date("2022-06-06"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-05-26")
|
||||
],
|
||||
[
|
||||
"Law Specialist Group",
|
||||
"Member",
|
||||
"#BBBBB0",
|
||||
"#FFFFF0",
|
||||
new Date("2022-06-06"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-05-26")
|
||||
],
|
||||
[
|
||||
"BCS Nottingham & Derby Branch",
|
||||
"Member",
|
||||
"#BBBBB0",
|
||||
"#FFFFF0",
|
||||
new Date("2022-06-06"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-05-26")
|
||||
],
|
||||
[
|
||||
"Open Source Specialist Group",
|
||||
"Member",
|
||||
"#BBBBB0",
|
||||
"#FFFFF0",
|
||||
new Date("2022-06-06"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-05-26")
|
||||
],
|
||||
[
|
||||
"Sociotechnical Specialist Group",
|
||||
"Member",
|
||||
"#BBBBB0",
|
||||
"#FFFFF0",
|
||||
new Date("2022-06-06"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-05-26")
|
||||
],
|
||||
[
|
||||
"BCS, the Chartered Institute for IT",
|
||||
"Professional Member",
|
||||
"#BBBBB0",
|
||||
"#FFFFF0",
|
||||
new Date("2022-06-06"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-05-26")
|
||||
],
|
||||
[
|
||||
"Chartered Institute for Information Security",
|
||||
|
@ -231,9 +252,9 @@ function drawChart() {
|
|||
[
|
||||
"BCS, the Chartered Institute for IT",
|
||||
"Student Member",
|
||||
"#BBBBB0",
|
||||
"#FFFFF0",
|
||||
new Date("2022-05-26"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2022-06-06")
|
||||
],
|
||||
[
|
||||
"MORS Cyber CoP",
|
||||
|
@ -275,7 +296,7 @@ function drawChart() {
|
|||
"Supporter",
|
||||
"#BBBBB0",
|
||||
new Date("2022-01-14"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-06-30")
|
||||
],
|
||||
[
|
||||
"Actica Consulting",
|
||||
|
@ -331,14 +352,14 @@ function drawChart() {
|
|||
"Member",
|
||||
"#BBBBB0",
|
||||
new Date("2021-09-24"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-06-30")
|
||||
],
|
||||
[
|
||||
"Mountain Training Association",
|
||||
"Trainee Member",
|
||||
"#BBBBB0",
|
||||
new Date("2021-08-24"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-06-30")
|
||||
],
|
||||
[
|
||||
"North West Area Meeting",
|
||||
|
@ -352,7 +373,7 @@ function drawChart() {
|
|||
"Member",
|
||||
"#BBBBB0",
|
||||
new Date("2021-07-26"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-06-30")
|
||||
],
|
||||
[
|
||||
"Lancaster Quaker Meeting",
|
||||
|
@ -397,19 +418,12 @@ function drawChart() {
|
|||
new Date("2022-04-15")
|
||||
],
|
||||
[
|
||||
"Morecambe Net",
|
||||
"Self-Employed, Morecambe Net",
|
||||
"Web Developer",
|
||||
"#FCFCA6",
|
||||
new Date("2021-01-24"),
|
||||
new Date("2021-10-03")
|
||||
],
|
||||
[
|
||||
"CSS Selectors as Fragment Identifiers Community Group",
|
||||
"Participant",
|
||||
"#BBBBB0",
|
||||
new Date("2021-01-23"),
|
||||
new Date("2023-04-13")
|
||||
],
|
||||
[
|
||||
"footnotes",
|
||||
"Contributor",
|
||||
|
@ -417,6 +431,13 @@ function drawChart() {
|
|||
new Date("2021-01-23"),
|
||||
new Date("2022-03-08")
|
||||
],
|
||||
[
|
||||
"CSS Selectors as Fragment Identifiers Community Group",
|
||||
"Participant",
|
||||
"#FFFFF0",
|
||||
new Date("2021-01-23"),
|
||||
new Date("2023-04-07")
|
||||
],
|
||||
[
|
||||
"The Scout Association",
|
||||
"UK Contingent – 16th World Scout Moot",
|
||||
|
@ -443,7 +464,7 @@ function drawChart() {
|
|||
"Member",
|
||||
"#BBBBB0",
|
||||
new Date("2020-09-29"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-06-30")
|
||||
],
|
||||
[
|
||||
"Executive Committee",
|
||||
|
@ -464,14 +485,7 @@ function drawChart() {
|
|||
"Website Content Manager",
|
||||
"#BBBBB0",
|
||||
new Date("2020-08-31"),
|
||||
new Date("2023-04-13")
|
||||
],
|
||||
[
|
||||
"Unity2020",
|
||||
"Volunteer",
|
||||
"#FFFFF0",
|
||||
new Date("2020-07-08"),
|
||||
new Date("2020-08-21")
|
||||
new Date("2023-06-30")
|
||||
],
|
||||
[
|
||||
"Digital & Data Scout Active Support Unit",
|
||||
|
@ -618,14 +632,14 @@ function drawChart() {
|
|||
"Associate Member",
|
||||
"#BBBBB0",
|
||||
new Date("2019-04-01"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-06-30")
|
||||
],
|
||||
[
|
||||
"Youth Hostel Association",
|
||||
"Company Member",
|
||||
"#BBBBB0",
|
||||
new Date("2019-02-20"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-06-30")
|
||||
],
|
||||
[
|
||||
"Friends of Lancaster Library",
|
||||
|
@ -807,14 +821,14 @@ function drawChart() {
|
|||
"Member",
|
||||
"#BBBBB0",
|
||||
new Date("2018-06-20"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-06-30")
|
||||
],
|
||||
[
|
||||
"UK England Chapter",
|
||||
"Member",
|
||||
"#BBBBB0",
|
||||
new Date("2018-06-13"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-06-30")
|
||||
],
|
||||
[
|
||||
"Community Networks SIG",
|
||||
|
@ -828,14 +842,14 @@ function drawChart() {
|
|||
"Member",
|
||||
"#BBBBB0",
|
||||
new Date("2018-06-06"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-06-30")
|
||||
],
|
||||
[
|
||||
"Internet Society",
|
||||
"Member",
|
||||
"#BBBBB0",
|
||||
new Date("2018-06-04"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-06-30")
|
||||
],
|
||||
[
|
||||
"Mitigate Cyber",
|
||||
|
@ -979,7 +993,7 @@ function drawChart() {
|
|||
],
|
||||
[
|
||||
"Graduate College",
|
||||
"MCR Member",
|
||||
"Member",
|
||||
"#FFFFF0",
|
||||
new Date("2017-10-05"),
|
||||
new Date("2018-12-12")
|
||||
|
@ -1024,7 +1038,7 @@ function drawChart() {
|
|||
"Member",
|
||||
"#BBBBB0",
|
||||
new Date("2017-06-06"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-06-30")
|
||||
],
|
||||
[
|
||||
"Lonsdale District Scout Network, Scout Network",
|
||||
|
@ -1087,7 +1101,7 @@ function drawChart() {
|
|||
"Member",
|
||||
"#BBBBB0",
|
||||
new Date("2016-12-19"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-06-30")
|
||||
],
|
||||
[
|
||||
"Pendle College, Lancaster University Students' Union",
|
||||
|
@ -1458,7 +1472,7 @@ function drawChart() {
|
|||
"Librarian",
|
||||
"#BBBBB0",
|
||||
new Date("2013-05-01"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-06-30")
|
||||
],
|
||||
[
|
||||
"Patient Participation Group",
|
||||
|
@ -1514,7 +1528,7 @@ function drawChart() {
|
|||
"Minister",
|
||||
"#BBBBB0",
|
||||
new Date("2012-01-01"),
|
||||
new Date("2023-04-13")
|
||||
new Date("2023-06-30")
|
||||
],
|
||||
[
|
||||
"Salvation Army",
|
||||
|
|
|
@ -2,12 +2,11 @@
|
|||
|
||||
{{ partialCached "copying.html" . }}
|
||||
|
||||
<html lang="en-gb" itemscope itemtype="https://schema.org/WebSite">
|
||||
<html class="h-card" lang="en-gb" itemscope itemtype="https://schema.org/Blog">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, intitial-scale=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="robots" content="noindex">
|
||||
<!--<meta http-equiv="Content-Security-Policy" content="default-src 'self'">-->
|
||||
<meta name="theme-color" content="#FFFFF0">
|
||||
<meta name="description" content="{{ block "head-description" . }}{{ $.Site.Params.description | html }}{{ end }}">
|
||||
<meta name="twitter:dnt" content="on">
|
||||
|
@ -15,17 +14,25 @@
|
|||
<title itemprop="name">{{- block "title" . -}}{{- .Site.Title }} | {{ .Site.Params.tagline -}}{{- end -}}</title>
|
||||
|
||||
<link rel="license" href="{{ block "head-license" . }}https://creativecommons.org/publicdomain/zero/1.0/{{ end }}">
|
||||
<link rel="me" href="mailto:me+bg@bengoldsworthy.net">
|
||||
<link rel="icon" sizes="192x192" href="/images/icon.png">
|
||||
<link class="u-url u-uid" rel="me" href="{{ .Site.Home.Permalink }}">
|
||||
<link class="u-email" rel="me" href="mailto:me+bg@bengoldsworthy.net">
|
||||
<link class="u-url" rel="me" href="https://github.com/Rumperuu">
|
||||
<link class="u-url" rel="me" href="https://news.ycombinator.com/user?id=Rumperuu">
|
||||
<link class="u-logo" rel="icon" sizes="192x192" href="/images/icon.png">
|
||||
<link class="u-key" rel="author" href="{{ .Site.Params.keyfile }}">
|
||||
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
|
||||
{{ with .OutputFormats.Get "rss" }}<link rel="{{ .Rel }}" type="{{ .MediaType.Type | html }}" href="{{ .RelPermalink }}" title="{{ $.Site.Title | safeHTML }}" />{{ end }}
|
||||
|
||||
<link href="/css/sanitize.css" rel="stylesheet" />
|
||||
{{- $sass := resources.Get "css/main.scss" }}
|
||||
{{- $style := $sass | resources.ToCSS | resources.Fingerprint }}
|
||||
<link rel="stylesheet" type="text/css" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity | html }}">
|
||||
{{- block "header-styles" . -}}<!-- -->{{- end -}}
|
||||
|
||||
{{- block "header-scripts" . -}}<!-- -->{{- end -}}
|
||||
|
||||
{{- block "header-styles" . -}}<!-- -->{{- end -}}
|
||||
</head>
|
||||
|
||||
<body class="site-container site-container{{ block "main-class" . }}{{ end }}">
|
||||
|
@ -33,11 +40,11 @@
|
|||
{{- partialCached "header/site-header.html" . -}}
|
||||
{{- end }}
|
||||
|
||||
<main class="site-content site-content{{ block "main-class" . }}{{ end }}" itemscope itemtype="{{ block "main-type" . }}https://schema.org/Thing{{ end }}">
|
||||
<article class="{{ block "article-class" . }}h-entry {{ end }}site-content site-content{{ block "main-class" . }}{{ end }}" itemscope itemtype="https://schema.org/BlogPosting">
|
||||
{{ block "main-header" . }}{{ end }}
|
||||
{{ block "main-body" . }}{{ end }}
|
||||
{{ block "main-footer" . }}{{ end }}
|
||||
</main>
|
||||
</article>
|
||||
|
||||
{{- block "footer" . -}}
|
||||
<footer class="site-footer">
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
|
||||
{{ define "main-header" }}
|
||||
<header class="site-content__header">
|
||||
<h1 class="page-title">{{ .Type | singularize }}: <q>{{ .Title | safeHTML }}</q>
|
||||
<h2 class="page-title">{{ .Type | singularize }}: <q>{{ .Title | safeHTML }}</q>
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
<a href="{{ .RelPermalink }}">
|
||||
<img class="feed-icon" src="/images/feed-icon.png">
|
||||
<a href="{{ .RelPermalink }}" aria-label="{{ $.Title }} RSS feed">
|
||||
<img class="feed-icon" alt="RSS icon" src="{{ $.Site.Params.feedIcon }}">
|
||||
</a>
|
||||
{{ end }}
|
||||
</h1>
|
||||
</h2>
|
||||
{{ .Content }}
|
||||
|
||||
<nav class="page-header__minor-links">
|
||||
|
|
|
@ -10,13 +10,13 @@
|
|||
|
||||
{{ define "main-header" }}
|
||||
<header class="site-content__header">
|
||||
<h1 class="page-title">{{ .Title | safeHTML }}
|
||||
<h2 class="page-title">{{ .Title | safeHTML }}
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
<a href="{{ .RelPermalink }}">
|
||||
<img class="feed-icon" src="/images/feed-icon.png">
|
||||
<a href="{{ .RelPermalink }}" aria-label="{{ $.Title }} RSS feed">
|
||||
<img class="feed-icon" alt="RSS icon" src="{{ $.Site.Params.feedIcon }}">
|
||||
</a>
|
||||
{{ end }}
|
||||
</h1>
|
||||
</h2>
|
||||
{{ .Content }}
|
||||
</header>
|
||||
{{ end }}
|
||||
|
|
|
@ -6,42 +6,14 @@
|
|||
|
||||
{{ define "footer-scripts" }}
|
||||
{{ with .Params.locations }}
|
||||
<script src="https://www.openlayers.org/api/OpenLayers.js"></script>
|
||||
<script>
|
||||
map = new OpenLayers.Map("mapdiv");
|
||||
map.addLayer(new OpenLayers.Layer.OSM());
|
||||
|
||||
var lonLats = [];
|
||||
{{ range . }}
|
||||
{{ with ( index $.Site.Data.locations . ) }}
|
||||
lonLats.push(new OpenLayers.LonLat( {{ .lon }} , {{ .lat }} )
|
||||
.transform(
|
||||
new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984
|
||||
map.getProjectionObject() // to Spherical Mercator Projection
|
||||
));
|
||||
{{ else }}
|
||||
{{ warnf "Could not find lat-lon for %q (%q)" . $.File.Path }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
/* TODO: Smarter zoom selection */
|
||||
var zoom=5;
|
||||
|
||||
var markers = new OpenLayers.Layer.Markers( "Markers" );
|
||||
map.addLayer(markers);
|
||||
|
||||
for (var i = 0; i < lonLats.length; i++) {
|
||||
markers.addMarker(new OpenLayers.Marker(lonLats[i]));
|
||||
}
|
||||
|
||||
/* TODO: Smarter centering */
|
||||
map.setCenter(lonLats[0], zoom);
|
||||
</script>
|
||||
<script src="/js/openlayers.js"></script>
|
||||
{{ $script := resources.Get "js/render-meta-map.js" | resources.ExecuteAsTemplate "render-meta-map.js" . }}
|
||||
<script src="{{ $script.RelPermalink }}"></script>
|
||||
{{ end }}
|
||||
{{ with .Params.scripts }}
|
||||
{{ if in . "mathjax" }}
|
||||
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
|
||||
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
||||
<script src="/js/polyfill.js"></script>
|
||||
<script id="MathJax-script" async src="/js/mathjax.js"></script>
|
||||
<script src="/js/mathjax-config.js"></script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
@ -58,9 +30,9 @@
|
|||
{{ end }}
|
||||
{{ end }}>
|
||||
<div class="article-header__title-wrapper">
|
||||
<h1 class="article-header__title{{ if gt ( len ( .Title | plainify ) ) 40 }} article-header__title--long{{ end }}">
|
||||
<h2 class="article-header__title{{ if gt ( len ( .Title | plainify ) ) 40 }} article-header__title--long{{ end }}">
|
||||
<span role="text" itemprop="name">{{ .Title | safeHTML }}</span>
|
||||
</h1>
|
||||
</h2>
|
||||
{{ with .Params.subtitle }}
|
||||
<p class="article-header__subtitle">{{ . | safeHTML }}</p>
|
||||
{{ end }}
|
||||
|
@ -102,7 +74,7 @@
|
|||
|
||||
{{ if and ( .TableOfContents ) ( ne .TableOfContents "<nav id=\"TableOfContents\"></nav>" ) }}
|
||||
<nav class="article-header__table-of-contents">
|
||||
<h2 class="article-header__subtitle">Table of Contents</h2>
|
||||
<h3 class="article-header__subtitle">Table of Contents</h3>
|
||||
{{ .TableOfContents }}
|
||||
</nav>
|
||||
{{ end }}
|
||||
|
@ -110,9 +82,39 @@
|
|||
{{ end }}
|
||||
|
||||
{{ define "main-body" }}
|
||||
<article class="site-content__body">
|
||||
<section class="site-content__body">
|
||||
{{- if ( or .Params.internal_links .Params.external_links ) -}}
|
||||
<section class="article__links">
|
||||
{{- with .Params.internal_links -}}
|
||||
<h3>Internal Links</h3>
|
||||
<ul>
|
||||
{{- range . -}}
|
||||
{{ if eq ( printf "%T" . ) "map[string]interface {}" }}
|
||||
<li><a href="{{ .link }}">{{ .title | safeHTML }}</a></li>
|
||||
{{ else }}
|
||||
<li><a href="{{ . }}">Link</a></li>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
</ul>
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Params.external_links -}}
|
||||
<h3>External Links</h3>
|
||||
<ul>
|
||||
{{- range . -}}
|
||||
{{ if eq ( printf "%T" . ) "map[string]interface {}" }}
|
||||
<li><a href="{{ .link }}" rel="noopener noreferrer" target="_blank">{{ .title | safeHTML }}</a></li>
|
||||
{{ else }}
|
||||
<li><a href="{{ . }}" rel="noopener noreferrer" target="_blank">Link</a></li>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
</ul>
|
||||
{{- end -}}
|
||||
</section>
|
||||
{{- end -}}
|
||||
|
||||
{{ .Content }}
|
||||
</article>
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
{{ define "main-footer" }}
|
||||
|
|
|
@ -63,30 +63,30 @@
|
|||
|
||||
{{ define "main-header" }}
|
||||
<header class="site-content__header">
|
||||
<h1 class="page-title">{{ .Title | safeHTML }}
|
||||
<h2 class="page-title">{{ .Title | safeHTML }}
|
||||
{{ if eq .Type "blog" }}
|
||||
{{ with .GetPage "blog/posts" }}
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
<a href="{{ .RelPermalink }}">
|
||||
<img class="feed-icon" src="{{ $.Site.Params.feedIcon }}">
|
||||
<a href="{{ .RelPermalink }}" aria-label="{{ $.Title }} RSS feed">
|
||||
<img class="feed-icon" alt="RSS icon" src="{{ $.Site.Params.feedIcon }}">
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
<a href="{{ .RelPermalink }}">
|
||||
<img class="feed-icon" src="{{ $.Site.Params.feedIcon }}">
|
||||
<a href="{{ .RelPermalink }}" aria-label="{{ $.Title }} RSS feed">
|
||||
<img class="feed-icon" alt="RSS icon" src="{{ $.Site.Params.feedIcon }}">
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</h1>
|
||||
</h2>
|
||||
{{ .Content }}
|
||||
|
||||
<nav class="page-header__minor-links">
|
||||
<ul class="minor-links__categories">
|
||||
<li><a href="/series"><h2>Series’</h2></a> <p>({{ len .Site.Taxonomies.series }})</p></li>
|
||||
<li><a href="/series"><h3>Series’</h3></a> <p>({{ len .Site.Taxonomies.series }})</p></li>
|
||||
{{ range .Site.Taxonomies.categories }}
|
||||
<li><a href="{{ .Page.RelPermalink }}"><h2>{{ .Page.Title | safeHTML }}</h2></a> <p>({{ len . }})</p></li>
|
||||
<li><a href="{{ .Page.RelPermalink }}"><h3>{{ .Page.Title | safeHTML }}</h3></a> <p>({{ len . }})</p></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ if eq .Type "blog" }}
|
||||
|
|
|
@ -4,55 +4,56 @@
|
|||
|
||||
{{ define "main-class" }}--single{{ end }}
|
||||
|
||||
{{ define "header-scripts" }}
|
||||
{{ with .Params.locations }}
|
||||
{{ $mapJS := resources.Get "js/leaflet.js" | fingerprint }}
|
||||
<script id="Map-script" src="{{ $mapJS.Permalink }}" integrity="{{ $mapJS.Data.Integrity }}"></script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "header-styles" }}
|
||||
{{ with .Params.styles }}
|
||||
<link rel="stylesheet" type="text/css" href="{{ ( $.Page.Resources.GetMatch "style").RelPermalink }}">
|
||||
{{ end }}
|
||||
{{ with .Params.locations }}
|
||||
<link rel="stylesheet" href="/css/leaflet.css">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "footer-scripts" }}
|
||||
{{ with .Params.locations }}
|
||||
<script src="https://www.openlayers.org/api/OpenLayers.js"></script>
|
||||
<script>
|
||||
map = new OpenLayers.Map("mapdiv");
|
||||
map.addLayer(new OpenLayers.Layer.OSM());
|
||||
var map = L.map('map').setView([55, -3], 13);
|
||||
|
||||
var lonLats = [];
|
||||
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
maxZoom: 19,
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
||||
}).addTo(map);
|
||||
|
||||
var latLons = [];
|
||||
{{ range . }}
|
||||
{{ with ( index $.Site.Data.locations . ) }}
|
||||
lonLats.push(new OpenLayers.LonLat( {{ .lon }} , {{ .lat }} )
|
||||
.transform(
|
||||
new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984
|
||||
map.getProjectionObject() // to Spherical Mercator Projection
|
||||
));
|
||||
L.marker([{{ .lat }}, {{ .lon }}]).addTo(map);
|
||||
latLons.push([{{ .lat }}, {{ .lon }}]);
|
||||
{{ else }}
|
||||
{{ warnf "Could not find lat-lon for %q (%q)" . $.File.Path }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
/* TODO: Smarter zoom selection */
|
||||
var zoom=5;
|
||||
|
||||
var markers = new OpenLayers.Layer.Markers( "Markers" );
|
||||
map.addLayer(markers);
|
||||
|
||||
for (var i = 0; i < lonLats.length; i++) {
|
||||
markers.addMarker(new OpenLayers.Marker(lonLats[i]));
|
||||
}
|
||||
|
||||
/* TODO: Smarter centering */
|
||||
map.setCenter(lonLats[0], zoom);
|
||||
map.fitBounds(latLons);
|
||||
</script>
|
||||
{{ end }}
|
||||
{{ with .Params.scripts }}
|
||||
{{ if in . "mathjax" }}
|
||||
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
|
||||
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
||||
<script src="/js/mathjax-config.js"></script>
|
||||
{{ $mathJaxCoreJS := resources.Get "js/mathjax.js" | fingerprint }}
|
||||
{{ $mathJaxConfigJS := resources.Get "js/mathjax-config.js" | js.Build | fingerprint }}
|
||||
<script id="MathJax-script" async src="{{ $mathJaxCoreJS.Permalink }}" integrity="{{ $mathJaxCoreJS.Data.Integrity }}"></script>
|
||||
<script id="MathJax-config-script" async src="{{ $mathJaxConfigJS.Permalink }}" integrity="{{ $mathJaxConfigJS.Data.Integrity }}"></script>
|
||||
{{ end }}
|
||||
{{ if in . "charts" }}
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script src="{{ ( $.Page.Resources.GetMatch "charts-init").RelPermalink }}"></script>
|
||||
{{ $chartsCoreJS := resources.Get "js/chart.js" | fingerprint }}
|
||||
{{ $chartsConfigJS := $.Page.Resources.GetMatch "charts-init" }}
|
||||
<script id="Charts-script" src="{{ $chartsCoreJS.Permalink }}" integrity="{{ $chartsCoreJS.Data.Integrity }}"></script>
|
||||
<script id="Charts-config-script" src="{{ $chartsConfigJS.Permalink }}"></script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
@ -62,22 +63,50 @@
|
|||
{{ if .Params.series }}
|
||||
<p class="article-header__series">Part of series:
|
||||
{{ range ( .GetTerms "series" ) }}
|
||||
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
|
||||
<a class="u-url" href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
|
||||
{{ end }}
|
||||
</p>
|
||||
{{ end }}
|
||||
{{ with .Params.featured_image }}
|
||||
<img class="u-photo" style="display: none;" src="
|
||||
{{- with ( $.Resources.GetMatch . ) -}}
|
||||
{{- if eq .MediaType.SubType "svg" -}}
|
||||
{{- .RelPermalink -}}
|
||||
{{- else }}
|
||||
{{- with .Resize "1200x webp" -}}
|
||||
{{- .RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- . -}}
|
||||
{{- end -}}
|
||||
"
|
||||
itemprop="image"
|
||||
{{- with ( $.Resources.GetMatch . ) -}}
|
||||
alt="{{ .Params.alt }}"
|
||||
{{- end -}}
|
||||
/>
|
||||
{{ end }}
|
||||
<div class="article-header__featured-image"
|
||||
{{ if .Params.featured_image }}
|
||||
{{ if .Resources.GetMatch .Params.featured_image }}
|
||||
style="background-image: url({{ ( .Resources.GetMatch .Params.featured_image ).RelPermalink }})"
|
||||
{{ with .Resources.GetMatch .Params.featured_image }}
|
||||
{{ if eq .MediaType.SubType "svg" }}
|
||||
style="background-image: url({{ .RelPermalink }})"
|
||||
{{ else }}
|
||||
{{ with .Resize "1500x webp" }}
|
||||
style="background-image: url({{ .RelPermalink }})"
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
style="background-image: url({{ .Params.featured_image }})"
|
||||
{{ end }}
|
||||
{{ end }}>
|
||||
<div class="article-header__title-wrapper">
|
||||
<h1 class="article-header__title{{ if gt ( len ( .Title | plainify ) ) 40 }} article-header__title--long{{ end }}">
|
||||
<span role="text" itemprop="name">{{ .Title | safeHTML }}</span>
|
||||
</h1>
|
||||
{{ end -}}
|
||||
>
|
||||
<div class=" article-header__title-wrapper">
|
||||
<p class="p-name" style="display: none;" itemprop="name"><a class="u-url u-uid" href="{{ .Permalink }}">{{ .Title | safeHTML }}{{ with .Params.subtitle }}: {{ . | safeHTML }}{{ end }}</a></p>
|
||||
<h2 class="article-header__title{{ if gt ( len ( .Title | plainify ) ) 40 }} article-header__title--long{{ end }}">
|
||||
{{- .Title | safeHTML -}}
|
||||
</h2>
|
||||
{{ with .Params.subtitle }}
|
||||
<p class="article-header__subtitle">{{ . | safeHTML }}</p>
|
||||
{{ end }}
|
||||
|
@ -93,8 +122,27 @@
|
|||
</div>
|
||||
|
||||
<p class="article-header__word-count">~<span itemprop="wordCount">{{ .FuzzyWordCount | lang.NumFmt 0 }}</span> words</p>
|
||||
<p class="article-header__publish-date">Published: <span itemprop="datePublished" datetime="{{ .PublishDate }}">{{ .PublishDate.Format "January 2" }}<sup>{{ if in (slice 1 21 31) .PublishDate.Day}}st{{ else if in (slice 2 22) .PublishDate.Day}}nd{{ else if in (slice 3 23) .PublishDate.Day}}rd{{ else }}th{{ end }}</sup>, 1{{ .PublishDate.Format "2006" | lang.NumFmt 0 }} <abbr style="text-transform: small-caps; font-size: 0.8em;" title="Holocene Era">HE</abbr></span></p>
|
||||
<p class="article-header__modified-date">Last modified: <span itemprop="dateModified" datetime="{{ .Lastmod }}">{{ .Lastmod.Format "January 2" }}<sup>{{ if in (slice 1 21 31) .Lastmod.Day}}st{{ else if in (slice 2 22) .Lastmod.Day}}nd{{ else if in (slice 3 23) .Lastmod.Day}}rd{{ else }}th{{ end }}</sup>, 1{{ .Lastmod.Format "2006" | lang.NumFmt 0 }} <abbr style="text-transform: small-caps; font-size: 0.8em;" title="Holocene Era">HE</abbr></span></p>
|
||||
|
||||
<p class="article-header__publish-date">Published: <time class="dt-published" datetime="{{ .PublishDate | time.Format "2006-01-02T15:04:05-07:00" }}" itemprop="datePublished">{{ .PublishDate.Format "January 2" }}<sup>{{ if in (slice 1 21 31) .PublishDate.Day}}st{{ else if in (slice 2 22) .PublishDate.Day}}nd{{ else if in (slice 3 23) .PublishDate.Day}}rd{{ else }}th{{ end }}</sup>, 1{{ .PublishDate.Format "2006" | lang.NumFmt 0 }} <abbr style="font-variant: small-caps; font-size: 0.8em;" title="Holocene Era">HE</abbr></time></p>
|
||||
|
||||
<p class="article-header__modified-date">Last modified: <time class="dt-updated" datetime="{{ .Lastmod | time.Format "2006-01-02T15:04:05-07:00" }}" itemprop="dateModified">{{ .Lastmod.Format "January 2" }}<sup>{{ if in (slice 1 21 31) .Lastmod.Day}}st{{ else if in (slice 2 22) .Lastmod.Day}}nd{{ else if in (slice 3 23) .Lastmod.Day}}rd{{ else }}th{{ end }}</sup>, 1{{ .Lastmod.Format "2006" | lang.NumFmt 0 }} <abbr style="font-variant: small-caps; font-size: 0.8em;" title="Holocene Era">HE</abbr></time></p>
|
||||
|
||||
<p style="display: none">Author{{ with .Params.authors }}s{{ end }}:
|
||||
{{- with .Params.authors -}}
|
||||
</p>
|
||||
<ul>
|
||||
{{- range . -}}
|
||||
{{- if ( eq . .Site.Author.name ) -}}
|
||||
<li><p><a class="p-author" itemprop="author" rel="author" href="{{ .Site.Home.Permalink }}">{{ .Site.Author.name }}</a></p></li>
|
||||
{{- else -}}
|
||||
<li><p class="p-author" itemprop="author">{{- . -}}</p></li>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</ul>
|
||||
{{- else -}}
|
||||
<a class="p-author" itemprop="author" rel="author" href="{{ .Site.Home.Permalink }}">{{ .Site.Author.name }}</a>
|
||||
{{- end -}}
|
||||
</p>
|
||||
|
||||
{{ $post_age_in_years := math.Round ( div ( div ( now.Sub .PublishDate ).Hours 24 ) 365 ) }}
|
||||
{{ if ( or .Params.site .Params.controversial ( gt $post_age_in_years 2 ) ) }}
|
||||
|
@ -119,25 +167,76 @@
|
|||
|
||||
{{ if and ( .TableOfContents ) ( ne .TableOfContents "<nav id=\"TableOfContents\"></nav>" ) }}
|
||||
<nav class="article-header__table-of-contents">
|
||||
<h2 class="article-header__subtitle">Table of Contents</h2>
|
||||
<h3 class="article-header__subtitle">Table of Contents</h3>
|
||||
{{ .TableOfContents }}
|
||||
{{- if fileExists ( path.Join $.Page.File.Dir "appendices.md" ) -}}
|
||||
<ul class="toc-list--appendices">
|
||||
<li><a href="#appendices">Appendices</a>
|
||||
<ol>
|
||||
{{ range .Params.appendices }}
|
||||
<li><a href="#{{ . | anchorize }}">{{ . | safeHTML }}</a></li>
|
||||
{{ end }}
|
||||
</ol>
|
||||
</li>
|
||||
</ul>
|
||||
{{- end -}}
|
||||
</nav>
|
||||
{{ end }}
|
||||
</header>
|
||||
{{ end }}
|
||||
|
||||
{{ define "main-body" }}
|
||||
<article class="site-content__body" itemprop="articleBody">
|
||||
{{ .Content }}
|
||||
{{ if fileExists ( path.Join $.Page.File.Dir "appendices.md" ) }}
|
||||
<section class="article-body__appendices">
|
||||
<h2 class="subheading subheading--appendices">Appendices</h2>
|
||||
{{ warnf "Getting appendix for '%v'" $.File.Dir }}
|
||||
{{ $file := path.Join $.Page.File.Dir "appendices.md" }}
|
||||
{{ $file | markdownify }}
|
||||
<section class="site-content__body" itemprop="articleBody">
|
||||
|
||||
{{ with .Summary }}
|
||||
<section class="article-body__summary" itemprop="abstract">
|
||||
<h2>Summary</h2>
|
||||
<p class="p-summary">{{ . }}</p>
|
||||
</section>
|
||||
{{ end }}
|
||||
</article>
|
||||
|
||||
{{- if ( or .Params.internal_links .Params.external_links ) -}}
|
||||
<section class="article__links">
|
||||
{{- with .Params.internal_links -}}
|
||||
<h3>Internal Links</h3>
|
||||
<ul>
|
||||
{{- range . -}}
|
||||
{{ if eq ( printf "%T" . ) "map[string]interface {}" }}
|
||||
<li><a class="button" href="{{ .link }}">{{ .title | safeHTML }}</a></li>
|
||||
{{ else }}
|
||||
<li><a class="button" href="{{ . }}">Link</a></li>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
</ul>
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Params.external_links -}}
|
||||
<h3>External Links</h3>
|
||||
<ul>
|
||||
{{- range . -}}
|
||||
{{ if eq ( printf "%T" . ) "map[string]interface {}" }}
|
||||
<li><a class="button" href="{{ .link }}">{{ .title | safeHTML }}</a></li>
|
||||
{{ else }}
|
||||
<li><a class="button" href="{{ . }}">Link</a></li>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
</ul>
|
||||
{{- end -}}
|
||||
</section>
|
||||
{{- end -}}
|
||||
|
||||
<section class="e-content article-body__content" itemprop="articleBody">
|
||||
{{ .Content }}
|
||||
</section>
|
||||
|
||||
{{ if fileExists ( path.Join $.Page.File.Dir "appendices.md" ) }}
|
||||
<section class="article-body__appendices">
|
||||
<h2 class="subheading subheading--appendices" id="appendices">Appendices</h2>
|
||||
{{ $file := path.Join $.Page.File.Dir "appendices.md" | readFile }}
|
||||
{{ $file | .RenderString }}
|
||||
</section>
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
{{ define "main-footer" }}
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
|
||||
{{ define "header-scripts" }}
|
||||
{{ if ( or ( eq .Type "cv" ) ( .IsDescendant ( .GetPage "/cv/organisations" ) ) ) }}
|
||||
<script type="text/javascript" src="/js/google-charts.js"></script>
|
||||
{{ $googleChartsJS := resources.Get "js/google-charts.js" | fingerprint }}
|
||||
<script id="Google-Charts-script" src="{{ $googleChartsJS.Permalink }}" integrity="{{ $googleChartsJS.Data.Integrity }}"></script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
|
|
@ -43,20 +43,20 @@ L.HeatLayer=(L.Layer?L.Layer:L.Class).extend({initialize:function(t,i){this._lat
|
|||
{{ .Scratch.Set "maxItems" 0 }}
|
||||
{{ .Scratch.Set "numOfItems" 0 }}
|
||||
|
||||
{{ warnf "No of locations: %v" ( len $.Site.Data.locations ) }}
|
||||
/* warnf "No of locations: %v" ( len $.Site.Data.locations ) */
|
||||
{{ range $key, $value := $.Site.Data.locations }}
|
||||
{{ $childPosts := where $.Site.Pages ".Params.locations" "intersect" ( slice $key ) }}
|
||||
{{ warnf "Current location: %v" $key }}
|
||||
{{ warnf "Child posts: %v" $childPosts }}
|
||||
/* warnf "Current location: %v" $key */
|
||||
/* warnf "Child posts: %v" $childPosts */
|
||||
{{ .Scratch.Set "numOfItems" ( len $childPosts ) }}
|
||||
{{ if ( gt ( .Scratch.Get "numOfItems" ) ( .Scratch.Get "maxItems" ) ) }}
|
||||
{{ warnf "Updating maxItems" }}
|
||||
/* warnf "Updating maxItems" */
|
||||
{{ .Scratch.Set "maxItems" ( .Scratch.Get "numOfItems" ) }}
|
||||
{{ warnf "New maxItems: %d" .Scratch.Get "maxItems" }}
|
||||
/* warnf "New maxItems: %d" .Scratch.Get "maxItems" */
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ warnf "maxItems: %v" ( .Scratch.Get "maxItems" ) }}
|
||||
/* warnf "maxItems: %v" ( .Scratch.Get "maxItems" ) */
|
||||
console.log({{ .Scratch.Get "maxItems" }});
|
||||
|
||||
L.heatLayer([
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
|
||||
{{ define "header-scripts" }}
|
||||
{{ if ( or ( eq .Type "cv" ) ( .IsDescendant ( .GetPage "/cv/organisations" ) ) ) }}
|
||||
<script type="text/javascript" src="/js/google-charts.js"></script>
|
||||
{{ $googleChartsJS := resources.Get "js/google-charts.js" | fingerprint }}
|
||||
<script id="Google-Charts-script" src="{{ $googleChartsJS.Permalink }}" integrity="{{ $googleChartsJS.Data.Integrity }}"></script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
@ -80,7 +81,7 @@
|
|||
</script>
|
||||
{{ else }}
|
||||
{{ $js := resources.Get "js/roles-chart.js" | resources.ExecuteAsTemplate "/js/render-roles-timeline.js" ( .GetPage "cv/roles" ) }}
|
||||
<script type="text/javascript" src="{{ $js.RelPermalink }}"></script>
|
||||
<script src="{{ $js.RelPermalink }}"></script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
@ -94,36 +95,39 @@
|
|||
{{ end }}
|
||||
{{ end }}>
|
||||
<div class="article-header__title-wrapper{{ if .Params.title_in_logo }} article-header__title-wrapper--no-title{{ end }}">
|
||||
<h1 class="article-header__title">{{ if ( .Params.markup_title ) }}{{ .Params.markup_title | safeHTML }}{{ else }}{{ .Title }}{{ end }}</h1>
|
||||
<h2 class="article-header__title">{{ if ( .Params.markup_title ) }}{{ .Params.markup_title | safeHTML }}{{ else }}{{ .Title }}{{ end }}</h2>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{{ else }}
|
||||
<header class="site-content__header">
|
||||
<h1 class="page-title">{{ .Title | safeHTML }}.</h1>
|
||||
<h2 class="page-title">{{ .Title | safeHTML }}.</h2>
|
||||
{{ .Content }}
|
||||
{{ if eq .Type "cv" }}
|
||||
<nav class="page-header__minor-links">
|
||||
<ul>
|
||||
{{ range ( where .Sections "Type" "not in" ( slice "cv/roles" ) ).ByTitle }}
|
||||
<li><a href="{{ .RelPermalink }}"><h2>{{ .Title }}</h2></a> <p>({{ len (where ( where .Site.Pages "Section" "cv" ) "Parent.Title" .Title ) }})</p></li>
|
||||
<li><a href="{{ .RelPermalink }}"><h3>{{ .Title }}</h3></a> <p>({{ len (where ( where .Site.Pages "Section" "cv" ) "Parent.Title" .Title ) }})</p></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
{{ end }}
|
||||
{{ if eq .Type "cv" }}
|
||||
<aside class="timeline__legend">
|
||||
<div>
|
||||
<label for="legend__past">Past</label>
|
||||
<div id="legend__past">
|
||||
<span><div class="colour-square colour-square--unpaid-past"></div> <p>Unpaid</p></span>
|
||||
<span><div class="colour-square colour-square--paid-past"></div> <p>Paid</p></span>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
<div>
|
||||
<label for="legend__current">Current</label>
|
||||
<div id="legend__current">
|
||||
<span><div class="colour-square colour-square--unpaid-current"></div> <p>Unpaid</p></span>
|
||||
<span><div class="colour-square colour-square--paid-current"></div> <p>Paid</p></span>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
{{ end }}
|
||||
</header>
|
||||
|
@ -146,17 +150,20 @@
|
|||
|
||||
<section id="roles-timeline">
|
||||
<aside class="timeline__legend">
|
||||
<div>
|
||||
<label for="legend__past">Past</label>
|
||||
<div id="legend__past">
|
||||
<span><div class="colour-square colour-square--unpaid-past"></div> <p>Unpaid</p></span>
|
||||
<span><div class="colour-square colour-square--paid-past"></div> <p>Paid</p></span>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
<div>
|
||||
<label for="legend__current">Current</label>
|
||||
<div id="legend__current">
|
||||
<span><div class="colour-square colour-square--unpaid-current"></div> <p>Unpaid</p></span>
|
||||
<span><div class="colour-square colour-square--paid-current"></div> <p>Paid</p></span>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
<div id="timeline" aria-label="Role Time" role="img">Javascript must be enabled to view this chart.</div>
|
||||
</section>
|
||||
|
@ -219,7 +226,7 @@
|
|||
{{ if .IsDescendant ( .GetPage "/cv/organisations" ) }}
|
||||
<footer class="site-content__footer">
|
||||
<section id="hierarchy">
|
||||
<h2 class="subheading">Hierarchy</h2>
|
||||
<h3 class="subheading">Hierarchy</h3>
|
||||
{{ $.Scratch.Set "parents" ( slice ) }}
|
||||
{{ partial "cv/organisations/recursive-parents.html" (dict "c" . "g" $ ) }}
|
||||
{{- $parents := partial "reverse-slice.html" ( $.Scratch.Get "parents" ) -}}
|
||||
|
|
|
@ -2,12 +2,15 @@
|
|||
|
||||
{{ define "header" }} <!-- null --> {{ end }}
|
||||
|
||||
{{ define "article-class" }} <!-- null --> {{ end }}
|
||||
|
||||
{{ define "main-body" }}
|
||||
<h1 class="page-title">
|
||||
{{- with .Site.Params.pre_nominals }}<span class="pre-nominals">{{ . | safeHTML }}</span> {{ end -}}
|
||||
Ben Goldsworthy
|
||||
{{- with .Site.Params.post_nominals }} <span class="post-nominals">{{ . | safeHTML }}</span>{{ end -}}
|
||||
{{- with .Site.Params.pre_nominals }}<span class="pre-nominals p-honorific-prefix">{{ . | safeHTML }}</span> {{ end -}}
|
||||
<span class="p-name">Ben Goldsworthy</span>
|
||||
{{- with .Site.Params.post_nominals }} <span class="post-nominals p-honorific-suffix">{{ . | safeHTML }}</span>{{ end -}}
|
||||
</h1>
|
||||
<p class="p-note" style="display: none;">{{ .Site.Params.description }}</p>
|
||||
|
||||
{{ range ( where .Pages "Type" "in" site.Params.mainSections ).ByTitle }}<a href="{{ .RelPermalink }}"><h2>{{ .Title }}</h2></a>{{ end }}
|
||||
{{ end }}
|
||||
|
|
36
layouts/partials/cite.html
Normal file
36
layouts/partials/cite.html
Normal file
|
@ -0,0 +1,36 @@
|
|||
{{ with .Params.href -}}
|
||||
<a href="{{ if eq . "asCite" }}{{ $.Params.cite }}{{ else }}{{ . }}{{ end }}">
|
||||
{{- end -}}
|
||||
<cite class="cite{{ with .Params.citeStyle }} cite--{{ . }}{{ end }}"
|
||||
{{ with .Params.cite -}}cite="{{ . }}"{{- end }}
|
||||
itemscope
|
||||
itemprop="citation"
|
||||
itemtype="https://schema.org/
|
||||
{{- with .Params.schemaType -}}
|
||||
{{- . -}}
|
||||
{{- else -}}
|
||||
CreativeWork
|
||||
{{- end -}}"
|
||||
{{ if .Params.titleLang -}}
|
||||
lang="{{- .Params.titleLang -}}"
|
||||
title="{{- .Params.titleTr -}}"
|
||||
{{ end -}}
|
||||
>
|
||||
{{- with .Params.cite -}}<meta itemprop="url" content="{{ . }}">{{- end -}}
|
||||
<span itemprop="name">
|
||||
{{- if .Params.titleLang -}}
|
||||
<i lang="{{ .Params.titleLang }}" title="{{ .Params.titleTr }}">
|
||||
{{- end -}}
|
||||
{{- if .Params.shortTitle -}}
|
||||
{{- .Params.shortTitle | markdownify | safeHTML -}}
|
||||
{{- else -}}
|
||||
{{- .Params.title | markdownify | safeHTML -}}
|
||||
{{- end -}}
|
||||
{{- if .Params.titleLang -}}
|
||||
</i>
|
||||
{{- end -}}
|
||||
</span>{{- /**/ -}}
|
||||
</cite>
|
||||
{{- with .Params.href -}}
|
||||
</a>
|
||||
{{- end -}}
|
|
@ -1,12 +1,14 @@
|
|||
{{ "<!--" | safeHTML }}
|
||||
{{ .Site.Title}} - {{ .Site.Params.tagline }}
|
||||
|
||||
Page content written in {{ now.Format "2006" }} by {{ .Site.Author.name }} <{{ .Site.Author.email }}>
|
||||
This page was created by {{ .Site.Author.name }} <{{ .Site.Author.email }}>.
|
||||
The date of creation and last modification should be available within the page
|
||||
below.
|
||||
|
||||
To the extent possible under law, the author(s) have dedicated all copyright
|
||||
and related and neighboring rights to this software to the public domain
|
||||
worldwide. This software is distributed without any warranty.
|
||||
Unless stated otherwise, and to the extent possible under law, the author has
|
||||
dedicated all copyright and related and neighboring rights to this content to
|
||||
the public domain worldwide. This file is distributed without any warranty.
|
||||
|
||||
You should have received a copy of the CC0 Public Domain Dedication along
|
||||
with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||
See <http://creativecommons.org/publicdomain/zero/1.0/> for
|
||||
a copy of the CC0 Public Domain Dedication.
|
||||
{{ "-->" | safeHTML }}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{ if gt ( len .content ) 4 }}
|
||||
<details id="posts" class="org-items row">
|
||||
<details id="{{ .section_title | anchorize }}" class="org-items row">
|
||||
<summary>
|
||||
<h2 class="subheading">{{ .section_title }} ({{ len .content }})</h2>
|
||||
<div class="index">
|
||||
|
@ -15,7 +15,7 @@
|
|||
</div>
|
||||
</details>
|
||||
{{ else }}
|
||||
<div id="posts" class="org-items row">
|
||||
<div id="{{ .section_title | anchorize }}" class="org-items row">
|
||||
<h2 class="subheading">{{ .section_title }} ({{ len .content }})</h2>
|
||||
<div class="index">
|
||||
{{ range first 4 .content }}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<li class="hierarchy-item hierarchy-item--child"><a href="{{ .RelPermalink }}">{{ .Title | safeHTML }}</a>
|
||||
<li class="hierarchy-item hierarchy-item--child"><a href="{{ .RelPermalink }}">{{ with .Params.markup_title }}{{ . | safeHTML }}{{ else }}{{ .Title | safeHTML }}{{ end }}</a>
|
||||
{{ range .Sections }}<ul>
|
||||
{{ partial "cv/organisations/recursive-children.html" . }}
|
||||
</ul>{{ end }}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<header class="site-header">
|
||||
<header class="site-header h-card">
|
||||
{{ block "header" . }}
|
||||
<h1 class="site-header__title" itemprop="name"><a href="{{ .Site.Home.RelPermalink }}">{{ .Site.Title }}</a></h1>
|
||||
<p class="site-header__tagline" itemprop="about">Views my own. Discussion ≠ endorsement. Do try this at home.</p>
|
||||
<p class="site-header__icons">~ <a href="mailto:{{ $.Site.Author.email }}" rel="me">📧</a> ~ <a href="{{ .Site.Params.codeURL }}">💻</a> ~ <a href="/{{ .Site.Params.keyfile }}">🔐</a> ~ <a href="/index.xml"><img class="feed-icon" src="/images/feed-icon.png"></a> ~</p>
|
||||
<h2 class="p-name site-header__title" itemprop="name"><a class="u-url" href="{{ .Site.Home.RelPermalink }}" rel="me author">{{ .Site.Title }}</a></h2>
|
||||
<p class="p-note site-header__tagline" itemprop="about">Views my own. Discussion ≠ endorsement. Do try this at home.</p>
|
||||
<p class="site-header__icons">~ <a class="u-email" href="mailto:{{ $.Site.Author.email }}" rel="me">📧</a> ~ <a class="u-url" href="{{ .Site.Params.codeURL }}" rel="me">💻</a> ~ <a class="u-key" href="/{{ .Site.Params.keyfile }}" rel="me">🔐</a> ~ <a href="/index.xml" aria-label="{{ .Site.Title }} RSS feed"><img class="feed-icon" alt="RSS icon" src="{{ .Site.Params.feedIcon }}"></a> ~</p>
|
||||
{{ partial "header/site-nav.html" . }}
|
||||
{{ end }}
|
||||
</header>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<nav class="site-header__nav">
|
||||
<ul>
|
||||
{{ range ( where .Site.Sections.ByTitle "Type" "in" site.Params.mainSections ) }}
|
||||
<a href="{{ .RelPermalink }}"><li>{{ .Title | safeHTML }}</li></a>
|
||||
<li><a href="{{ .RelPermalink }}">{{ .Title | safeHTML }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<a id="{{ .Slug }}" class="link--tile" href="{{ .RelPermalink }}" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
|
||||
<a id="{{ .Title | urlize }}" class="h-entry u-url link--tile" href="{{ .RelPermalink }}" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
|
||||
<article class="item-tile lazy {{- with .Params.site }} item-tile--{{ . }}{{ end -}}"
|
||||
{{ if .Params.featured_image }}
|
||||
{{ with .Resources.GetMatch .Params.featured_image }}
|
||||
{{ if eq .MediaType.SubType "svg" }}
|
||||
style="background-image: url({{ .RelPermalink }})"
|
||||
{{ else }}
|
||||
{{ with .Resize "2000x webp" }}
|
||||
{{ with .Resize "1000x webp" }}
|
||||
style="background-image: url({{ .RelPermalink }})"
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
@ -14,6 +14,26 @@
|
|||
{{ end }}
|
||||
{{ end }}
|
||||
>
|
||||
{{ if .Params.featured_image -}}
|
||||
<img class="u-photo" style="display: none;" src="
|
||||
{{- with .Resources.GetMatch .Params.featured_image -}}
|
||||
{{- if eq .MediaType.SubType "svg" -}}
|
||||
{{ .RelPermalink }}
|
||||
{{- else -}}
|
||||
{{- with .Resize "1000x webp" -}}
|
||||
{{- .RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{ .Params.featured_image }}
|
||||
{{ end }}
|
||||
" alt="
|
||||
{{- with .Resources.GetMatch .Params.featured_image -}}
|
||||
{{- .Params.alt -}}
|
||||
{{- end -}}
|
||||
"
|
||||
/>
|
||||
{{- end }}
|
||||
<header class="item-tile__header">
|
||||
{{ if ( or .Params.series .Params.published_in ) }}
|
||||
<span class="item-tile__banner item-tile__banner--{{ if .Params.series }}series{{ else if .Params.published_in }}published-in{{ end}}">
|
||||
|
@ -24,12 +44,13 @@
|
|||
{{- end -}}
|
||||
</span>
|
||||
{{ end }}
|
||||
<h1 class="item-tile__title{{ if gt ( len ( .Title | plainify ) ) 40 }} item-tile__title--long{{ end }}" itemprop="name">
|
||||
<span role="text">{{ .Title | safeHTML }}</span>
|
||||
</h1>
|
||||
<h2 class="p-name item-tile__title{{ if gt ( len ( .Title | plainify ) ) 40 }} item-tile__title--long{{ end }}" itemprop="name">
|
||||
{{ .Title | safeHTML }}
|
||||
</h2>
|
||||
{{ with .Params.subtitle }}
|
||||
<p class="item-tile__subtitle">{{ . | safeHTML }}</p>
|
||||
{{ end }}
|
||||
<p style="display: none;">Published: <time class="dt-published" itemprop="datePublished" datetime="{{ .PublishDate | time.Format "2006-01-02T15:04:05-07:00" }}">{{ .PublishDate | time.Format "2006-01-02T15:04:05-07:00"}}</time></p>
|
||||
</header>
|
||||
</article>
|
||||
</a>
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
<section class="site-content__body">
|
||||
{{ range ( ( where .Pages "Draft" false ).GroupByPublishDate "2006" ) }}
|
||||
{{ if ( not ( eq .Key "0001" ) ) }}
|
||||
{{ partial "header-tile.html" . }}
|
||||
{{ range .Pages }}
|
||||
{{ partial "item-tile.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</section>
|
||||
|
|
|
@ -1,61 +1,31 @@
|
|||
<footer class="site-content__footer">
|
||||
<h1>Meta</h1>
|
||||
<h2>Meta</h2>
|
||||
|
||||
{{- if .GetTerms "categories" -}}
|
||||
<section id="post-categories" class="article-footer__categories" aria-labelledby="post-categories-title">
|
||||
<h2 id="post-categories-title">Categories</h2>
|
||||
<section id="post-categories" class="article-footer__categories" aria-labelledby="post-categories-title" itemprop="articleSection">
|
||||
<h3 id="post-categories-title">Categories</h3>
|
||||
<ul>
|
||||
{{- range (.GetTerms "categories") -}}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle | safeHTML }}</a></li>
|
||||
{{- end -}}
|
||||
</ul>
|
||||
</section>
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Params.internal_links -}}
|
||||
<section class="article-footer__links">
|
||||
<h2>Internal Links</h2>
|
||||
<ul>
|
||||
{{- range . -}}
|
||||
{{ if eq ( printf "%T" . ) "map[string]interface {}" }}
|
||||
<li><a href="{{ .link }}">{{ .title | safeHTML }}</a></li>
|
||||
{{ else }}
|
||||
<li><a href="{{ . }}">Link</a></li>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
</ul>
|
||||
</section>
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Params.external_links -}}
|
||||
<section class="article-footer__links">
|
||||
<h2>External Links</h2>
|
||||
<ul>
|
||||
{{- range . -}}
|
||||
{{ if eq ( printf "%T" . ) "map[string]interface {}" }}
|
||||
<li><a href="{{ .link }}" rel="noopener noreferrer" target="_blank">{{ .title | safeHTML }}</a></li>
|
||||
{{ else }}
|
||||
<li><a href="{{ . }}" rel="noopener noreferrer" target="_blank">Link</a></li>
|
||||
{{ end }}
|
||||
<li class="p-category"><a href="{{ .RelPermalink }}">{{ .LinkTitle | safeHTML }}</a></li>
|
||||
{{- end -}}
|
||||
</ul>
|
||||
</section>
|
||||
{{- end -}}
|
||||
|
||||
{{- if .GetTerms "areas" -}}
|
||||
<section class="article-footer__links">
|
||||
<h2 id="item-areas-title">Areas</h2>
|
||||
<section class="article-footer__links" itemprop="articleSection">
|
||||
<h3 id="item-areas-title">Areas</h3>
|
||||
<ul>
|
||||
{{- range ( .GetTerms "areas" ).ByTitle -}}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
|
||||
<li class="p-category"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
|
||||
{{- end -}}
|
||||
</ul>
|
||||
</section>
|
||||
{{- end -}}
|
||||
|
||||
{{- if .GetTerms "organisations" -}}
|
||||
<section id="post-organisations" class="article-footer__organisations" aria-labelledby="post-organisations-title">
|
||||
<h2 id="post-organisations-title">Organisations</h2>
|
||||
<section id="post-organisations" class="article-footer__organisations" aria-labelledby="post-organisations-title" itemprop="articleSection">
|
||||
<h3 id="post-organisations-title">Organisations</h3>
|
||||
<ul>
|
||||
{{ $all_organisations := partialCached "get_all_organisations.html" . }}
|
||||
<!-- TODO: Replace with hierarchy partial -->
|
||||
|
@ -75,17 +45,22 @@
|
|||
|
||||
{{- if .GetTerms "locations" -}}
|
||||
<section id="post-locations" class="article-footer__locations" aria-labelledby="post-locations-title">
|
||||
<h2 id="post-locations-title">Locations</h2>
|
||||
<div id="mapdiv" style="width: 100%; height: 500px; margin: 0; display: block;"></div>
|
||||
<h3 id="post-locations-title">Locations</h3>
|
||||
<div id="map" style="width: 100%; height: 500px; margin: 0; display: block;"></div>
|
||||
<ul style="display: none">
|
||||
{{- range ( .GetTerms "locations" ).ByTitle -}}
|
||||
<li class="p-location"><a href="{{ .RelPermalink }}">{{ .LinkTitle | safeHTML }}</a></li>
|
||||
{{- end -}}
|
||||
</ul>
|
||||
</section>
|
||||
{{- end -}}
|
||||
|
||||
{{- if .GetTerms "tags" -}}
|
||||
<section id="post-tags" class="article-footer__tags" aria-labelledby="post-tags-title">
|
||||
<h2 id="post-tags-title">Tags</h2>
|
||||
<h3 id="post-tags-title">Tags</h3>
|
||||
<ul>
|
||||
{{- range ( .GetTerms "tags" ).ByTitle -}}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle | safeHTML }}</a></li>
|
||||
<li class="p-category"><a href="{{ .RelPermalink }}">{{ .LinkTitle | safeHTML }}</a></li>
|
||||
{{- end -}}
|
||||
</ul>
|
||||
</section>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<ul class="minor-links__years">
|
||||
{{ range ( ( where .Pages "Draft" false ).GroupByDate "2006" ) }}
|
||||
{{ if ( not ( eq .Key "0001" ) ) }}
|
||||
<li><a href="#items-{{ .Key }}">{{ .Key }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
|
|
@ -61,13 +61,13 @@
|
|||
|
||||
{{ define "main-header" }}
|
||||
<header class="site-content__header">
|
||||
<h1 class="page-title">{{ .Title | safeHTML }}.
|
||||
<h2 class="page-title">{{ .Title | safeHTML }}.
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
<a href="{{ .RelPermalink }}">
|
||||
<img class="feed-icon" src="/images/feed-icon.png">
|
||||
</a>
|
||||
{{ end }}
|
||||
</h1>
|
||||
</h2>
|
||||
{{ .Content }}
|
||||
|
||||
{{ if ne .Type "portfolio" }}
|
||||
|
@ -84,7 +84,7 @@
|
|||
<ul class="site-content__sections-list">
|
||||
{{ range .Sections.ByWeight }}
|
||||
{{ if eq .Weight 10 }}<hr>{{ end }}
|
||||
<li><a href="{{ .RelPermalink }}"><h2>{{ .Title }}</h2></a> <p>({{ len .Pages }})</p></li>
|
||||
<li><a href="{{ .RelPermalink }}"><h3>{{ .Title }}</h3></a> <p>({{ len .Pages }})</p></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</article>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
{{ define "main-header" }}
|
||||
<header class="site-content__header">
|
||||
|
||||
<h1 class="page-title">
|
||||
<h2 class="page-title">
|
||||
{{- if eq .Title "Series" -}}
|
||||
{{- .Title | safeHTML }}’
|
||||
{{- else -}}
|
||||
|
@ -18,7 +18,7 @@
|
|||
<img class="feed-icon" src="{{ $.Site.Params.feedIcon }}">
|
||||
</a>
|
||||
{{ end }}
|
||||
</h1>
|
||||
</h2>
|
||||
{{ .Content }}
|
||||
</header>
|
||||
{{ end }}
|
||||
|
|
|
@ -1,32 +1,35 @@
|
|||
{{ with where ( $.Site.Data.abbreviations .Params.abbr ) }}
|
||||
{{ if ( or ( eq .Params.mode "shortTitle" ) ( eq .Params.mode "shortTitlePl" ) ) }}
|
||||
{{- $abbr := .Get 0 -}}
|
||||
{{- $mode := default "shortTitle" ( .Get 1 ) -}}
|
||||
|
||||
{{- with ( index $.Site.Data.abbreviations $abbr ) -}}
|
||||
{{- if ( or ( eq $mode "shortTitle" ) ( eq $mode "shortTitlePl" ) ) -}}
|
||||
<abbr class="abbr" title="
|
||||
{{- if ( eq .Params.mode "shortTitle" ) }}
|
||||
{{ .shortTitle }}
|
||||
{{ else if ( eq .Params.mode "shortTitlePl" ) }}
|
||||
{{ if .shortTitlePl }}{{ .shortTitlePl }}{{ else }}{{ .shortTitle }}s{{ end }}
|
||||
{{ end -}}
|
||||
{{- if ( eq $mode "shortTitle" ) -}}
|
||||
{{- .longTitle -}}
|
||||
{{- else if ( eq $mode "shortTitlePl" ) -}}
|
||||
{{- with .longTitlePl -}}{{- . -}}{{- else -}}{{- .longTitle -}}s{{- end -}}
|
||||
{{- end -}}
|
||||
">
|
||||
{{- if ( eq .Params.mode "shortTitle" ) }}
|
||||
{{ .shortTitle }}
|
||||
{{ else if ( eq .Params.mode "shortTitlePl" ) }}
|
||||
{{ if .shortTitlePl }}{{ .shortTitlePl }}{{ else }}{{ .shortTitle }}s{{ end }}
|
||||
{{ end -}}
|
||||
{{- if ( eq $mode "shortTitle" ) -}}
|
||||
{{- .shortTitle | safeHTML -}}
|
||||
{{- else if ( eq $mode "shortTitlePl" ) -}}
|
||||
{{- with .shortTitlePl -}}{{- . | safeHTML -}}{{- else -}}{{- .shortTitle | safeHTML -}}s{{- end -}}
|
||||
{{- end -}}
|
||||
</abbr>
|
||||
{{ else if ( or ( eq .Params.mode "longtitle" ) ( eq .Params.mode "longTitlePl" ) ) }}
|
||||
{{- if ( eq .Params.mode "longTitle" ) }}
|
||||
{{ .longTitle }}
|
||||
{{ else if ( eq .Params.mode "longTitlePl" ) }}
|
||||
{{ if .longTitlePl }}{{ .longTitlePl }}{{ else }}{{ .longTitle }}s{{ end }}
|
||||
{{ end -}}
|
||||
{{ else if ( or ( eq .Params.mode "fullTitle" ) ( eq .Params.mode "fullTitlePl" ) ) }}
|
||||
{{ if ( eq .Params.mode "fullTitle" ) }}
|
||||
{{ .longTitle }} (<abbr>{{ .short }}</abbr>)
|
||||
{{ else if ( eq .Params.mode "fullTitlePl" ) }}
|
||||
{{- if .longTitlePl }}{{ .longTitlePl }}{{ else }}{{ .longTitle }}s{{ end -}}
|
||||
(<abbr>{{ if .shortPl }}{{ .shortPl }}{{ else }}{{ .short }}s{{ end }}</abbr>)
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ errorf "No definition found for abbreviation '%q'" .Params.abbr }}
|
||||
{{ end }}
|
||||
{{- else if ( or ( eq $mode "longtitle" ) ( eq $mode "longTitlePl" ) ) -}}
|
||||
{{- if ( eq $mode "longTitle" ) -}}
|
||||
{{- .longTitle | safeHTML -}}
|
||||
{{- else if ( eq $mode "longTitlePl" ) -}}
|
||||
{{- with .longTitlePl -}}{{- . | safeHTML -}}{{- else -}}{{- .longTitle | safeHTML -}}s{{- end -}}
|
||||
{{- end -}}
|
||||
{{- else if ( or ( eq $mode "fullTitle" ) ( eq $mode "fullTitlePl" ) ) -}}
|
||||
{{- if ( eq $mode "fullTitle" ) -}}
|
||||
{{- .longTitle | safeHTML -}} (<abbr>{{- .shortTitle | safeHTML -}}</abbr>)
|
||||
{{- else if ( eq $mode "fullTitlePl" ) -}}
|
||||
{{- with .longTitlePl -}}{{- . | safeHTML -}}{{- else -}}{{- .longTitle | safeHTML -}}s{{- end -}}
|
||||
(<abbr>{{- with .shortTitlePl -}}{{- . | safeHTML -}}{{- else -}}{{- .shortTitle | safeHTML -}}s{{- end -}}</abbr>)
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- errorf "No definition found for abbreviation '%q'" $abbr -}}
|
||||
{{- end -}}
|
||||
|
|
35
layouts/shortcodes/blockquote.html
Normal file
35
layouts/shortcodes/blockquote.html
Normal file
|
@ -0,0 +1,35 @@
|
|||
{{- if ( not .Params ) -}}
|
||||
{{- errorf "No params provided for blockquote" -}}
|
||||
{{- end -}}
|
||||
|
||||
<figure
|
||||
class="figure--blockquote blockquote{{- if .Params.style }} blockquote--{{- .Params.style -}}{{- end -}}"
|
||||
itemscope
|
||||
itemtype="Quotation"
|
||||
>
|
||||
<blockquote
|
||||
class="blockquote__body"
|
||||
{{- if .Params.cite }} cite="{{ .Params.cite }}"{{- end -}}
|
||||
>
|
||||
{{ .Inner | markdownify | safeHTML }}
|
||||
</blockquote>
|
||||
<figcaption class="blockquote__caption">
|
||||
{{- if .Params.ibid -}}
|
||||
<abbr lang="la" title="ibīdem [in the same place]">Ibid.</abbr>
|
||||
{{- else -}}
|
||||
<span itemprop="spokenByCharacter">{{- .Params.source -}}</span>
|
||||
{{- if .Params.title -}}, <span itemprop="isBasedOn">{{- partial "cite.html" . -}}
|
||||
{{- if .Params.titleSeries }} (
|
||||
{{- .Scratch.SetInMap "Params" "title" .Params.titleSeries -}}
|
||||
{{- .Scratch.SetInMap "Params" "titleLang" .Params.titleSeriesLang -}}
|
||||
{{- .Scratch.SetInMap "Params" "titleTr" .Params.titleSeriesTr -}}
|
||||
{{- .Scratch.SetInMap "Params" "cite" .Params.citeSeries -}}
|
||||
{{- .Scratch.SetInMap "Params" "schematype" .Params.schemaTypeSeries -}}
|
||||
{{- .Scratch.Set "parentCite" ( .Scratch.Get "Params" ) -}}
|
||||
{{- partial "cite.html" ( .Scratch.Get "parentCite" ) -}}
|
||||
{{- with .Params.numberSeries }}, {{ . | safeHTML -}}{{- end -}}
|
||||
){{- end -}}</span>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</figcaption>
|
||||
</figure>
|
|
@ -1,16 +1 @@
|
|||
{{ if .Params.href }}
|
||||
<a href="{{ if eq .Params.href "asCite" }}{{ .Params.cite }}{{ else }}{{ .Params.href }}{{end}}" target="_blank" rel="noopener noreferrer">
|
||||
<cite class="cite {{ with .Params.citeStyle }}cite--{{ . }}{{ end }}"
|
||||
{{ with .Params.cite }}cite="{{ . }}"{{ end }}
|
||||
itemscope
|
||||
itemtype="https://schema.org/
|
||||
{{- with .Params.schemaType -}}
|
||||
{{- . -}}
|
||||
{{- else -}}
|
||||
CreativeWork
|
||||
{{- end -}}"
|
||||
>
|
||||
{{- .Params.title -}}
|
||||
</cite>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{- /**/ -}}{{- partial "cite.html" . -}}{{- /**/ -}}
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
{{- end -}}
|
||||
|
||||
{{ $src := $.Page.Resources.GetMatch (.Get "src") }}
|
||||
{{ if ( not $src ) }}
|
||||
{{ if ( and ( not $src ) ( not ( .Get "chart-id" ) ) ) }}
|
||||
{{- errorf "No Page Resource found for src '%v' for post '%v'" ( .Get "src" ) $.File.Path -}}
|
||||
{{ end }}
|
||||
{{ $linkedResource := $.Page.Resources.GetMatch (.Get "link") }}
|
||||
|
||||
<figure class="article__figure{{ with .Get "class" }} {{ . }}{{ end }}">
|
||||
<figure class="article__figure figure{{ with .Get "class" }} {{ . }}{{ end }}">
|
||||
{{- with .Get "chart-id" -}}
|
||||
<canvas class="figure__chart" id="{{ . }}">
|
||||
You must enable Javascript to view this chart.
|
||||
|
@ -18,56 +18,57 @@
|
|||
{{- if $linkedResource }}
|
||||
<a href="{{ $linkedResource.RelPermalink }}"{{ with .Get "rel" }} rel="{{ . }}"{{ end }}>
|
||||
{{ else }}
|
||||
<a
|
||||
href="{{ .Get "link" }}"
|
||||
{{- with .Get "target" -}}
|
||||
target="{{ . }}"
|
||||
{{- else -}}
|
||||
{{ warnf "No target defined for non-page resource link %q" ( .Get "link" ) -}}
|
||||
{{- end -}}
|
||||
{{- with .Get "rel" -}}
|
||||
rel="{{ . }}"
|
||||
{{- else -}}
|
||||
{{- warnf "No rel defined for non-page resource link %q" ( .Get "link" ) -}}
|
||||
{{- end -}}
|
||||
>
|
||||
<a href="{{ .Get "link" }}">
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
{{- if eq $src.ResourceType "image" -}}
|
||||
<picture class="figure__picture">
|
||||
<img class="figure__image"
|
||||
<picture class="figure__picture"
|
||||
itemprop="image">
|
||||
<img class="u-photo figure__image"
|
||||
{{ if ( or ( eq $src.MediaType.SubType "svg" ) ( eq $src.MediaType.SubType "gif" ) ) }}
|
||||
src="{{ $src.RelPermalink }}"
|
||||
{{ else }}
|
||||
{{ with $src.Resize "1500x webp" }}
|
||||
{{ with $src.Resize "1200x webp" }}
|
||||
src="{{ .RelPermalink }}"
|
||||
{{ end }}
|
||||
width="{{ $src.Width }}"
|
||||
height="{{ $src.Height }}"
|
||||
{{ end }}
|
||||
{{- if or ($src.Params.alt) (.Get "caption") }}
|
||||
alt="{{ with $src.Params.alt }}{{ . }}{{ else }}{{ .Get "caption" | markdownify | plainify }}{{ end }}"
|
||||
{{- with $src.Params.alt }}
|
||||
alt="{{ . }}"
|
||||
{{- end -}}
|
||||
{{- with $src.Params.title }} title="{{ . }}"{{ end -}}
|
||||
{{- with $src.Params.title }} title="{{ . }}" {{ end -}}
|
||||
loading="lazy"
|
||||
role="img"
|
||||
/>
|
||||
</picture>
|
||||
{{- else if eq $src.ResourceType "video" -}}
|
||||
{{- if eq $src.MediaType "video/ogg" -}}
|
||||
<audio class="figure__audio" controls>
|
||||
<audio class="u-audio figure__audio" itemprop="audio" controls>
|
||||
<source src="{{ $src.RelPermalink }}" type="{{ $src.MediaType }}" />
|
||||
<p>Your browser doesn't support embedded audio, but you can view the audio <a href="{{ $src.RelPermalink }}">here</a>.</p>
|
||||
<p>Your browser doesn't support embedded audio, <a href="{{ $src.RelPermalink }}">view the audio here</a>.</p>
|
||||
</audio>
|
||||
{{- else -}}
|
||||
<video class="figure__video"
|
||||
<video class="u-video figure__video"
|
||||
controls
|
||||
src="{{ $src.RelPermalink }}"
|
||||
poster="{{ if $src.Params.poster }}{{ .Get $src.Params.poster }}{{ else }}{{ warnf "No poster defined for resource %q" $src.RelPermalink }}{{ end }}"
|
||||
poster="
|
||||
{{- if $src.Params.poster -}}
|
||||
{{- $posterSrc := $.Page.Resources.GetMatch ( .Get $src.Params.poster ) -}}
|
||||
{{- with $posterSrc.Resize "1200x webp" -}}
|
||||
{{- .RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- warnf "No poster defined for resource %q" $src.RelPermalink -}}
|
||||
{{- end -}}
|
||||
"
|
||||
itemprop="video"
|
||||
>
|
||||
Your browser doesn't support embedded video, but you can view the video <a href="{{ $src.RelPermalink }}">here</a>.
|
||||
Your browser doesn't support embedded video, <a href="{{ $src.RelPermalink }}">view the video here</a>.
|
||||
</video>
|
||||
{{- end -}}
|
||||
{{- else if or ( ne $src.ResourceType "image" ) ( ne $src.ResourceType "video" ) -}}
|
||||
{{- else if ( or ( ne $src.ResourceType "image" ) ( ne $src.ResourceType "video" ) ) -}}
|
||||
{{- errorf "No handling for resource of type %q" $src.ResourceType -}}
|
||||
{{- end -}}
|
||||
{{- if .Get "link" }}</a>{{ end -}}
|
||||
|
@ -77,20 +78,16 @@
|
|||
<figcaption class="figure__caption{{ if not ( or ( .Get "caption" ) ( .Get "title" ) ) }} figure__caption--no-height{{ end }}">
|
||||
{{- with $src -}}
|
||||
{{ if .Params.attrlink -}}
|
||||
<a class="figcaption__attrlink" href="{{ .Params.attrlink }}"
|
||||
{{- with .Params.attrtarget }} target="{{ . }}"{{ end -}}
|
||||
{{- with .Params.attrrel }} rel="{{ . }}"{{ end -}}
|
||||
>
|
||||
<a class="figcaption__attrlink" href="{{ .Params.attrlink }}">
|
||||
{{- end -}}
|
||||
{{- if .Params.attr -}}<p class="figcaption__attr">{{ .Params.attr | safeHTML }}{{ with .Params.attrlicence }} <span class="figcaption__licence">{{ . | safeHTML }}</span>{{ end }}</p>{{- end -}}
|
||||
{{- if .Params.attrlink -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Params.title -}}<h4 class="figcaption__title">{{ . }}</h4>{{- end -}}
|
||||
{{- end -}}
|
||||
{{- with .Get "title" -}}<h4 class="figcaption__title">{{ . }}</h4>{{- end -}}
|
||||
{{- with .Get "title" -}}<h4 class="figcaption__title">{{ . | markdownify | safeHTML }}</h4>{{- end -}}
|
||||
{{- with .Get "caption" -}}
|
||||
<p class="figcaption__caption">{{ . | markdownify }}</p>
|
||||
<p class="figcaption__caption">{{ . | markdownify | safeHTML }}</p>
|
||||
{{- end -}}
|
||||
</figcaption>
|
||||
{{- end -}}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<div class="box">
|
||||
<figure itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">
|
||||
<div class="img" style="background-image: url('{{ $linkURL }}');" >
|
||||
<img itemprop="thumbnail" src="{{ $linkURL }}" alt="{{ $caption }}" /><!-- <img> hidden if in .gallery -->
|
||||
<img itemprop="thumbnail" loading="lazy" src="{{ $linkURL }}" alt="{{ $caption }}" /><!-- <img> hidden if in .gallery -->
|
||||
</div>
|
||||
<a href="{{ $linkURL }}" itemprop="contentUrl"></a><!-- put <a> last so it is stacked on top -->
|
||||
</figure>
|
||||
|
|
79
layouts/shortcodes/gallery_new.html
Normal file
79
layouts/shortcodes/gallery_new.html
Normal file
|
@ -0,0 +1,79 @@
|
|||
<figure class="figure--gallery gallery" itemscope itemtype="http://schema.org/ImageGallery">
|
||||
{{- if or ( .Get "caption" ) ( .Get "title" ) -}}
|
||||
<figcaption class="figure__caption gallery__caption{{ if not ( or ( .Get "caption" ) ( .Get "title" ) ) }} figure__caption--no-height{{ end }}">
|
||||
{{- with .Get "title" -}}<h4 class="figcaption__title">{{ . | markdownify | safeHTML }}</h4>{{- end -}}
|
||||
{{- with .Get "caption" -}}
|
||||
<p class="figcaption__caption">{{ . | markdownify | safeHTML }}</p>
|
||||
{{- end -}}
|
||||
</figcaption>
|
||||
{{- end -}}
|
||||
|
||||
{{- with (.Get "dir") -}}
|
||||
<!-- If a directory was specified, generate figures for all of the images in the directory -->
|
||||
{{- $images := $.Page.Resources.Match ( print . "/*" ) }}
|
||||
{{- range $images -}}
|
||||
{{- $caption := .Name | replaceRE "\\..*" "" | humanize }}<!-- humanized filename without extension -->
|
||||
{{- $linkURL := print $.Page.Permalink ($.Get "dir") "/" .Name | absURL }}<!-- absolute URL to hi-res image -->
|
||||
<figure class="figure gallery__figure" itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">
|
||||
<a href="{{ .RelPermalink }}" itemprop="contentUrl">
|
||||
<picture class="figure__picture"
|
||||
itemprop="image">
|
||||
<img itemprop="thumbnail"
|
||||
class="u-photo gallery__thumbnail"
|
||||
{{ if ( or ( eq .MediaType.SubType "svg" ) ( eq .MediaType.SubType "gif" ) ) }}
|
||||
src="{{ .RelPermalink }}"
|
||||
{{ else }}
|
||||
{{ with .Resize "600x webp" }}
|
||||
src="{{ .RelPermalink }}"
|
||||
{{ end }}
|
||||
width="{{ .Width }}"
|
||||
height="{{ .Height }}"
|
||||
{{ end }}
|
||||
{{- with .Params.alt }}
|
||||
alt="{{ . }}"
|
||||
{{- end -}}
|
||||
{{- with .Params.title }} title="{{ . }}" {{ end -}}
|
||||
loading="lazy"
|
||||
>
|
||||
</picture>
|
||||
</a>
|
||||
{{- if or ( .Params.title ) ( .Params.attr ) -}}
|
||||
<figcaption class="figure__caption{{ if not .Params.title }} figure__caption--no-height{{ end }}">
|
||||
{{ if .Params.attrlink -}}
|
||||
<a class="figcaption__attrlink" href="{{ .Params.attrlink }}"
|
||||
{{- with .Params.attrtarget }} target="{{ . }}"{{ end -}}
|
||||
{{- with .Params.attrrel }} rel="{{ . }}"{{ end -}}
|
||||
>
|
||||
{{- end -}}
|
||||
{{- if .Params.attr -}}<p class="figcaption__attr">{{ .Params.attr | safeHTML }}{{ with .Params.attrlicence }} <span class="figcaption__licence">{{ . | safeHTML }}</span>{{ end }}</p>{{- end -}}
|
||||
{{- if .Params.attrlink -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- if .Params.href -}}
|
||||
<a href="{{- if ( eq .Params.href "asCite" ) -}}{{ .Params.cite }}{{- else -}}{{ .Params.href }}{{- end -}}">
|
||||
{{- end -}}
|
||||
{{- if .Params.title -}}
|
||||
<h5 class="figcaption__title">
|
||||
{{- if .Params.titleLang -}}
|
||||
<i lang="{{ .Params.titleLang }}" title="{{ .Params.titleTr }}">
|
||||
{{- end -}}
|
||||
{{ .Params.title | safeHTML }}
|
||||
{{- if .Params.titleLang -}}
|
||||
</i>
|
||||
{{- end -}}
|
||||
</h5>
|
||||
{{- else -}}
|
||||
<p class="figcaption__title">Link</p>
|
||||
{{- end -}}
|
||||
{{- if .Params.href -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
</figcaption>
|
||||
{{- end -}}
|
||||
</figure>
|
||||
{{- end }}
|
||||
{{- else -}}
|
||||
<!-- If no directory was specified, include any figure shortcodes called within the gallery -->
|
||||
{{ .Inner }}
|
||||
{{- end }}
|
||||
</figure>
|
|
@ -1,4 +1,4 @@
|
|||
{{ $resource := .Page.Resources.GetMatch ($.Get 0) }}
|
||||
{{ with $resource }}
|
||||
{{ $resource.RelPermalink }}
|
||||
{{ end }}
|
||||
{{- $resource := .Page.Resources.GetMatch ($.Get 0) -}}
|
||||
{{- with $resource -}}
|
||||
{{- $resource.RelPermalink -}}
|
||||
{{- end -}}
|
||||
|
|
Loading…
Reference in a new issue