Initial checkin

This commit is contained in:
Pim van Pelt
2022-09-04 14:08:48 +02:00
commit fc0ea29973
110 changed files with 9548 additions and 0 deletions

View File

@ -0,0 +1,5 @@
{{ define "main" }}
<main>
<p>404: not found</p>
</main>
{{ end }}

View File

@ -0,0 +1,29 @@
{{ define "main" }}
<main>
{{- with .Title }}
<h1 class="page-title">{{ . }}</h1>
{{- end }}
{{ with (where site.RegularPages "Type" "in" site.Params.mainSections) }}
{{- $byyear := (where . ".Draft" false).GroupByDate "2006" -}}
{{- range $byyear -}}
<h2>{{ .Key }}</h2>
<ul>
{{ range.Pages }}
<li> <time>{{ .Date.Format "2/1" }}</time>
<span> - </span>
<a href="{{ .Permalink }}">
<span>{{ .Title }}</span>
</a>
</li>
{{ end }}
</ul>
{{- end -}}
{{ end }}
</main>
{{ end }}

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
{{- partial "head.html" . -}}
<body>
{{- partial "header.html" . -}}
<div id="content">
{{- block "main" . }}{{- end }}
</div>
{{- partial "footer.html" . -}}
</body>
</html>

View File

@ -0,0 +1,52 @@
{{ define "main" }}
<main>
<h1 class="page-title">{{ .Title }}</h1>
{{ if default true .Site.Params.showTaxonomyLinks }}
<div class="taxonomy-links">
<ul>
{{- /* code for figuring out where to archives page is, if anywhere */ -}}
{{ $archivesExists := false }}
{{ $archivesPageTitle := "" }}
{{ $archivesPagePermalink := "" }}
{{ range .Site.AllPages }}
{{ if eq .Layout "archives" }}
{{ $archivesExists = true }}
{{ $archivesPagePermalink = .Permalink }}
{{ with .Title }}
{{ $archivesPageTitle = . }}
{{ end }}
{{ end }}
{{ end }}
{{ if $archivesExists }}
<li><a href="{{ $archivesPagePermalink }}">{{ default "Archives" $archivesPageTitle }}</a></li>
{{ end }}
{{ range $taxonomyName, $taxonomy := .Site.Taxonomies }}
{{ if or (in $taxonomyName "categ") (in $taxonomyName "tag") }}
<li><a href="{{ $taxonomyName | absURL }}">{{ $taxonomyName }}</a></li>
{{ end }}
{{ end }}
</ul>
</div>
{{ end }}
{{- if .Pages -}}
{{- $pages := (where .Pages ".Draft" false) -}}
{{- /* Use site config params for posts per page if available, otherwise default */ -}}
{{- with .Site.Params.list.paginate | default .Site.Params.paginate -}}
{{- $pages = $.Paginate $pages . -}}
{{- else -}}
{{- $pages = .Paginate $pages -}}
{{- end -}}
{{- range $pages.Pages -}}
{{ partial "blog-entry-summary.html" . }}
{{- end -}}
{{ partial "pagination.html" . }}
{{- end -}}
</main>
{{ end }}

View File

