feat: initial import

This commit is contained in:
Iain Learmonth 2026-01-10 13:42:14 +00:00
commit 03ab1091b1
50 changed files with 1146 additions and 0 deletions

View file

@ -0,0 +1,6 @@
{{ range site.Params.contact.methods }}
<div class="contact-method">
<h6 class="contact-method__name">{{ T .name }}</h6>
<a class="contact-method__content" href="{{ .link | safeURL }}">{{ .display }}</a>
</div>
{{ end }}

View file

@ -0,0 +1,9 @@
<div class="flex-section">
<div class="flex-section__title">
{{ .title }}
</div>
<div class="flex-section__content">
{{ .content }}
</div>
</div>

View file

@ -0,0 +1,96 @@
<div class="footer__content">
<div class="footer__column">
{{ with site.Params.logo.small }}
{{ with resources.Get . }}
<img
class="footer__logo"
src="{{ .RelPermalink }}"
width="{{ .Width }}"
alt="{{ site.Params.logo.smallAlt }}" />
{{ else }}
{{ errorf "Unable to find %s in assets directory" . }}
{{ end }}
{{ end }}
<address class="footer__address">{{ site.Params.address }}</address>
<div class="footer__duns">{{ site.Params.duns }}</div>
</div>
<div
{{ if and (site.Params.footer.col2.align) (eq site.Params.footer.col2.align "right") }}
class="footer__column-right-aligned"
{{ else }}
class="footer__column"
{{ end }}>
{{ range site.Params.footer.col2.items }}
{{ if .title }}
<h6 class="footer__menu__title">{{ .title }}</h6>
{{ else if .text }}
<a class="footer__menu__link" href="{{ .href | safeURL }}">
{{ if .icon }}
<i class="footer__menu__link__icon" data-feather="{{ .icon }}"></i>
{{ end }}
{{ .text }}</a
>
{{ else if .caption }}
<div class="footer__menu__caption">{{ .caption }}</div>
{{ else if .logo }}
{{ $alt := .alt }}
{{ $href := .href }}
{{ $size := .size }}
{{ with resources.Get .logo }}
<a {{ if $href }}href="{{ $href | safeURL }}"{{ end }}>
<img
class="footer__menu__logo"
src="{{ .RelPermalink }}"
width="{{ compare.Conditional ($size) $size .Width }}"
alt="{{ $alt }}" />
</a>
{{ else }}
{{ errorf "Unable to find %s in assets directory" . }}
{{ end }}
{{ end }}
{{ end }}
</div>
<div
{{ if and (site.Params.footer.col3.align) (eq site.Params.footer.col3.align "right") }}
class="footer__column-right-aligned"
{{ else }}
class="footer__column"
{{ end }}>
{{ range site.Params.footer.col3.items }}
{{ if .title }}
<h6 class="footer__menu__title">{{ .title }}</h6>
{{ else if .text }}
<a class="footer__menu__link" href="{{ .href | safeURL }}">
{{ if .icon }}
<i class="footer__menu__link__icon" data-feather="{{ .icon }}"></i>
{{ end }}
{{ .text }}</a
>
{{ else if .caption }}
<div class="footer__menu__caption">{{ .caption }}</div>
{{ else if .logo }}
{{ $alt := .alt }}
{{ $href := .href }}
{{ $size := .size }}
{{ with resources.Get .logo }}
<a {{ if $href }}href="{{ $href | safeURL }}"{{ end }}>
<img
class="footer__menu__logo"
src="{{ .RelPermalink }}"
width="{{ compare.Conditional ($size) $size .Width }}"
alt="{{ $alt }}" />
</a>
{{ else }}
{{ errorf "Unable to find %s in assets directory" . }}
{{ end }}
{{ end }}
{{ end }}
</div>
<div class="footer__legal">
{{- partial "legal.html" }}
</div>
</div>

View file

@ -0,0 +1,19 @@
{{ $back := "" }}
{{ if .Params.background }}
{{ with resources.Get .Params.background }}
{{ $back = .RelPermalink }}
{{ else }}
{{ errorf "Unable to find %s in assets directory" . }}
{{ end }}
{{ end }}
{{ $Content := replace .Content "<li>" "<li><i class='li__icon' data-feather='check'></i>" }}
<div
class="full-section"
style="background-image:url({{ $back }});background-size:cover;background-repeat:no-repeat;background-position:center center;">
<div class="full-section__content">
{{ $Content | safeHTML }}
</div>
</div>

