Compare commits
8 commits
438fdbe22d
...
393d243b66
Author | SHA1 | Date | |
---|---|---|---|
393d243b66 | |||
09d4610c8e | |||
ac960cf8b4 | |||
0167884748 | |||
c7cfdcdb5b | |||
c158ac525d | |||
f8cc8aa45d | |||
37da8acf5a |
54 changed files with 2580 additions and 111 deletions
6
.htmlvalidate.json
Normal file
6
.htmlvalidate.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"extends": [
|
||||
"html-validate:prettier",
|
||||
"html-validate:recommended"
|
||||
]
|
||||
}
|
0
.hugo_build.lock
Normal file
0
.hugo_build.lock
Normal file
|
@ -1,3 +1 @@
|
|||
node_modules/
|
||||
layouts/
|
||||
*
|
|
@ -5,8 +5,10 @@
|
|||
"files": "*.html",
|
||||
"options": {
|
||||
"printWidth": 140,
|
||||
"singleAttributePerLine": true
|
||||
"singleAttributePerLine": true,
|
||||
"parser": "go-template"
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
"plugins": ["prettier-plugin-go-template"]
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ function drawChart() {
|
|||
{{- if $add_redacted -}}
|
||||
{{- $.Scratch.Set "parents" ( $.Scratch.Get "parents" | append "███████████████" ) -}}
|
||||
{{- else -}}
|
||||
{{- $.Scratch.Set "parents" ( $.Scratch.Get "parents" | append ( ( partial "cv/organisation/get_top_level_ancestor.html.tmpl" . ) | plainify ) ) -}}
|
||||
{{- $.Scratch.Set "parents" ( $.Scratch.Get "parents" | append ( ( partial "cv/organisation/get_top_level_ancestor.html" . ) | plainify ) ) -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{ erroridf "missing-organisation" "Could not find organisation %q (%q)" . $.File.Path }}
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
[module]
|
||||
[module.hugoVersion]
|
||||
extended = true
|
||||
min = "0.140.0"
|
||||
max = "0.140.2"
|
69
config/_default/config.yaml
Normal file
69
config/_default/config.yaml
Normal file
|
@ -0,0 +1,69 @@
|
|||
module:
|
||||
hugoVersion:
|
||||
extended: true
|
||||
min: "0.140.0"
|
||||
max: "0.140.2"
|
||||
|
||||
baseURL: 'https://example.com/'
|
||||
languageCode: en-gb
|
||||
title: Omphaloskepsis 2
|
||||
|
||||
capitalizeListTitles: false
|
||||
copyright: CC0
|
||||
enableRobotsTXT: true
|
||||
|
||||
params:
|
||||
author:
|
||||
name: John Smith
|
||||
email: admin@example.com
|
||||
description:
|
||||
reportIssueURL: '/Rumperuu/Omphaloskepsis-2/issues'
|
||||
codeURL: 'https://code.bengoldsworthy.net'
|
||||
feedIcon: /images/feed-icon.svg
|
||||
keyFile:
|
||||
mainSections:
|
||||
- blog
|
||||
- portfolio
|
||||
- cv
|
||||
pre_nominals:
|
||||
post_nominals:
|
||||
redact: skip
|
||||
|
||||
permalinks:
|
||||
cv: /:sections/:slug
|
||||
portfolio: /:sections/:slug
|
||||
blog: /:sections/:slug
|
||||
organisations: /cv/organisation/:slug
|
||||
|
||||
taxonomies:
|
||||
category: categories
|
||||
tag: tags
|
||||
series: series
|
||||
organisation: organisations
|
||||
location: locations
|
||||
soc: socs
|
||||
# colleague: colleagues
|
||||
skill: skills
|
||||
area: areas
|
||||
|
||||
markup:
|
||||
tableOfContents:
|
||||
endLevel: 3
|
||||
goldmark:
|
||||
renderer:
|
||||
unsafe: true
|
||||
extensions:
|
||||
passthrough:
|
||||
delimiters:
|
||||
block:
|
||||
- - \[
|
||||
- \]
|
||||
- - $$
|
||||
- $$
|
||||
inline:
|
||||
- - \(
|
||||
- \)
|
||||
enable: true
|
||||
|
||||
ignoreErrors:
|
||||
- "missing-cite"
|
11
config/development/config.yaml
Normal file
11
config/development/config.yaml
Normal file
|
@ -0,0 +1,11 @@
|
|||
baseURL: 'localhost:1313'
|
||||
title: "Omphaloskepsis 2 [DEV]"
|
||||
|
||||
buildDrafts: true
|
||||
buildFuture: true
|
||||
|
||||
params:
|
||||
redact: black
|
||||
|
||||
taxonomies:
|
||||
colleague: colleagues
|
1
config/production/config.yaml
Normal file
1
config/production/config.yaml
Normal file
|
@ -0,0 +1 @@
|
|||
publishDir: public
|
14
content/blog/_index.md
Normal file
14
content/blog/_index.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: Blog
|
||||
mainType: https://schema.org/Blog
|
||||
itemsType: https://schema.org/BlogPosting" itemprop="blogPost
|
||||
cascade:
|
||||
images:
|
||||
- images
|
||||
audio:
|
||||
- audio
|
||||
videos:
|
||||
- videos
|
||||
_build:
|
||||
publishResources: false
|
||||
---
|
4
content/blog/posts/_index.md
Normal file
4
content/blog/posts/_index.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: Blog Posts
|
||||
ignore: true
|
||||
---
|
8
content/cv/_index.md
Normal file
8
content/cv/_index.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
title: CV
|
||||
type: cv
|
||||
---
|
||||
|
||||
This section is for things you have done in your life, e.g. jobs, roles, qualifications.
|
||||
|
||||
Click on the sections below to view more details about each experience, or filter the timeline below by using the buttons just above it.
|
4
content/cv/organisations/_index.md
Normal file
4
content/cv/organisations/_index.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: Organisations
|
||||
type: cv/organisations
|
||||
---
|
4
content/cv/roles/_index.md
Normal file
4
content/cv/roles/_index.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: Roles
|
||||
type: cv/roles
|
||||
---
|
7
content/locations/_index.md
Normal file
7
content/locations/_index.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: Locations
|
||||
date: 2024-02-13
|
||||
layout: locations
|
||||
---
|
||||
|
||||
Test
|
5
content/pages/privacy-policy/index.md
Normal file
5
content/pages/privacy-policy/index.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Privacy Policy
|
||||
---
|
||||
|
||||
TODO - write privacy policy
|
6
content/portfolio/_index.md
Normal file
6
content/portfolio/_index.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
title: Portfolio
|
||||
type: portfolio
|
||||
---
|
||||
|
||||
This section is for things you have produced, whatever their formats and media.
|
8
content/styleguide/comments.md
Normal file
8
content/styleguide/comments.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
|
||||
{{% comment
|
||||
author="Comment author"
|
||||
source="Comment source"
|
||||
publishDate="2022-07-05T13:00:00+05:00"
|
||||
%}}
|
||||
A comment shortcode.
|
||||
{{% /comment %}}
|
BIN
content/styleguide/images/lena.png
Normal file
BIN
content/styleguide/images/lena.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 463 KiB |
294
content/styleguide/index.md
Normal file
294
content/styleguide/index.md
Normal file
|
@ -0,0 +1,294 @@
|
|||
---
|
||||
title: Styleguide
|
||||
|
||||
# Resources
|
||||
featured_image: lena
|
||||
resources:
|
||||
- name: lena
|
||||
src: images/lena.*
|
||||
params:
|
||||
alt: Woman smiling
|
||||
attr:
|
||||
---
|
||||
|
||||
## HTML
|
||||
|
||||
Test paragraph test paragraph test paragraph test paragraph test paragraph test
|
||||
paragraph test paragraph test paragraph.
|
||||
|
||||
<b>Emphasis text</b>. <i>Alternate voice text</i>. <em>Stress emphasis text</em>. <strong>Strong text</strong>. <u>Annotated text</u> <s>Strikethrough text</s>.
|
||||
|
||||
<sup>Superscript</sup> and <sub>subscript</sub> text. Nested <sup>superscript <sup>text</sup></sup>. Nested <sub>subscript <sub>text</sub></sub>.
|
||||
|
||||
<small>Small text</small>
|
||||
|
||||
<mark>Highlighted text</mark>.
|
||||
|
||||
<del>Deleted</del> <ins>inserted</ins> text.
|
||||
|
||||
An <q>inline</q> quotation.
|
||||
|
||||
<data>Machine-readable data</data>
|
||||
|
||||
<time>Time and date</time>
|
||||
|
||||
<code>Code</code>
|
||||
|
||||
<kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>Del</kbd>
|
||||
|
||||
<kbd><kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>Del</kbd></kbd>
|
||||
|
||||
<var>a</var> or <var>b</var>
|
||||
|
||||
<samp>Sample program output.</samp>
|
||||
|
||||
<pre>
|
||||
Pre formatt
|
||||
ed te
|
||||
xt.
|
||||
</pre>
|
||||
|
||||
A <dfn>definition</dfn> of a term.
|
||||
|
||||
Decription list:
|
||||
|
||||
<dl>
|
||||
<dt>Term</dt> <dd>Definition of term</dd>
|
||||
</dl>
|
||||
|
||||
Address:
|
||||
|
||||
<address>
|
||||
123 Fake Street <br />
|
||||
Fakesville <br />
|
||||
USA
|
||||
</address>
|
||||
|
||||
<aside>
|
||||
An aside an aside an aside an aside an aside an aside an aside an aside.
|
||||
</aside>
|
||||
|
||||
Math:
|
||||
|
||||
Block:
|
||||
<math display="block">
|
||||
<mfrac>
|
||||
<mn>1</mn>
|
||||
<msqrt>
|
||||
<mn>2</mn>
|
||||
</msqrt>
|
||||
</mfrac>
|
||||
</math>
|
||||
|
||||
Inline <math display="inline"><msup><mi>e = MC</mi><mn>2</mn></msup></math> math
|
||||
|
||||
Table:
|
||||
|
||||
<style>
|
||||
.foo {
|
||||
background-color: #b00;
|
||||
}
|
||||
</style>
|
||||
|
||||
<table>
|
||||
<caption>Table caption</caption>
|
||||
<colgroup>
|
||||
<col />
|
||||
<col />
|
||||
<col class="foo" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Heading</th>
|
||||
<th>Heading</th>
|
||||
<th>Heading</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Body</td>
|
||||
<td>Body</td>
|
||||
<td>Body</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Body</td>
|
||||
<td>Body</td>
|
||||
<td>Body</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot colspan="3">
|
||||
<tr>
|
||||
<td>Footer</td>
|
||||
<td>Footer</td>
|
||||
<td>Footer</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<button>Button</button>
|
||||
|
||||
<details>
|
||||
<summary>Summary</summary>
|
||||
Details details details details details details details.
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
## Markdown
|
||||
|
||||
# Heading 1
|
||||
|
||||
## Heading 2
|
||||
|
||||
### Heading 3
|
||||
|
||||
#### Heading 4
|
||||
|
||||
##### Heading 5
|
||||
|
||||
###### Heading 6
|
||||
|
||||
Normal text. **Bold text.** _Italics text._ `Monospace text.` [Internal link](/).
|
||||
|
||||
[External link](https://wikipedia.org). [Mailto link](mailto:foo@bar.baz). [Phone link](tel:0000000).
|
||||
|
||||
Lists:
|
||||
|
||||
- Unordered list
|
||||
- Unordered list
|
||||
- Nested unordered list
|
||||
- Nested unordered list
|
||||
- Nested unordered list
|
||||
- Nested unordered list
|
||||
- Nested unordered list
|
||||
- Nested unordered list
|
||||
|
||||
1. Ordered list
|
||||
1. Ordered list
|
||||
1. Nested Ordered list
|
||||
1. Nested Ordered list
|
||||
1. Nested Ordered list
|
||||
1. Nested Ordered list
|
||||
1. Nested Ordered list
|
||||
1. Nested Ordered list
|
||||
|
||||
---
|
||||
|
||||
> Blockquote blockquote blockquote blockquote blockquote blockquote blockquote.
|
||||
|
||||
---
|
||||
|
||||
Code block:
|
||||
|
||||
```
|
||||
int main() {
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
Code block with syntax highlighting:
|
||||
|
||||
```c
|
||||
int main() {
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Table:
|
||||
|
||||
| Heading | Heading | Heading |
|
||||
| ------- | ------- | ------- |
|
||||
| Body | Body | Body |
|
||||
| Body | Body | Body |
|
||||
|
||||
---
|
||||
|
||||
## Shortcodes
|
||||
|
||||
Inline picture:
|
||||
|
||||
{{< picture
|
||||
src="lena"
|
||||
>}}
|
||||
|
||||
Linked picture:
|
||||
|
||||
{{< picture
|
||||
src="lena"
|
||||
link="/"
|
||||
>}}
|
||||
|
||||
Figure
|
||||
|
||||
{{< figure
|
||||
src="lena"
|
||||
>}}
|
||||
|
||||
Linked figure
|
||||
|
||||
{{< figure
|
||||
src="lena"
|
||||
link="/"
|
||||
>}}
|
||||
|
||||
Figure with caption:
|
||||
|
||||
{{< figure
|
||||
src="lena"
|
||||
caption="This is a caption"
|
||||
>}}
|
||||
|
||||
---
|
||||
|
||||
An abbreviation shortcode: {{< abbr "eg" >}}.
|
||||
|
||||
{{< blockquote
|
||||
source="Source"
|
||||
>}}
|
||||
A blockquote shortcode.
|
||||
{{< /blockquote >}}
|
||||
|
||||
{{< blockquote
|
||||
source="Source"
|
||||
style="epigram"
|
||||
>}}
|
||||
An epigram-style blockquote shortcode.
|
||||
{{< /blockquote >}}
|
||||
|
||||
{{< blockquote
|
||||
source="Source"
|
||||
title="Film title"
|
||||
schemaType="Movie"
|
||||
style="epigram"
|
||||
>}}
|
||||
A blockquote shortcode.
|
||||
{{< /blockquote >}}
|
||||
|
||||
{{< blockquote
|
||||
source="Source"
|
||||
title="Chapter title"
|
||||
schemaType="Chapter"
|
||||
titleSeries="Book title"
|
||||
schemaTypeSeries="Book"
|
||||
style="epigram"
|
||||
>}}
|
||||
A blockquote shortcode.
|
||||
{{< /blockquote >}}
|
||||
|
||||
{{< blockquote
|
||||
source="Source"
|
||||
title="TV episode title"
|
||||
schemaType="TVEpisode"
|
||||
titleSeries="TV series title"
|
||||
schemaTypeSeries="TVSeries"
|
||||
numberSeries="S01E01"
|
||||
style="epigram"
|
||||
>}}
|
||||
A blockquote shortcode.
|
||||
{{< /blockquote >}}
|
||||
|
||||
A {{< cite title="cite" >}} shortcode.
|
||||
|
||||
A {{< q >}}short quotation{{< /q >}} shortcode.
|
|
@ -1,2 +1,8 @@
|
|||
{
|
||||
"eg": {
|
||||
"lang": "la",
|
||||
"longTitle": "exemplī grātiā",
|
||||
"longTitleTrans": "for example",
|
||||
"shortTitle": "e.g."
|
||||
}
|
||||
}
|
||||
|
|
5
eslint.config.js
Normal file
5
eslint.config.js
Normal file
|
@ -0,0 +1,5 @@
|
|||
import eslintConfigPrettier from "eslint-config-prettier";
|
||||
|
||||
export default [
|
||||
eslintConfigPrettier,
|
||||
];
|
|
@ -1,7 +0,0 @@
|
|||
import pluginJs from "@eslint/js";
|
||||
import globals from "globals";
|
||||
|
||||
export default [
|
||||
{languageOptions: { globals: globals.browser }},
|
||||
pluginJs.configs.recommended,
|
||||
];
|
|
@ -11,15 +11,24 @@
|
|||
<meta name="description" content="{{ block "head-description" . }}{{ $.Site.Params.description | html }}{{ end }}">
|
||||
<meta name="twitter:dnt" content="on">
|
||||
|
||||
<title itemprop="name">{{- block "title" . -}}{{- .Site.Title }} | {{ .Site.Params.tagline -}}{{- end -}}</title>
|
||||
<title itemprop="name">
|
||||
{{- block "title" . -}}
|
||||
{{- .Site.Title -}}
|
||||
{{- with .Site.Params.tagline -}}
|
||||
{{- printf " | %s" . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</title>
|
||||
|
||||
<link rel="license" href="{{ block "head-license" . }}https://creativecommons.org/publicdomain/zero/1.0/{{ end }}">
|
||||
<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 class="u-logo" rel="icon" sizes="192x192" href="/images/icon.png">
|
||||
{{- with .Site.Params.keyfile -}}
|
||||
<link class="u-key" rel="author" href="{{ . }}">
|
||||
{{- end -}}
|
||||
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
}).addTo(map);
|
||||
|
||||
var latLons = [];
|
||||
{{ $locations := partialCached "util/get_location_leaf_nodes.html.tmpl" $.Site.Data.locations -}}
|
||||
{{ $locations := partialCached "util/get_location_leaf_nodes.html" $.Site.Data.locations -}}
|
||||
{{- range . -}}
|
||||
{{- with ( index $locations ( replaceRE `, [A-Z]+` "" . ) ) -}}
|
||||
L.marker([{{ .lat }}, {{ .lon }}]).addTo(map);
|
||||
|
@ -85,7 +85,7 @@
|
|||
{{- end -}}
|
||||
)
|
||||
{{- end -}}
|
||||
<p>
|
||||
</p>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
}).addTo(map);
|
||||
|
||||
var latLons = [];
|
||||
{{ $locations := partialCached "util/get_location_leaf_nodes.html.tmpl" $.Site.Data.locations -}}
|
||||
{{ $locations := partialCached "util/get_location_leaf_nodes.html" $.Site.Data.locations -}}
|
||||
{{- range . -}}
|
||||
{{- with ( index $locations ( replaceRE `, [A-Z]+` "" . ) ) -}}
|
||||
L.marker([{{ .lat }}, {{ .lon }}]).addTo(map);
|
||||
|
@ -161,7 +161,7 @@
|
|||
<aside class="article-header__notes">
|
||||
<ul>
|
||||
{{ range .Params.notes }}
|
||||
<li>{{ . | safeHTML }}</li>
|
||||
<li>{{ . | $.RenderString | safeHTML }}</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</aside>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
{{ define "main-body" }}
|
||||
{{ with .GetPage "cv/organisations" }}
|
||||
{{ partial "cv/organisations/organisations-table.html.tmpl" . }}
|
||||
{{ partial "cv/organisations/organisations-table.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
|
|
@ -152,7 +152,7 @@
|
|||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
{{- partialCached "cv/timeline-legend.html.tmpl" . -}}
|
||||
{{- partialCached "cv/timeline-legend.html" . -}}
|
||||
{{- else -}}
|
||||
<nav class="page-header__minor-links">
|
||||
{{- partial "years-list.html" . -}}
|
||||
|
@ -172,11 +172,11 @@
|
|||
|
||||
<main class="site-content__body organisation">
|
||||
|
||||
{{- partial "cv/organisation/description.html.tmpl" ( dict "content" .Content ) -}}
|
||||
{{- partial "cv/organisation/description.html" ( dict "content" .Content ) -}}
|
||||
|
||||
{{- partial "cv/organisation/roles-timeline.html.tmpl" -}}
|
||||
{{- partial "cv/organisation/roles-timeline.html" -}}
|
||||
|
||||
{{- partial "cv/organisation/related-items.html.tmpl" ( dict "sc" $ "organisation_titles" ( .Scratch.Get "titles" ) "organisation_title" .Title ) -}}
|
||||
{{- partial "cv/organisation/related-items.html" ( dict "sc" $ "organisation_titles" ( .Scratch.Get "titles" ) "organisation_title" .Title ) -}}
|
||||
|
||||
</main>
|
||||
|
||||
|
|
|
@ -21,46 +21,7 @@
|
|||
<script src="/js/leaflet-fullscreen/leaflet.fullscreen.min.js"></script>
|
||||
|
||||
<script>
|
||||
var map = L.map('map', {
|
||||
fullscreenControl: true
|
||||
}).setView([55, -3], 3);
|
||||
|
||||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
maxZoom: 19,
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
||||
}).addTo(map);
|
||||
|
||||
{{- $locations := partialCached "util/get_location_leaf_nodes.html.tmpl" $.Site.Data.locations -}}
|
||||
|
||||
{{/*
|
||||
{{- range .Site.AllPages -}}
|
||||
{{- with .Params.locations -}}
|
||||
{{- range . -}}
|
||||
{{- with ( index $locations ( replaceRE `, [A-Z]+` "" . ) ) -}}
|
||||
L.marker([{{ .lat }}, {{ .lon }}]).addTo(map);
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
*/}}
|
||||
|
||||
L.heatLayer(
|
||||
[
|
||||
{{- range .Site.AllPages -}}
|
||||
{{- with .Params.locations -}}
|
||||
{{- range . -}}
|
||||
{{- with ( index $locations ( replaceRE `, [A-Z]+` "" . ) ) -}}
|
||||
[ {{ .lat }}, {{ .lon }} ],
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
],
|
||||
{
|
||||
minOpacity: 0.5,
|
||||
gradient: {0.1: 'blue', 0.3: 'lime', 0.8: 'orange', 1: 'red'}
|
||||
}
|
||||
).addTo(map);
|
||||
{{- partial "cv/locations/heatmap.js" ( dict "all_pages" $.Site.AllPages ) -}}
|
||||
</script>
|
||||
{{ end }}
|
||||
|
||||
|
@ -75,8 +36,10 @@
|
|||
<article class="site-content__body site-content__body--chart">
|
||||
<div id="map" style="width: 100%; height: 500px; margin: 0; display: block;"></div>
|
||||
|
||||
{{- with ( partial "util/render_recursive_list.html" ( dict "sc" $ "pc" . "items" $.Site.Data.locations "schemaType" "Place" ) ) -}}
|
||||
<section style="grid-area: section-content">
|
||||
{{- partial "util/render_recursive_list.html.tmpl" ( dict "sc" $ "pc" . "items" $.Site.Data.locations "schemaType" "Place" ) -}}
|
||||
{{- . -}}
|
||||
</section>
|
||||
{{- end -}}
|
||||
</article>
|
||||
{{ end }}
|
||||
|
|
47
layouts/partials/cv/locations/heatmap.js
Normal file
47
layouts/partials/cv/locations/heatmap.js
Normal file
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
Recursively render an ordered or unordered list from a set of arbitrarily-
|
||||
deeply-nested items.
|
||||
|
||||
@params all_pages All site pages
|
||||
*/
|
||||
|
||||
var map = L.map('map', {
|
||||
fullscreenControl: true
|
||||
}).setView([55, -3], 3);
|
||||
|
||||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
maxZoom: 19,
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
||||
}).addTo(map);
|
||||
|
||||
{{- $locations := partialCached "util/get_location_leaf_nodes.html" $.Site.Data.locations -}}
|
||||
|
||||
{{/*
|
||||
{{- range .Site.AllPages -}}
|
||||
{{- with .Params.locations -}}
|
||||
{{- range . -}}
|
||||
{{- with ( index $locations ( replaceRE `, [A-Z]+` "" . ) ) -}}
|
||||
L.marker([{{ .lat }}, {{ .lon }}]).addTo(map);
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
*/}}
|
||||
|
||||
L.heatLayer(
|
||||
[
|
||||
{{- range .all_pages -}}
|
||||
{{- with .Params.locations -}}
|
||||
{{- range . -}}
|
||||
{{- with ( index $locations ( replaceRE `, [A-Z]+` "" . ) ) -}}
|
||||
[ {{ .lat }}, {{ .lon }} ],
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
],
|
||||
{
|
||||
minOpacity: 0.5,
|
||||
gradient: {0.1: 'blue', 0.3: 'lime', 0.8: 'orange', 1: 'red'}
|
||||
}
|
||||
).addTo(map);
|
|
@ -19,11 +19,11 @@
|
|||
{{- 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" . ) -}}
|
||||
{{- partial "cv/organisation/organisation-items-list.html" ( 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" . ) -}}
|
||||
{{- partial "cv/organisation/organisation-items-tiles.html" ( dict "section_title" $section_title "content" . ) -}}
|
||||
</section>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
|
@ -11,16 +11,16 @@
|
|||
<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 ) -}}
|
||||
{{- partial "cv/organisation/related-items-section.html" ( 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 ) -}}
|
||||
{{- partial "cv/organisation/related-items-section.html" ( 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 ) -}}
|
||||
{{- partial "cv/organisation/related-items-section.html" ( dict "sc" $sc "tls" "cv" "section_title" .Title "organisation_titles" $organisation_titles ) -}}
|
||||
{{- end -}}
|
||||
|
||||
</section>
|
|
@ -74,7 +74,7 @@
|
|||
"Awards"
|
||||
"Appearances"
|
||||
-}}
|
||||
{{- partialCached "cv/organisation/get-num-of-items.html.tmpl" ( dict "sc" $ "section_title" . "organisation_titles" $organisation_titles ) ( print $organisation_title "_" . ) -}}
|
||||
{{- partialCached "cv/organisation/get-num-of-items.html" ( dict "sc" $ "section_title" . "organisation_titles" $organisation_titles ) ( print $organisation_title "_" . ) -}}
|
||||
{{- end -}}
|
||||
</td>
|
||||
</tr>
|
|
@ -15,23 +15,22 @@
|
|||
class="picture"
|
||||
itemprop="image"
|
||||
>
|
||||
{{- if $isResizable -}}
|
||||
<source srcset="{{- ($src.Resize "1200x webp").RelPermalink -}}" />
|
||||
<source srcset="{{- ($src.Resize "800x png").RelPermalink -}}" media="(max-width: 800px)"/>
|
||||
{{- end -}}
|
||||
|
||||
{{ if $isResizable -}}
|
||||
<source srcset="{{- ($src.Resize "1200x webp").RelPermalink -}}" />
|
||||
<source srcset="{{- ($src.Resize "800x png").RelPermalink -}}" media="(max-width: 800px)"/>
|
||||
{{- end }}
|
||||
<img
|
||||
class="u-photo picture__image"
|
||||
{{- if not $isResizable -}}
|
||||
{{ if not $isResizable -}}
|
||||
src="{{- $src.RelPermalink -}}"
|
||||
{{- else -}}
|
||||
src="{{- ($src.Resize "1200x webp").RelPermalink -}}"
|
||||
width="{{- $src.Width -}}"
|
||||
height="{{- $src.Height -}}"
|
||||
{{- end -}}
|
||||
{{- with $src.Params.alt -}}alt="{{- . -}}"{{- end -}}
|
||||
{{- with $src.Params.title -}}title="{{- . -}}" {{- end -}}
|
||||
{{- end }}
|
||||
{{ with $src.Params.alt -}}alt="{{- . -}}"{{- end }}
|
||||
{{ with $src.Params.title -}}title="{{- . -}}" {{- end }}
|
||||
loading="lazy"
|
||||
role="img"
|
||||
/>
|
||||
</picture>
|
||||
</picture>
|
|
@ -11,7 +11,7 @@
|
|||
{{- if ( isset $v "lat" ) -}}
|
||||
{{- $locations = merge $locations ( dict $k $v ) -}}
|
||||
{{- else -}}
|
||||
{{- $locations = merge $locations ( partial "util/get_location_leaf_nodes.html.tmpl" . ) -}}
|
||||
{{- $locations = merge $locations ( partial "util/get_location_leaf_nodes.html" . ) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
<li itemscope itemtype="https://schema.org/Place">
|
||||
{{- $k -}}
|
||||
{{- if ( not ( isset $v "lat" ) ) -}}
|
||||
{{- partial "util/render_recursive_list.html.tmpl" ( dict "sc" $.sc "pc" $.pc "items" $v "schemaType" $schemaType "listType" $listType ) -}}
|
||||
{{- partial "util/render_recursive_list.html" ( dict "sc" $.sc "pc" $.pc "items" $v "schemaType" $schemaType "listType" $listType ) -}}
|
||||
{{- end -}}
|
||||
</li>
|
||||
{{- end -}}
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
For works cited (optional):
|
||||
@params ibid Whether to use ibidem as the source. Optional.
|
||||
@see partials/cite.html.tmpl for full list of args.
|
||||
@see partials/cite.html for full list of args.
|
||||
|
||||
For works cited that form part of a series (optional):
|
||||
@params schemaTypeSeries The Schema.org `itemtype` value for the work series. Default 'CreativeWork'. Optional.
|
||||
|
@ -63,14 +63,14 @@
|
|||
<abbr lang="la" title="ibīdem [in the same place]">Ibid.</abbr>
|
||||
{{- else if $source -}}
|
||||
<span temprop="spokenByCharacter">{{- $source | safeHTML -}}</span>
|
||||
{{- if $hasCitedWork -}}, <span itemprop="isBasedOn">{{- partial "cite.html.tmpl" . -}}
|
||||
{{- if $hasCitedWork -}}, <span itemprop="isBasedOn">{{- partial "cite.html" . -}}
|
||||
{{- if $hasCitedSeries }} (
|
||||
{{- .Scratch.Set "cite" .Params.citeSeries -}}
|
||||
{{- .Scratch.Set "title" .Params.titleSeries -}}
|
||||
{{- .Scratch.Set "titleLang" .Params.titleSeriesLang -}}
|
||||
{{- .Scratch.Set "titleTr" .Params.titleSeriesTr -}}
|
||||
{{- .Scratch.Set "schemaType" .Params.schemaTypeSeries -}}
|
||||
{{- partial "cite.html.tmpl" . -}}
|
||||
{{- partial "cite.html" . -}}
|
||||
{{- with .Params.numberSeries }}, {{ . | safeHTML -}}{{- end -}}
|
||||
){{- end -}}</span>
|
||||
{{- end -}}
|
||||
|
|
|
@ -25,4 +25,4 @@
|
|||
|
||||
{{- $citationId := printf "%s%s" ( cond ( isset .Params "cite" ) .Params.cite .Params.title ) ( default "" .Params.shortTitle ) -}}
|
||||
|
||||
{{- partialCached "cite.html.tmpl" . $citationId -}}
|
||||
{{- partialCached "cite.html" . $citationId -}}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
{{- $src := $.Page.Resources.GetMatch ( .Get "src" ) -}}
|
||||
{{- $linkedResource := $.Page.Resources.GetMatch ( .Get "link" ) -}}
|
||||
{{- $valid_rel_values := partialCached "util/get_valid_rel_values.html.tmpl" . -}}
|
||||
{{- $valid_rel_values := partialCached "util/get_valid_rel_values.html" . -}}
|
||||
|
||||
<!-- Validation -->
|
||||
|
||||
|
@ -40,14 +40,14 @@
|
|||
{{- end -}}
|
||||
|
||||
{{- if eq $src.ResourceType "image" -}}
|
||||
{{- partial "media/picture.html.tmpl" $src -}}
|
||||
{{- partial "media/picture.html" $src -}}
|
||||
|
||||
{{- else if eq $src.ResourceType "video" -}}
|
||||
{{- if eq $src.MediaType "video/ogg" -}}
|
||||
{{- partial "media/audio.html.tmpl" $src -}}
|
||||
{{- partial "media/audio.html" $src -}}
|
||||
|
||||
{{- else -}}
|
||||
{{- partial "media/video.html.tmpl" ( dict "src" $src "page_file_path" .Page.File.Path ) -}}
|
||||
{{- partial "media/video.html" ( dict "src" $src "page_file_path" .Page.File.Path ) -}}
|
||||
|
||||
{{- end -}}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
{{- $src := $.Page.Resources.GetMatch ( .Get "src" ) -}}
|
||||
{{- $linkedResource := $.Page.Resources.GetMatch ( .Get "link" ) -}}
|
||||
{{- $valid_rel_values := partialCached "util/get_valid_rel_values.html.tmpl" . -}}
|
||||
{{- $valid_rel_values := partialCached "util/get_valid_rel_values.html" . -}}
|
||||
|
||||
<!-- Validation -->
|
||||
|
||||
|
@ -38,7 +38,7 @@
|
|||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- partial "media/picture.html.tmpl" $src -}}
|
||||
{{- partial "media/picture.html" $src -}}
|
||||
|
||||
{{- if .Get "link" -}}
|
||||
</a>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
{{- $src := $.Page.Resources.GetMatch ( .Get "src" ) -}}
|
||||
{{- $linkedResource := $.Page.Resources.GetMatch ( .Get "link" ) -}}
|
||||
{{- $valid_rel_values := partialCached "util/get_valid_rel_values.html.tmpl" . -}}
|
||||
{{- $valid_rel_values := partialCached "util/get_valid_rel_values.html" . -}}
|
||||
|
||||
<!-- Validation -->
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
|||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- partial "media/video.html.tmpl" ( dict "src" $src "page_file_path" .Page.File.Path ) -}}
|
||||
{{- partial "media/video.html" ( dict "src" $src "page_file_path" .Page.File.Path ) -}}
|
||||
|
||||
{{- if .Get "link" -}}
|
||||
</a>
|
||||
|
|
2005
package-lock.json
generated
2005
package-lock.json
generated
File diff suppressed because it is too large
Load diff
28
package.json
28
package.json
|
@ -5,19 +5,24 @@
|
|||
"scripts": {
|
||||
"precommit": "npm run lint-staged",
|
||||
"dev": "snap run hugo serve",
|
||||
"lint": "npm run lint:css; npm run lint:md; npm run lint:html; npm run lint:json",
|
||||
"lint:fix": "npm run lint:css:fix; npm run lint:md:fix; npm run lint:html:fix; npm run lint:json:fix",
|
||||
"build": "rm -rf ./public/ && snap run hugo --environment production && npm run format:html:fix -- ./public ",
|
||||
"lint": "npm-run-all2 lint:*",
|
||||
"lint:fix": "npm-run-all2 lint:*:fix",
|
||||
"lint:css": "stylelint \"./assets/css/**/*.scss\" --cache --cache-location .cache/ .stylelintcache",
|
||||
"lint:css:fix": "npm run lint:css -- --fix",
|
||||
"lint:js": "eslint \"./assets/js/*.js\" \"./content/**/*.js\"",
|
||||
"format:html": "prettier --parser html --check \"public/**/*.{htm,html}\"",
|
||||
"format:html:fix": "npm run format:html -- --write",
|
||||
"format:md": "prettier --parser markdown \"*/**/*.md\"",
|
||||
"format:md:fix": "npm run format:md -- --write",
|
||||
"lint:md": "markdownlint --rules sentences-per-line \"*/**/*.md\"",
|
||||
"lint:js:fix": "eslint \"./assets/js/*.js\" \"./content/**/*.js\" --fix",
|
||||
"lint:md": "markdownlint --rules sentences-per-line .",
|
||||
"lint:md:fix": "npm run lint:md -- --fix",
|
||||
"lint:json": "jsonlint ./**/*.json -s",
|
||||
"lint:json:fix": "npm run lint:json -- -i"
|
||||
"lint:html": "npm run build && htmlhint ./public; html-validate ./public",
|
||||
"lint:json": "jsonlint . -s",
|
||||
"lint:json:fix": "npm run lint:json -- -i",
|
||||
"format": "npm-run-all2 format:*",
|
||||
"format:fix": "npm-run-all format:*:fix",
|
||||
"format:html": "prettier --parser html --check .",
|
||||
"format:html:fix": "npm run format:html -- --write",
|
||||
"format:md": "prettier --parser markdown .",
|
||||
"format:md:fix": "npm run format:md -- --write"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.s?[ca]ss": [
|
||||
|
@ -47,12 +52,17 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^9.17.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"html-validate": "^9.1.0",
|
||||
"htmlhint": "^1.1.4",
|
||||
"husky": "^9.1.7",
|
||||
"jsonlint": "^1.6.3",
|
||||
"lint-staged": "^15.3.0",
|
||||
"markdownlint": "^0.37.3",
|
||||
"markdownlint-cli": "^0.43.0",
|
||||
"npm-run-all2": "^7.0.2",
|
||||
"prettier": "^3.4.2",
|
||||
"prettier-plugin-go-template": "^0.0.15",
|
||||
"sentences-per-line": "^0.3.0",
|
||||
"stylelint": "^16.12.0",
|
||||
"stylelint-config-standard-scss": "^14.0.0",
|
||||
|
|
Loading…
Add table
Reference in a new issue