Switch to IPng theme
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-08-13 02:25:52 +02:00
parent fc1c0fdbb4
commit ebf34c65a1
78 changed files with 275 additions and 903 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 lang="en">
{{- partial "head.html" . -}}
<body>
{{- partial "header.html" . -}}
<div id="content">
{{- block "main" . }}{{- end }}
</div>
{{- partial "footer.html" . -}}
</body>
</html>

View File

@ -0,0 +1,27 @@
{{ define "main" }}
<main>
<h1 class="page-title">{{ .Title }}</h1>
Heres a sitemap of informational articles and papers in reversed chronological order:
{{- 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 -}}
<ul>
{{- range $pages.Pages -}}
<li><a href="{{ .Permalink }}"><time>{{ .Date.Format "2006-01-02"}}</time> - {{.Title}}</a></li>
{{- end -}}
</ul>
{{ 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,23 @@
{{- 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,16 @@
{{- 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 ", " | safeHTML }}
</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 ", " | safeHTML }}
</span>
{{- end -}}

View File

@ -0,0 +1,29 @@
<footer class='page-footer'>
{{- $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 }}" rel="me"><i class="{{- .icon.class -}}"></i>{{ .title }}</a></li>
{{- else if .template -}}
<li><a href="{{- printf .template .user -}}" rel="me"><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, licensed under SIL OFL 1.1 (https://scripts.sil.org/OFL) -->" | safeHTML }}
</footer>

View File

@ -0,0 +1,26 @@
<head>
<title>{{ .Site.Title }} {{ with .Title }}- {{ . }} {{ end }}</title>
<link rel="stylesheet" type="text/css" href="{{ "css/fonts.css" | relURL }}">
<link rel="stylesheet" type="text/css" href="{{ "css/fontawesome.css" | relURL }}">
{{ $options := dict "transpiler" "libsass" "targetPath" "css/styles.css" -}}
{{ $style := resources.Get "styles.scss" | toCSS $options | minify | fingerprint -}}
<link rel="stylesheet" type="text/css" href="{{ $style.RelPermalink }}">
{{ with resources.Get "css/userstyles.css" }}
<link rel="stylesheet" type="text/css" href="{{ .Permalink }}">
{{ end -}}
<link rel="icon" href="/assets/logo/favicon/favicon.ico" type="image/x-icon" sizes="any">
<link rel="apple-touch-icon" href="/assets/logo/favicon/apple-touch-icon.png">
<link rel="manifest" href="/assets/logo/favicon/icon.manifest">
<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 }}
<script defer data-domain="ipng.ch" data-api="/api/event" src="/js/script.js"></script>
{{- if eq .Params.asciinema true }}
<link rel="stylesheet" type="text/css" href="{{ "css/asciinema-player.css" | relURL }}">
<script src="{{ "js/asciinema-player.min.js" | relURL }}"></script>
{{- 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,2 @@
<div id='{{ .Get "src" | replaceRE "[[:^alnum:]]" "" }}'></div>
<script>AsciinemaPlayer.create("{{ .Get "src" }}", document.getElementById('{{ .Get "src" | replaceRE "[[:^alnum:]]" "" }}'));</script>

View File

@ -0,0 +1,27 @@
{{ with $.Page.Site.Params.social }}
{{ $socialMap := $.Page.Site.Data.notrack.social }}
{{ $width := default "12em" (.Params.Get "width") }}
{{ $height := default "auto" (.Params.Get "height") }}
{{ $float := default "right" (.Params.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 }}" rel="me"><i class="{{- .icon.class -}}"></i>{{ .title }}</a></li>
{{- else if .template -}}
<li><a href="{{- printf .template .user -}}" rel="me"><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")) | relURL }}" }}
alt="{{ .Get "caption" }}">
</li>

View File

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

View File

@ -0,0 +1,30 @@
<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" | relURL }}"
{{- if or (.Get "alt") (.Get "caption") }} alt="{{ with .Get "alt" }}{{ replace . "'" "&#39;" }}{{ 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,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 }}" rel="me"><i class="{{- .icon.class -}}"></i>{{ .title }}</a></li>
{{- else if .template -}}
<li><a href="{{- printf .template .user -}}" rel="me"><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, licensed under SIL OFL 1.1 (https://scripts.sil.org/OFL) -->" | safeHTML }}

View File

@ -0,0 +1,5 @@
<video class="video-shortcode" preload="{{ .Get "preload" | default "auto" }}" controls>
<source src="{{ .Get "src" }}" type="{{ .Get "type" | default "video/mp4" }}">
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 }}