View file

@ -0,0 +1,17 @@
{{ $back := "" }}
{{ if .Params.background }}
{{ with resources.Get .Params.background }}
{{ $back = .RelPermalink }}
{{ else }}
{{ errorf "Unable to find %s in assets directory" . }}
{{ end }}
{{ end }}
<div
class="half-section"
style="background-image:url({{ $back }});background-size:cover;background-repeat:no-repeat;background-position:center center;">
<div class="half-section__content">
{{ .Content }}
</div>
<div>&nbsp;</div>
</div>

View file

@ -0,0 +1,39 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>
{{ if .IsHome }}
{{ site.Title }}
{{ else }}
{{ printf "%s | %s" .Title site.Title }}
{{ end }}
</title>
{{ partialCached "head/css.html" . }}
{{ partialCached "head/js.html" . }}
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Assistant:wght@200..800&display=swap"
rel="stylesheet" />
{{ if not .IsHome }}
<meta property="og:title" content="{{ .Title }}" />
<meta property="og:url" content="{{ .RelPermalink }}" />
<meta property="og:description" content="{{ .Description }}" />
<meta property="og:type" content="website" />
{{ end }}
{{ if eq .Name "Contact" }}
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script
id="zammad_form_script"
src="https://help.sr2.uk/assets/form/form.js"></script>
<script>
$(function () {
$("#zammad-feedback-form").ZammadForm({
agreementMessage: {{ site.Params.feedback.agreementMessage }},
messageSubmit:{{ site.Params.feedback.messageSubmit }},
messageThankYou:{{ site.Params.feedback.messageThankYou }},
showTitle: false,
noCSS: true,
});
});
</script>
{{ end }}

View file

@ -0,0 +1,21 @@
{{ range resources.Match "css/*.scss" }}
{{ with resources.Get . }}
{{ $name := . }}
{{ $opts := dict
"enableSourceMap" hugo.IsDevelopment
"outputStyle" (cond hugo.IsDevelopment "expanded" "compressed")
"targetPath" (replace $name ".scss" ".css")
"transpiler" "dartsass"
"vars" site.Params.styles
}}
{{ with . | toCSS $opts }}
{{ if hugo.IsDevelopment }}
<link rel="stylesheet" href="{{ .RelPermalink }}">
{{ else }}
{{ with . | fingerprint }}
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}

View file

@ -0,0 +1,18 @@
{{- with resources.Get "js/main.js" }}
{{- $opts := dict
"minify" (not hugo.IsDevelopment)
"sourceMap" (cond hugo.IsDevelopment "external" "")
"targetPath" "js/main.js"
}}
{{- with . | js.Build $opts }}
{{- if hugo.IsDevelopment }}
<script src="{{ .RelPermalink }}"></script>
{{- else }}
{{- with . | fingerprint }}
<script src="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
{{- end }}
{{- end }}
{{- end }}
{{- end }}
<script src="https://unpkg.com/feather-icons"></script>

View file

@ -0,0 +1,29 @@
<div class="header__content">
{{ with site.Params.logo.main }}
{{ with resources.Get . }}
<a href="/">
<img
class="header__logo"
src="{{ .RelPermalink }}"
width="{{ .Width }}"
alt="{{ site.Params.logo.mainAlt }}" />
</a>
{{ else }}
{{ errorf "Unable to find %s in assets directory" . }}
{{ end }}
{{ end }}
{{ if site.Params.header.buttons }}
<div class="header__spacer">&nbsp;</div>
{{ range site.Params.header.buttons }}
<a
class="{{ compare.Conditional (compare.Eq .type "text") "header__button--text" "header__button" }}"
href="{{ .url | safeURL }}">
{{ if .icon }}
<i class="header__button__icon" data-feather="{{ .icon }}"></i>
{{ end }}
{{ .name }}
</a>
{{ end }}
{{ end }}
</div>

View file