@ -0,0 +1,48 @@
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ with .Site.Title }}{{.}}{{ end }}</title>
<link>{{ .Permalink }}</link>
<description>Latest blog posts from {{ .Site.Title }}</description>
{{ with .Site.LanguageCode }}
<language>{{.}}</language>
{{end}}
{{ with .Site.Author.email }}
<managingEditor>{{.}}
{{ with $.Site.Author.name }} ({{.}}){{end}}
</managingEditor>
{{end}}
{{ with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}
</webMaster>
{{end}}
{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>
{{end}}
{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>
{{ end }}
{{ with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{ end }}
{{ with (where site.RegularPages "Type" "in" site.Params.mainSections) }}
{{ range . }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
<description>{{ .Summary | markdownify }}</description>
</item>
{{ end }}
{{ end }}
</channel>
</rss>

View File

@ -0,0 +1,24 @@
{{ define "main" }}
<main>
<article>
{{ if in site.Params.mainSections .Page.Section }}
<h1 class="page-title blog">{{ .Title }}</h1>
{{ else }}
<h1 class="page-title">{{ .Title }}</h1>
{{ end }}
{{- /* Show post information if it's a post, otherwise just the content */ -}}
{{ if in site.Params.mainSections .Page.Section }}
<p class="blog-post-info">Posted: <time>{{ .Date.Format "2006-01-02" }}</time>
{{ partial "blog-taxonomy-info" . }}</p>
<div class="blog-post-content">
{{ .Content }}
</div>
{{ template "_internal/disqus.html" . }}
{{ else }}
{{ .Content }}
{{ end }}
</article>
</main>
{{ end }}

View File

@ -0,0 +1,41 @@
{{ define "main" }}
<main>
{{ $contentExists := gt (len .Content) 0 }}
{{ $blogPages := where .Site.RegularPages.ByDate.Reverse ".Type" "in" .Site.Params.mainSections }}
{{ $blogPages = where $blogPages ".Params.draft" "!=" true }}
{{ $showLatest := and (default true site.Params.showBlogLatest) $blogPages }}
{{ $headlessExists := false }}
{{ if $contentExists }}
{{ .Content }}
{{ else }}
{{ with .Site.GetPage "/homepage" }}
{{ $headlessExists = true }}
<div class="headless-homepage">
{{ range .Resources }}
<h2>
{{ .Title }}
</h2>
<p>{{ .Content }}</p>
{{ end }}
</div>
{{ end }}
{{ end }}
{{ if and (or $headlessExists $contentExists) $showLatest }}
<p class="delimiter">&diams; &diams; &diams;</p>
{{ $blogLatest := default "Latest Blog Posts" site.Params.blogLatestHeading }}
<h2 id="latest-blog-home">{{- $blogLatest -}}</h2>
{{ end }}
{{ if $showLatest }}
{{ with $blogPages }}
{{ range first (default 3 site.Params.nBlogLatest) . }}
{{- partial "blog-entry-summary" . -}}
{{ end }}
{{ end }}
{{ end }}
</main>
{{ end }}

View File

@ -0,0 +1,10 @@
<article class="blog-post-summary">
<h3 class="blog-post-title"><a href="{{ .Permalink }}">{{.Title}}</a></h3>
<p class="blog-post-info">Posted: <time>{{ .Date.Format "2006-01-02"}}</time>
{{ partial "blog-taxonomy-info" . }}</p>
<p>
{{- .Summary -}}
<span> <a href="{{ .Permalink }}">Read more...</a></span>
</p>
</article>

View File

@ -0,0 +1,17 @@
{{ with .Params.Categories }}
<span class="blog-taxonomy-info"> &nbsp; | &nbsp; Categories:
{{ $sort := sort . }}
{{ $links := apply $sort "partial" "post-category-link" "." }}
{{ $clean := apply $links "chomp" "." }}
{{ delimit $clean ", " }}
</span>
{{ end }}
{{ with .Params.Tags }}
<span class="blog-taxonomy-info"> &nbsp; | &nbsp; Tags:
{{ $sort := sort . }}
{{ $links := apply $sort "partial" "post-tag-link" "." }}
{{ $clean := apply $links "chomp" "." }}
{{ delimit $clean ", " }}
</span>
{{ end }}

View File

@ -0,0 +1,3 @@
<footer>
<span>{{ .Site.Params.Footer }}</span>
</footer>

View File

@ -0,0 +1,19 @@
<head>
<title>{{ .Site.Title }} {{ with .Title }}- {{ . }} {{ end }}</title>
<link rel="stylesheet" type="text/css" href="{{ "css/fonts.css" | absURL }}">
<link rel="stylesheet" type="text/css" href="{{ "css/fontawesome.css" | absURL }}">
<link rel="stylesheet" type="text/css" href="{{ "css/styles.css" | absURL }}">
{{ with resources.Get "css/userstyles.css" }}
<link rel="stylesheet" type="text/css" href="{{ .Permalink }}">
{{ end }}
{{ with .Site.Params.favicon }}
<link rel="icon" href="{{ . | absURL }}">
{{ end }}
<meta charset="UTF-8">
<meta name="author" content="{{ .Site.Params.Author }}">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{{ range .AlternativeOutputFormats -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
</head>

View File

@ -0,0 +1,70 @@
<header class="page-header">
<div class="myname">
<h2><a href="{{ default .Site.Home .Site.BaseURL }}">{{ default .Site.Params.Author .Site.Params.siteHeading }}</a></h2>
</div>
<nav>
<ul class="navbar">
{{- /* info about current page */ -}}
{{- $currentPage := . -}}
{{- $currentPagesParent := $currentPage.Parent -}}
{{- $currentPageInTags := eq $currentPage.Section "tags" -}}
{{- $currentPageInCategories := eq $currentPage.Section "categories" -}}
{{- $currentPageNotHome := ne $currentPage.IsHome true -}}
{{- range .Site.Menus.main -}}
{{- if .HasChildren -}}
{{- /* info about current menu */ -}}
{{- $currentMenusPage := .Page -}}
{{- $currentMenuHasTags := false -}}
{{- $currentMenuHasCategories := false -}}
{{- range .Children -}}
{{- $childMenuSection := .Page.Section -}}
{{- if eq $childMenuSection "categories" -}}{{- $currentMenuHasCategories = true -}}{{- end -}}
{{- if eq $childMenuSection "tags" -}}{{- $currentMenuHasTags = true -}}{{- end -}}
{{- end -}}
{{- /* comparison of current menu and current page */ -}}
{{- $active := eq $currentMenusPage $currentPagesParent -}}
{{- $active = and $active $currentPageNotHome -}}
{{- $active = or $active (and $currentMenuHasTags $currentPageInTags) -}}
{{- $active = or $active (and $currentMenuHasCategories $currentPageInCategories) }}
<li class="dropdown {{ if or $active ($currentPage.IsMenuCurrent "main" . ) ($currentPage.HasMenuCurrent "main" .)}}activetab{{ end }}">
<a href ="{{ .URL }}">
{{- .Pre }}
<span>{{ .Name }}</span>
</a>
<div class=sub-menu>
{{- range .Children }}
{{- $currentMenuSection := .Page.Section }}
{{- $active := and $currentPageInTags (eq $currentMenuSection "tags") }}
{{- $active = or $active (and $currentPageInCategories (eq $currentMenuSection "categories") ) }}
{{- $active = or $active ($currentPage.IsMenuCurrent "main" . ) }}
<a class="{{- if $active -}}activetab{{- end -}}" href="{{- .URL -}}">{{ .Name }}</a>
{{- end }}
</div>
</li>
{{- else -}}
{{- $currentMenusPage := .Page }}
{{- $currentMenuInMainSections := false }}
{{- with $currentMenusPage }}
{{- $currentMenuInMainSections = in site.Params.mainSections .Type }}
{{- end }}
{{- $active := eq $currentMenusPage $currentPagesParent }}
{{- $active = and $active (eq $currentPage.RelPermalink .URL ) }}
{{- $active = or $active (eq $currentPage.Title .Name ) }}
{{- $active = or $active ($currentPage.IsMenuCurrent "main" . ) }}
<li class="{{- if $active -}} activetab {{- end -}}">
<a href="{{ .URL }}">
{{- .Pre }}
<span>{{ .Name }}</span>
</a>
</li>
{{- end }}
{{- end }}
</ul>
</nav>
</header>

View File

@ -0,0 +1,43 @@
{{ $pag := $.Paginator }}
{{ if gt $pag.TotalPages 1 }}
<ul class="pagination">
{{ with $pag.First }}
<li class="page-item">
<a href="{{ .URL }}" class="page-link" aria-label="First"><span
aria-hidden="true">&laquo;</span></a>
</li>
{{ end }}
<li class="page-item{{ if not $pag.HasPrev }} disabled{{ end }}">
<a {{ if $pag.HasPrev }}href="{{ $pag.Prev.URL }}"{{ end }}
class="page-link" aria-label="Previous"><span aria-hidden="true">&lsaquo;</span></a>
</li>
{{ $ellipsed := false }}
{{ $shouldEllipse := false }}
{{ range $pag.Pagers }}
{{ $right := sub .TotalPages .PageNumber }}
{{ $showNumber := or (le .PageNumber 3) (eq $right 0) }}
{{ $showNumber := or $showNumber (and (gt .PageNumber (sub $pag.PageNumber 2)) (lt .PageNumber (add $pag.PageNumber 2))) }}
{{ if $showNumber }}
{{ $ellipsed = false }}
{{ $shouldEllipse = false }}
{{ else }}
{{ $shouldEllipse = not $ellipsed }}
{{ $ellipsed = true }}
{{ end }}
{{ if $showNumber }}
<li class="page-item{{ if eq . $pag }} active{{ end }}"><a class="page-link" href="{{ .URL }}">{{ .PageNumber }}</a></li>
{{ else if $shouldEllipse }}
<li class="page-item disabled"><span aria-hidden="true">&nbsp;&hellip;&nbsp;</span></li>
{{ end }}
{{ end }}
<li class="page-item{{ if not $pag.HasNext }} disabled{{ end }}">
<a {{ if $pag.HasNext }}href="{{ $pag.Next.URL }}"{{ end }}
class="page-link" aria-label="Next"><span aria-hidden="true">&rsaquo;</span></a>
</li>
{{ with $pag.Last }}
<li class="page-item">
<a href="{{ .URL }}" class="page-link" aria-label="Last"><span aria-hidden="true">&raquo;</span></a>
</li>
{{ end }}
</ul>
{{ end }}

View File

@ -0,0 +1 @@
<a class="blog-taxonomy-info" href="/categories/{{ . | urlize }}">{{ . }}</a>

View File

@ -0,0 +1 @@
<a class="blog-taxonomy-info" href="/tags/{{ . | urlize }}">{{ . }}</a>

View File

@ -0,0 +1,27 @@
{{ with $.Page.Site.Params.social }}
{{ $socialMap := $.Page.Site.Data.notrack.social }}
{{ $width := default "12em" (.Get "width") }}
{{ $height := default "auto" (.Get "height") }}
{{ $float := default "right" (.Get "float") }}
<div class="contactbox {{ $float }}" style="width: {{ $width }}; height: {{ $height }}">
<ul>
{{- $socialArray := slice -}}
{{ range $website, $user := $.Site.Params.social }}
{{- $social := $website | lower | index $socialMap | default dict -}}
{{- $social := dict "user" $user | merge $social -}}
{{- $socialArray = $socialArray | append $social -}}
{{ end }}
{{ range sort $socialArray "weight" -}}
{{- if .prefix -}}
<li><a href="{{- .prefix -}}{{ .user }}"><i class="{{- .icon.class -}}"></i>{{ .title }}</a></li>
{{- else if .template -}}
<li><a href="{{- printf .template .user -}}"><i class="{{- .icon.class -}}"></i>{{ .title }}</a></li>
{{- else if .url -}}
<li><a href="{{- .url -}}"><i class="{{- .icon.class -}}"></i>{{ .title }}</a></li>
{{- end -}}
{{- end -}}
</ul>
{{ printf "<!-- Icons are from Awesome Font, licenced under SIL OFL 1.1 (https://scripts.sil.org/OFL) -->" | safeHTML }}
</div>
{{ end }}

View File

@ -0,0 +1,3 @@
<div class="{{ default "resume-content" (.Get "class") }}">
{{ .Inner }}
</div>

View File

@ -0,0 +1,4 @@
<ul class="gallery-category">
{{ .Inner }}
<li class="gallery-photo"></li>
</ul>

View File

@ -0,0 +1,8 @@
<!-- Modal for gallery images -->
<div id="myModal" class="modal">
<span class="close">&times;</span>
<img class="modal-content" id="modal-img">
<div id="caption"></div>
<div id="loader"></div>
</div>

View File

@ -0,0 +1,4 @@
<li class="gallery-photo">
<img src="{{ ( printf "img/thumbnails/%s" (.Get "fn")) | absURL }}" }}
alt="{{ .Get "caption" }}">
</li>

View File

@ -0,0 +1 @@
<script src="/js/gallery.js"></script>

View File

@ -0,0 +1,32 @@
<figure class="image-shortcode{{ with .Get "class" }} {{ . }}{{ end }}
{{- with .Get "wide" }}{{- if eq . "true" }} wide{{ end -}}{{ end -}}
{{- with .Get "frame" }}{{- if eq . "true" }} frame{{ end -}}{{ end -}}
{{- with .Get "float" }} {{ . }}{{ end -}}"
style="
{{- with .Get "width" }}width: {{ . }};{{ end -}}
{{- with .Get "height" }}height: {{ . }};{{ end -}}">
{{- if .Get "link" -}}
<a href="{{ .Get "link" }}"{{ with .Get "target" }} target="{{ . }}"{{ end }}{{ with .Get "rel" }} rel="{{ . }}"{{ end }}>
{{- end }}
<img src="{{ .Get "src" | absURL }}"
{{- if or (.Get "alt") (.Get "caption") }}
alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" | markdownify| plainify }}{{ end }}"
{{- end -}}
/> <!-- Closing img tag -->
{{- if .Get "link" }}</a>{{ end -}}
{{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}}
<figcaption>
{{ with (.Get "title") -}}
<h4>{{ . }}</h4>
{{- end -}}
{{- if or (.Get "caption") (.Get "attr") -}}<p>
{{- .Get "caption" | markdownify -}}
{{- with .Get "attrlink" }}
<a href="{{ . }}">
{{- end -}}
{{- .Get "attr" | markdownify -}}
{{- if .Get "attrlink" }}</a>{{ end }}</p>
{{- end }}
</figcaption>
{{- end }}
</figure>

View File

@ -0,0 +1 @@
{{ .Inner }}

View File

@ -0,0 +1 @@
<p class="resume-subcategory">{{ .Get "title" }}</p>

View File

@ -0,0 +1,31 @@
<div class="resume-entry">
<!-- What the resume entry is about (degree program, work, etc.) -->
{{ with .Get "what" }}
<p class="what">{{ . }}</p>
{{ end }}
{{ $where := false }}
{{ $when := false }}
{{/* Where was the thing you did? (e.g. Mozilla) */}}
{{ with .Get "where" }}{{ $where = . }}{{ end }}
{{/* When did you do it? (e.g. 2020) */}}
{{- with .Get "when" }}{{ $when = . }}{{ end }}
{{ if and $where $when }}
<p class="resume-entry-data"><span class="where">{{ $where }}</span> |
<span class="when">{{ $when }}</span></p>
{{ else if $where }}
<p class="resume-entry-data"><span class="where">{{ $where }}</span></p>
{{ else if $when }}
<p class="resume-entry-data"><span class="when">{{ $when }}</span></p>
{{ end }}
{{/* additional HTML under or as the entry */}}
{{ if gt (len .Inner) 0 }}
<div class="resume-inner">
{{ .Inner }}
</div>
{{ end }}
</div>

View File

@ -0,0 +1,6 @@
<div class="category-title">
<h4>{{ .Get "title" }}</h4>
</div>
<div class="category-content">
{{ .Inner }}
</div>

View File

@ -0,0 +1,28 @@
{{ $socialMap := .Site.Data.notrack.social }}
{{ with $.Site.Params.social }}
<div class="social">
<ul>
{{- $socialArray := slice -}}
{{ range $website, $user := $.Site.Params.social }}
{{- $social := $website | lower | index $socialMap | default dict -}}
{{- $social := dict "user" $user | merge $social -}}
{{- $data := index $socialMap $website -}}
{{- $socialArray = $socialArray | append $social -}}
{{ end }}
{{ range sort $socialArray "weight" -}}
{{- if .prefix -}}
<li><a href="{{- .prefix -}}{{ .user }}"><i class="{{- .icon.class -}}"></i>{{ .title }}</a></li>
{{- else if .template -}}
<li><a href="{{- printf .template .user -}}"><i class="{{- .icon.class -}}"></i>{{ .title }}</a></li>
{{- else if .url -}}
<li><a href="{{- .url -}}"><i class="{{- .icon.class -}}"></i>{{ .title }}</a></li>
{{- end -}}
{{- end -}}
</ul>
</div>
{{ end }}
{{ printf "<!-- Icons are from Awesome Font, licenced under SIL OFL 1.1 (https://scripts.sil.org/OFL) -->" | safeHTML }}

View File

@ -0,0 +1,5 @@
<video class="video-shortcode" preload="{{ .Get "preload" }}" controls>
<source src="{{ .Get "src" }}" type="{{ .Get "type" }}">
There should have been a video here but your browser does not seem
to support it.
</video>

View File

@ -0,0 +1,28 @@
{{ define "main" }}
<main>
{{- /* Hardcoded values for identifying whether we're looking at a tag or category */ -}}
{{ if or (eq .Data.Plural "categories") (eq .Data.Singular "category") }}
<h1>Category: {{ .Title }}</h1>
{{ else if or (eq .Data.Plural "tags") (eq .Data.Singular "tag") }}
<h1>Tag: {{ .Title }}</h1>
{{ end }}
{{- if .Pages -}}
{{- $pages := (where .Pages ".Draft" false) -}}
{{- with .Site.Params.list.paginate | default .Site.Params.paginate -}}
{{- $pages = $.Paginate $pages . -}}
{{- else -}}
{{- $pages = .Paginate $pages -}}
{{- end -}}
{{- range $pages.Pages -}}
<article class="archive-item">
{{ partial "blog-entry-summary.html" . }}
</article>
{{- end -}}
{{ partial "pagination.html" . }}
{{- end -}}
</main>
{{ end }}

View File

@ -0,0 +1,11 @@
{{ define "main" }}
<main>
<h1>All {{ .Title }}</h1>
<ul>
{{ range .Data.Terms.Alphabetical }}
<li><a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a> ({{ .Count }})</li>
{{ end }}
</ul>
</main>
{{ end }}