@ -0,0 +1,51 @@
{{- /*
Renders a menu for the given menu ID.
@context {page} page The current page.
@context {string} menuID The menu ID.
@example: {{ partial "menu.html" (dict "menuID" "main" "page" .) }}
*/}}
{{- $page := .page }}
{{- $menuID := .menuID }}
{{- with index site.Menus $menuID }}
<nav>
<ul>
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
</ul>
</nav>
{{- end }}
{{- define "_partials/inline/menu/walk.html" }}
{{- $page := .page }}
{{- range .menuEntries }}
{{- $attrs := dict "href" .URL }}
{{- if $page.IsMenuCurrent .Menu . }}
{{- $attrs = merge $attrs (dict "class" "active" "aria-current" "page") }}
{{- else if $page.HasMenuCurrent .Menu .}}
{{- $attrs = merge $attrs (dict "class" "ancestor" "aria-current" "true") }}
{{- end }}
{{- $name := .Name }}
{{- with .Identifier }}
{{- with T . }}
{{- $name = . }}
{{- end }}
{{- end }}
<li>
<a
{{- range $k, $v := $attrs }}
{{- with $v }}
{{- printf " %s=%q" $k $v | safeHTMLAttr }}
{{- end }}
{{- end -}}
>{{ $name }}</a>
{{- with .Children }}
<ul>
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
</ul>
{{- end }}
</li>
{{- end }}
{{- end }}

View file

@ -0,0 +1,21 @@
{{- /*
For a given taxonomy, renders a list of terms assigned to the page.
@context {page} page The current page.
@context {string} taxonomy The taxonomy.
@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
*/}}
{{- $page := .page }}
{{- $taxonomy := .taxonomy }}
{{- with $page.GetTerms $taxonomy }}
{{- $label := (index . 0).Parent.LinkTitle }}
<div>
<span>{{ $label }}: </span>
{{- range . }}
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
{{- end }}
</div>
{{- end }}

View file

@ -0,0 +1,25 @@
{{ range (where site.RegularPages "Section" "eq" "team").ByDate }}
<div class="team-member">
{{ $altName := .Params.name }}
{{ if .Param "photo" }}
{{ $photo := .Params.photo }}
{{ with resources.Get $photo }}
<img
class="team-member__photo"
src="{{ .RelPermalink }}"
width="{{ .Width }}"
alt="{{ $altName }}" />
{{ else }}
{{ errorf "Unable to find %s in assets directory" . }}
{{ end }}
{{ else }}
<div class="team-member__photo" alt="{{ $altName }}"></div>
{{ end }}
<div>
<strong class="team-member__name">{{ .Param "name" }}</strong>
<span class="team-member__education">{{ .Param "education" }}</span>
<span class="team-member__pronoun">{{ .Param "pronoun" }}</span>
</div>
<div class="team-member__role">{{ .Param "role" }}</div>
</div>
{{ end }}

View file

@ -0,0 +1,23 @@
{{- /*
For a given taxonomy, renders a list of terms assigned to the page.
@context {page} page The current page.
@context {string} taxonomy The taxonomy.
@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
*/}}
{{- $page := .page }}
{{- $taxonomy := .taxonomy }}
{{- with $page.GetTerms $taxonomy }}
{{- $label := (index . 0).Parent.LinkTitle }}
<div>
<div>{{ $label }}:</div>
<ul>
{{- range . }}
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
{{- end }}
</ul>
</div>
{{- end }}

View file

@ -0,0 +1,11 @@
<iframe
width="425"
height="350"
src="https://www.openstreetmap.org/export/embed.html?bbox=-2.1135646104812627%2C57.14209426300935%2C-2.1091255545616154%2C57.14353930050775&amp;layer=mapnik&amp;marker=57.142816788811984%2C-2.1113450825214386"
style="border: 1px solid black"></iframe
><br /><small
><a
href="https://www.openstreetmap.org/?mlat=57.142817&amp;mlon=-2.111345#map=19/57.142817/-2.111345"
>{{ T "Show larger map" }}</a
></small
>

View file

@ -0,0 +1,3 @@
{{ if site.Params.address }}
<address>{{ site.Params.address }}</address>
{{ end }}

View file

@ -0,0 +1,6 @@
{{ range site.Params.contact.methods }}
<div class="contact-page__method">
<h6 class="no-bottom-margin">{{ T .name }}</h6>
<a class="contact-page__method__content" href="{{ .link | safeURL }}">{{ .display }}</a>
</div>
{{ end }}

View file

@ -0,0 +1 @@
<div id="zammad-feedback-form">{{ .Params.fallback }}</div>

View file

@ -0,0 +1,6 @@
<a class="primary-button" href="{{ .Params.url }}">
{{ .Params.name }}
{{ if .Params.icon }}
<i class="primary-button__icon" data-feather="{{ .Params.icon }}"></i>
{{ end }}
</a>

22
layouts/baseof.html Normal file
View file

@ -0,0 +1,22 @@
<!doctype html>
<html
lang="{{ site.Language.LanguageCode }}"
dir="{{ or site.Language.LanguageDirection `ltr` }}">
<head>
{{ partial "head.html" . }}
</head>
<body>
<header>
{{ partial "header.html" . }}
</header>
<main>
<div class="main__content">
{{ block "main" . }}{{ end }}
</div>
{{ block "main-fullwidth" . }}{{ end }}
</main>
<footer>
{{ partial "footer.html" . }}
</footer>
</body>
</html>

View file

@ -0,0 +1,13 @@
{{ define "main" }}
<h1 class="page__title">{{ .Title }}</h1>
{{ $dateMachine := .Lastmod | time.Format "2006-01-02T15:04:05-07:00" }}
{{ $dateHuman := .Lastmod | time.Format ":date_long" }}
{{ $dateMachineP := .PublishDate | time.Format "2006-01-02T15:04:05-07:00" }}
{{ $dateHumanP := .PublishDate | time.Format ":date_long" }}
<div class="page__date">
</div>
<div class="contact-page">
{{ .Content }}
</div>
{{ end }}

6
layouts/home.html Normal file
View file

@ -0,0 +1,6 @@
{{ define "main" }}
{{ .Content }}
{{ end }}
{{ define "main-fullwidth" }}
{{ partial "home.html" . }}
{{ end }}

12
layouts/page.html Normal file
View file

@ -0,0 +1,12 @@
{{ define "main" }}
<h1 class="page__title">{{ .Title }}</h1>
{{ $dateMachine := .Lastmod | time.Format "2006-01-02T15:04:05-07:00" }}
{{ $dateHuman := .Lastmod | time.Format ":date_long" }}
<div class="page__date">
{{ T "Updated" }} <time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
</div>
{{ .Content }}
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
{{ end }}

23
layouts/posts/page.html Normal file
View file

@ -0,0 +1,23 @@
{{ define "main" }}
<h1 class="page__title">{{ .Title }}</h1>
{{ $dateMachine := .Lastmod | time.Format "2006-01-02T15:04:05-07:00" }}
{{ $dateHuman := .Lastmod | time.Format ":date_long" }}
{{ $dateMachineP := .PublishDate | time.Format "2006-01-02T15:04:05-07:00" }}
{{ $dateHumanP := .PublishDate | time.Format ":date_long" }}
{{ if .Params.author }}
<div class="page__author">{{ printf (T "By") .Params.author }}</div>
{{ end }}
<div class="page__date">
{{ T "Published" }} <time datetime="{{ $dateMachineP }}">{{ $dateHumanP }}</time>
<br/>
{{ T "Updated" }} <time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
<div class="page__tag">
{{ partial "page-tags.html" (dict "taxonomy" "tags" "page" .) }}
</div>
</div>
{{ .Content }}
{{ end }}

View file

@ -0,0 +1,11 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ range .Pages }}
<section>
<h2 class="no-bottom-margin"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
<h4 class="no-top-margin">{{ .PublishDate }}</h4>
{{ .Summary }}
</section>
{{ end }}
{{ end }}

10
layouts/section.html Normal file
View file

@ -0,0 +1,10 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ range .Pages }}
<section>
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{ .Summary }}
</section>
{{ end }}
{{ end }}

7
layouts/taxonomy.html Normal file
View file

@ -0,0 +1,7 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ range .Pages }}
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{ end }}
{{ end }}

7
layouts/term.html Normal file
View file

@ -0,0 +1,7 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ range .Pages }}
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{ end }}
{{ end }}