Spaces:
Sleeping
Sleeping
Upload 34 files
Browse files- archetypes/default.md +5 -0
- layouts/404.html +29 -0
- layouts/_default/baseof.html +44 -0
- layouts/_default/list.html +299 -0
- layouts/_default/rss.xml +86 -0
- layouts/_default/single.html +149 -0
- layouts/_default/sitemap.xml +29 -0
- layouts/partials/_funcs/get-page-images.html +47 -0
- layouts/partials/a11y.html +189 -0
- layouts/partials/bundles/branch.html +223 -0
- layouts/partials/bundles/leaf.html +263 -0
- layouts/partials/fediverse.html +95 -0
- layouts/partials/footer.html +59 -0
- layouts/partials/head.html +20 -0
- layouts/partials/head/css.html +133 -0
- layouts/partials/head/js.html +78 -0
- layouts/partials/head/meta.html +204 -0
- layouts/partials/header.html +86 -0
- layouts/partials/i18n.html +95 -0
- layouts/partials/menu.html +136 -0
- layouts/partials/nav.html +202 -0
- layouts/partials/search.html +61 -0
- layouts/shortcodes/figure.html +57 -0
- layouts/shortcodes/include.html +6 -0
- layouts/shortcodes/marginpar.html +4 -0
- layouts/shortcodes/pin.html +26 -0
- layouts/shortcodes/rss.html +55 -0
- static/css/_grain.svg +70 -0
- static/css/fonts/README.md +8 -0
- static/css/fonts/base-ui.json +0 -0
- static/css/fonts/base-ui.woff2 +0 -0
- static/css/fonts/fonts.uri.txt +52 -0
- static/js/katex.js +15 -0
- static/js/mathjax.js +8 -0
archetypes/default.md
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
+++
|
2 |
+
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
|
3 |
+
date = {{ .Date }}
|
4 |
+
draft = true
|
5 |
+
+++
|
layouts/404.html
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
{{- $lang := or site.Language.LanguageCode site.Language.Lang }}
|
3 |
+
{{- $dir := or site.Language.LanguageDirection "ltr" }}
|
4 |
+
<html lang="{{ $lang }}" dir="{{ $dir }}">
|
5 |
+
<head>
|
6 |
+
<meta charset="UTF-8">
|
7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
8 |
+
<title>404 - {{ i18n "404PageNotFound" }}</title>
|
9 |
+
<meta http-equiv="refresh" content="15;url={{ absLangURL "" }}">
|
10 |
+
{{ partialCached "head/css.html" . -}}
|
11 |
+
<style>
|
12 |
+
h1 {--anm: fade 15s;-webkit-animation: var(--anm);-moz-animation: var(--anm);-o-animation: var(--anm);animation: var(--anm);font-size: 5rem;}
|
13 |
+
h1::after {font-size: 2rem}
|
14 |
+
@keyframes fade {0% {opacity: 1} 100% {opacity: 0}}
|
15 |
+
@-webkit-keyframes fade {0% {opacity: 1} 100% {opacity: 0}}
|
16 |
+
</style>
|
17 |
+
</head>
|
18 |
+
<body id="page404">
|
19 |
+
{{ partial "header.html" . }}
|
20 |
+
<main class="pagewidth" style="display: flex; flex-direction: column;">
|
21 |
+
<div class="textwidth" style="margin:auto;">
|
22 |
+
<h1 class="has-aria-label" aria-label="{{ i18n "404PageNotFound" }}">404</h1>
|
23 |
+
<p role="alert">{{ i18n "404Alert" }} <a href="/" class="loading">{{ i18n "404ReturnHome" }}</a></p>
|
24 |
+
</div>
|
25 |
+
</main>
|
26 |
+
{{ partialCached "footer.html" . }}
|
27 |
+
<div id="background-body" role="presentation"></div>
|
28 |
+
</body>
|
29 |
+
</html>
|
layouts/_default/baseof.html
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
{{- $lang := or site.Language.LanguageCode site.Language.Lang }}
|
3 |
+
{{- $dir := or site.Language.LanguageDirection "ltr" }}
|
4 |
+
<html lang="{{ $lang }}" dir="{{ $dir }}">
|
5 |
+
<head>
|
6 |
+
{{ partial "head.html" . }}
|
7 |
+
{{ block "head" . }}{{ end }}
|
8 |
+
</head>
|
9 |
+
{{- if not .Params.Headless }}
|
10 |
+
<body {{ with .Params.Type }} id="{{ . }}" {{ end -}}>
|
11 |
+
{{ partial "header.html" . }}
|
12 |
+
{{ block "aside" . }}{{ end }}
|
13 |
+
{{ "<!-- [main] baseof.html -->" | safeHTML }}
|
14 |
+
<main id="{{ .Kind }}">
|
15 |
+
{{ partial "main/header.html" . }}
|
16 |
+
<div id="top" role="presentation">
|
17 |
+
{{ block "top" . }}{{ end }}
|
18 |
+
</div>
|
19 |
+
{{ block "main" . }}{{ end }}
|
20 |
+
{{ partialCached "main/footer.html" . }}
|
21 |
+
</main>
|
22 |
+
{{ partialCached "footer.html" . }}
|
23 |
+
|
24 |
+
{{ block "post" . }}{{ end }}
|
25 |
+
{{ "<!-- [background] baseof.html -->" | safeHTML }}
|
26 |
+
{{ partialCached "background.html" . }}
|
27 |
+
</body>
|
28 |
+
{{- end }}
|
29 |
+
</html>
|
30 |
+
|
31 |
+
{{- define "partials/background.html" -}}
|
32 |
+
<div id="background-body"
|
33 |
+
role="presentation">
|
34 |
+
<div id="grain" hidden></div>
|
35 |
+
<div id="dwclock" hidden>
|
36 |
+
<div id="min">
|
37 |
+
<div class="hand"></div>
|
38 |
+
</div>
|
39 |
+
<div id="hour">
|
40 |
+
<div class="hand"></div>
|
41 |
+
</div>
|
42 |
+
</div>
|
43 |
+
</div>
|
44 |
+
{{- end }}
|
layouts/_default/list.html
ADDED
@@ -0,0 +1,299 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{{- define "head" -}}
|
2 |
+
{{ "<!-- list.html [head] -->" | safeHTML }}
|
3 |
+
{{- $paginator := partial "partials/paginator.html" . }}
|
4 |
+
{{- $enableSlide := not site.Params.home.disableSlide }}
|
5 |
+
{{- $slides := where .Site.RegularPages "Type" "slide" }}
|
6 |
+
{{- if and .IsHome (not $paginator.HasPrev) $enableSlide $slides }}
|
7 |
+
<style>
|
8 |
+
body{margin: auto !important;max-width: 2560px !important}body > footer.pagewidth,body > header.pagewidth{padding: 0 calc(1.5rem + 1ex)}body > aside.carousel{position: sticky;position: -webkit-sticky;left: 0;float: left;/*border: var(--border);border-radius: 1ex;*/padding: 1rem;width: 38vw;height: var(--vbody)}body > main#home {height: var(--vbody);overflow-y: auto}body > main#home > aside#list-tags{top: 0;right:0;margin: 1rem auto;width: calc(100% - var(--golden-ratio));}#home #top{padding: 0 1rem}#home #list-posts{padding: 1rem;width: var(--golden-ratio)}div[role="feed"]{padding: 1ex;}.carousel .feed-item,#home .feed-item,hr.ldots{width: unset}#main-footer > .pagewidth {padding: 0 1ex}#duckduckgo,#i18n-menu > .on-plank,#more-menu > .on-plank,.pagefind-ui{margin-right: 1rem}#hasDuckDuckGo.pagewidth{padding-right: 1rem}#grain{display: none;}@media only screen and (max-width: 960px){body > footer,body > header{background: var(--bg)}body > aside.carousel{float: unset;margin: 0 1rem;padding: 1rem 0;width: unset}body > main#home{height: unset;overflow-y: unset}body > main#home > aside#list-tags{top: var(--vhead)}}@media only screen and (max-width: 640px){#main-footer > .pagewidth{padding: 0 calc(var(--void) / 2)}body > main#home > aside#list-tags{padding: unset;width: var(--canonic)}aside #list-posts .feed-item > section{flex-direction: row-reverse;aspect-ratio: 10/3}#home #list-posts{margin: var(--bigskip) auto;padding: unset;width: var(--canonic)}#list-posts .section-title{padding-left: unset}#duckduckgo,.pagefind-ui{margin-right: 1ex}}@media only screen and (max-width: 480px){aside #list-posts .feed-item > section{flex-direction: column;aspect-ratio: unset}}
|
9 |
+
</style>
|
10 |
+
{{- end }}
|
11 |
+
{{- end -}}
|
12 |
+
|
13 |
+
{{- define "aside" -}}
|
14 |
+
{{- $paginator := partial "partials/paginator.html" . }}
|
15 |
+
{{- $enableSlide := not site.Params.home.disableSlide }}
|
16 |
+
{{- if and .IsHome (not $paginator.HasPrev) $enableSlide}}
|
17 |
+
{{ partialCached "carousel.html" . }}
|
18 |
+
{{- end }}
|
19 |
+
{{- end -}}
|
20 |
+
|
21 |
+
{{- define "top" -}}
|
22 |
+
{{- $paginator := partial "partials/paginator.html" . }}
|
23 |
+
{{- $enableListing := not site.Params.home.disableListing }}
|
24 |
+
{{- if not $paginator.HasPrev }}
|
25 |
+
{{- if .IsHome }}
|
26 |
+
{{- if $enableListing}}
|
27 |
+
{{- if and site.Taxonomies.series site.Taxonomies.categories }}
|
28 |
+
<div id="list-taxonomy" class="carousel">
|
29 |
+
<div class="carousel__viewport">
|
30 |
+
{{ partial "listing.html" (dict "entry" "series") }}
|
31 |
+
{{ partial "listing.html" (dict "entry" "categories") }}
|
32 |
+
</div>
|
33 |
+
</div>
|
34 |
+
{{- else }}
|
35 |
+
{{ partial "listing.html" (dict "entry" "series") }}
|
36 |
+
{{ partial "listing.html" (dict "entry" "categories") }}
|
37 |
+
{{- end }}
|
38 |
+
{{- end }}
|
39 |
+
{{- with .Content }}
|
40 |
+
{{ partial "hero.html" $ }}
|
41 |
+
{{- end }}
|
42 |
+
{{- else }}
|
43 |
+
{{- if .IsSection }}
|
44 |
+
<div id="list-subsection" class="carousel">
|
45 |
+
{{ partial "list/sections.html" (dict "class" "carousel__viewport" "cover" true "page" .) }}
|
46 |
+
</div>
|
47 |
+
{{- end }}
|
48 |
+
{{- with .Content }}
|
49 |
+
{{ partial "hero.html" $ }}
|
50 |
+
{{- end }}
|
51 |
+
{{- end }}
|
52 |
+
{{- end }}
|
53 |
+
{{- end -}}
|
54 |
+
|
55 |
+
{{- define "main" -}}
|
56 |
+
{{- $paginator := partial "partials/paginator.html" . }}
|
57 |
+
{{- $firstPage := not $paginator.HasPrev }}
|
58 |
+
{{- /*
|
59 |
+
|
60 |
+
frequency for content view style */}}
|
61 |
+
{{- $changeFreq := or .Params.Sitemap.ChangeFreq .Sitemap.ChangeFreq | lower }}
|
62 |
+
{{- $active := eq $changeFreq (or "always" "hourly" "daily" "weekly") }}
|
63 |
+
{{- $passive := ne $changeFreq (or "always" "hourly" "daily" "weekly") }}
|
64 |
+
{{- /*
|
65 |
+
|
66 |
+
main aside */}}
|
67 |
+
{{- if and site.Taxonomies.tags $firstPage (ne .Kind "term") }}
|
68 |
+
{{- if .IsHome }}
|
69 |
+
<aside id="list-tags">
|
70 |
+
<header class="section-title">
|
71 |
+
<strong>{{ i18n "discover" }}</strong>
|
72 |
+
</header>
|
73 |
+
{{ partial "taxonomies.html" (dict "taxonomy" "tags" "class" "rounded has-hash" "limit" 16) }}
|
74 |
+
<nav>
|
75 |
+
<a class="underline" href="{{ "/tags/" | relLangURL }}">{{- i18n "seeMore" }}</a>
|
76 |
+
</nav>
|
77 |
+
</aside>
|
78 |
+
{{- else if or (eq .Data.Singular "tag") .IsSection }}
|
79 |
+
<aside id="list-tags">
|
80 |
+
<header class="section-title">
|
81 |
+
<strong>{{ i18n "tags" }}</strong>
|
82 |
+
</header>
|
83 |
+
{{ partial "taxonomies.html" (dict "taxonomy" "tags" "class" "rounded has-hash") }}
|
84 |
+
</aside>
|
85 |
+
{{- end }}
|
86 |
+
{{- end }}
|
87 |
+
{{/*
|
88 |
+
|
89 |
+
feed */}}
|
90 |
+
{{- if ne .Kind "taxonomy" }}
|
91 |
+
{{/*
|
92 |
+
|
93 |
+
if page don't have article */}}
|
94 |
+
{{- if eq (len $paginator.Pages) 0 }}
|
95 |
+
{{ template "no-content"}}
|
96 |
+
{{- else }}
|
97 |
+
<section id="list-posts" class="pagewidth">
|
98 |
+
<header {{ with .Data.Singular }}id="{{ . }}"{{ end }} class="section-title">
|
99 |
+
<strong>
|
100 |
+
{{- if .IsHome }}
|
101 |
+
{{- if $firstPage }}
|
102 |
+
{{ i18n "recent" $paginator.NumberOfElements }}
|
103 |
+
{{- else }}
|
104 |
+
{{ i18n "postsOn" $paginator.NumberOfElements }} {{ .Site.Title }}
|
105 |
+
{{ printf "- %s %d" (i18n "pages" 1) $paginator.PageNumber }}
|
106 |
+
{{- end }}
|
107 |
+
{{- else }}
|
108 |
+
{{- $title := .LinkTitle }}
|
109 |
+
{{- if eq (lower $title) (lower (i18n "posts" 1)) }}
|
110 |
+
{{- i18n "allPosts" }}
|
111 |
+
{{- if not $firstPage }}
|
112 |
+
{{- printf "- %s %d" (i18n "pages" 1) $paginator.PageNumber }}
|
113 |
+
{{- end }}
|
114 |
+
{{- else if eq (lower $title) (lower (i18n "articles" 1)) }}
|
115 |
+
{{- i18n "articles" }}
|
116 |
+
{{- else if eq .Data.Singular "author" }}
|
117 |
+
{{- i18n "postsBy" }}: {{- $title }}
|
118 |
+
{{- else }}
|
119 |
+
{{- i18n "postsOn" }}: <span class="{{ .Data.Singular }}">{{ $title }}</span>
|
120 |
+
{{- end }}
|
121 |
+
{{- end }}
|
122 |
+
</strong>
|
123 |
+
</header>
|
124 |
+
{{- /*
|
125 |
+
|
126 |
+
list post */}}
|
127 |
+
{{- $liViewCondition := or (and $active (not .IsHome)) (and (eq .Kind "term") (eq .Data.Plural "series") ) }}
|
128 |
+
{{- if $liViewCondition }}
|
129 |
+
{{ template "li" . }}
|
130 |
+
{{- else }}
|
131 |
+
<div role="feed" aria-busy="false">
|
132 |
+
{{- range $index, $page := $paginator.Pages }}
|
133 |
+
{{- $counter := add $index 1 }}
|
134 |
+
{{- $author := default site.Params.Author.name .Params.author }}
|
135 |
+
{{- $authors := .GetTerms "author" }}
|
136 |
+
{{- $categories := .GetTerms "categories" }}
|
137 |
+
{{- $desc := or .Params.Subtitle .Params.Description .Description .Summary }}
|
138 |
+
{{- $hasCover := partial "partials/page/cover.html" (dict "page" .) }}
|
139 |
+
{{- $alt := or .Params.Alt .Params.coverAlt .Params.imagesAlt }}
|
140 |
+
{{- if $index }}<hr class="ldots" role="presentation" aria-hidden="true">{{- end }}
|
141 |
+
{{ template "card" (dict "page" $page "paginator" $paginator "counter" $counter "desc" $desc "hasCover" $hasCover "alt" $alt "author" $author "authors" $authors) }}
|
142 |
+
{{- end }}
|
143 |
+
</div>
|
144 |
+
{{/*
|
145 |
+
|
146 |
+
paginator navigation */}}
|
147 |
+
{{- if or .Paginator.HasPrev .Paginator.HasNext }}
|
148 |
+
<hr class="hide">
|
149 |
+
{{- partial "nav.html" (dict "navID" "pagination" "page" .) }}
|
150 |
+
{{- end }}
|
151 |
+
{{- end }}
|
152 |
+
</section>
|
153 |
+
{{- end }}
|
154 |
+
{{- else }}
|
155 |
+
{{- if eq (index site.Taxonomies .Data.Plural | len) 0 }}
|
156 |
+
{{ template "no-content"}}
|
157 |
+
{{- else }}
|
158 |
+
{{- /*
|
159 |
+
|
160 |
+
taxonomy listing */}}
|
161 |
+
<section class="pagewidth">
|
162 |
+
{{- if eq .Data.Singular "tag" }}
|
163 |
+
{{ partial "listing.html" (dict "entry" "series") }}
|
164 |
+
{{ partial "listing.html" (dict "entry" "categories") }}
|
165 |
+
{{- else if eq .Data.Singular "category" }}
|
166 |
+
{{ partial "listing.html" (dict "entry" "categories") }}
|
167 |
+
{{- else if eq .Data.Singular "series" }}
|
168 |
+
{{ partial "listing.html" (dict "entry" "series") }}
|
169 |
+
{{- else if eq .Data.Singular "author" }}
|
170 |
+
{{ partial "listing.html" (dict "entry" "author") }}
|
171 |
+
{{- end }}
|
172 |
+
</section>
|
173 |
+
{{- end }}
|
174 |
+
{{- end }}
|
175 |
+
{{- end -}}
|
176 |
+
|
177 |
+
{{- define "li" -}}
|
178 |
+
{{- $descending := and (eq $.Kind "term") (eq $.Data.Plural "series")}}
|
179 |
+
{{- $yearGroup := .Data.Pages.GroupByDate "2006" }}
|
180 |
+
{{- if $descending }}
|
181 |
+
{{- $yearGroup = $yearGroup.Reverse }}
|
182 |
+
{{- end }}
|
183 |
+
{{- range $yearGroup }}
|
184 |
+
{{- $year := .Key }}
|
185 |
+
<div class="list-year {{ if $descending }}textwidth{{ end }}" role="listitem" aria-labelledby="{{ .Key }}">
|
186 |
+
<strong id="{{ $year }}" class="section-title" role="heading" aria-level="1">{{ $year }}</strong>
|
187 |
+
<div role="list" aria-label="{{ $year }}">
|
188 |
+
{{- $monthGroup := .Pages.GroupByDate "January" }}
|
189 |
+
{{- if $descending }}
|
190 |
+
{{ $monthGroup = $monthGroup.Reverse }}
|
191 |
+
{{ end }}
|
192 |
+
{{- range $monthGroup }}
|
193 |
+
{{- $month := .Key }}
|
194 |
+
{{- $postCounter := printf "(%d %s)" (len .Pages) (i18n "posts" (len .Pages)) }}
|
195 |
+
<div role="listitem" aria-labelledby="{{ print "y" $year "-" $month }}">
|
196 |
+
<details aria-expanded="true" class="list-month" open>
|
197 |
+
<summary class="has-post section-title" id="{{ print "y" $year "-" $month }}"
|
198 |
+
role="heading" aria-level="2" aria-description="{{ $postCounter }}">
|
199 |
+
{{- $month }}
|
200 |
+
</summary>
|
201 |
+
{{- $pageGroup := .Pages }}
|
202 |
+
{{- if $descending }}
|
203 |
+
{{- $pageGroup = $pageGroup.Reverse }}
|
204 |
+
{{- end }}
|
205 |
+
{{- with $pageGroup }}
|
206 |
+
<ul class="list-day" role="presentation">
|
207 |
+
{{- range . }}
|
208 |
+
{{- $date := .Date.Format "2 Jan " }}
|
209 |
+
<li>
|
210 |
+
<a class="has-pre" href="{{ .RelPermalink }}" aria-description="{{ $date }}">
|
211 |
+
<span>{{.Title}}</span>
|
212 |
+
</a>
|
213 |
+
</li>
|
214 |
+
{{- end }}
|
215 |
+
</ul>
|
216 |
+
{{- end }}
|
217 |
+
</details>
|
218 |
+
</div>
|
219 |
+
{{- end }}
|
220 |
+
</div>
|
221 |
+
</div>
|
222 |
+
{{- end }}
|
223 |
+
{{- end -}}
|
224 |
+
|
225 |
+
{{- define "card" -}}
|
226 |
+
<article class="feed-item"
|
227 |
+
aria-posinset="{{ .counter }}"
|
228 |
+
aria-setsize="{{ .paginator.NumberOfElements }}"
|
229 |
+
aria-labelledby="{{ printf "title-%d" .counter }}"
|
230 |
+
aria-describedby="{{ printf "desc-%d" .counter }}">
|
231 |
+
<hgroup>
|
232 |
+
<div>
|
233 |
+
<span>
|
234 |
+
{{- if .authors }}
|
235 |
+
{{- if eq (len .authors) 1 }}
|
236 |
+
{{- range .authors }}
|
237 |
+
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
|
238 |
+
{{- end }}
|
239 |
+
{{- else }}
|
240 |
+
{{ partial "terms.html" (dict "taxonomy" "author" "class" "delimiter" "page" .page) }}
|
241 |
+
{{- end }}
|
242 |
+
{{- else }}
|
243 |
+
{{- with .author }}<span>{{ . }}</span>{{ end }}
|
244 |
+
{{- end }}
|
245 |
+
{{- if .page.Params.categories }}
|
246 |
+
<span>{{ i18n "in" | lower }}</span>
|
247 |
+
{{- if eq (len .page.Params.categories) 1 }}
|
248 |
+
{{ partial "terms.html" (dict "taxonomy" "categories" "class" "inline" "page" .page ) }}
|
249 |
+
{{ else }}
|
250 |
+
{{ partial "terms.html" (dict "taxonomy" "categories" "class" "delimiter" "page" .page ) }}
|
251 |
+
{{- end }}
|
252 |
+
{{- end }}
|
253 |
+
</span>
|
254 |
+
<!-- hfill -->
|
255 |
+
{{ partial "page/timestamp.html" .page }}
|
256 |
+
</div>
|
257 |
+
<h1 id="{{ printf "title-%d" .counter }}">{{ .page.Title }}</h1>
|
258 |
+
</hgroup>
|
259 |
+
<a class="underline" href="{{ .page.RelPermalink }}" aria-label="{{ .page.Title }}"></a>
|
260 |
+
{{ $useFlowlines := site.Params.Feed.Flowlines }}
|
261 |
+
<section {{ if or .hasCover $useFlowlines }}class="has-cover"{{ end }}>
|
262 |
+
{{- if .hasCover }}
|
263 |
+
<img src={{ .hasCover }} alt="{{ if .alt }}{{ . }}{{ else }}{{ i18n "featuredImg"}}: .page.Title{{ end }}" loading="lazy">
|
264 |
+
{{- else if $useFlowlines }}
|
265 |
+
{{- $src := partial "partials/flowlines.html" . }}
|
266 |
+
{{- $pseudoRandomPos := printf "object-position: %d%% %d%%" (index (seq 81 | shuffle) 11) (index (seq 80 | shuffle) 12) }}
|
267 |
+
<img class="flowlines" src="{{ $src }}" alt="" style="{{ $pseudoRandomPos }}" loading="lazy">
|
268 |
+
{{- end }}
|
269 |
+
<div class="par" id="{{ printf "desc-%d" .counter }}">
|
270 |
+
{{- plainify .desc }}
|
271 |
+
</div>
|
272 |
+
</section>
|
273 |
+
<footer>
|
274 |
+
<span class="readingTime">
|
275 |
+
{{- printf "%d %s" .page.ReadingTime (i18n "readingTime" .page.ReadingTime | lower ) }}
|
276 |
+
</span>
|
277 |
+
<!-- hfill -->
|
278 |
+
{{- if .page.Params.tags }}
|
279 |
+
{{ partial "terms.html" (dict "taxonomy" "tags" "class" "rounded invert ldots" "page" .page) }}
|
280 |
+
{{- else }}
|
281 |
+
<div class="baselineskip" role="presentation"></div>
|
282 |
+
{{- end }}
|
283 |
+
</footer>
|
284 |
+
</article>
|
285 |
+
{{- end -}}
|
286 |
+
|
287 |
+
{{- define "no-content" -}}
|
288 |
+
<div style="display: flex; height: var(--vbody);">
|
289 |
+
<div class="hero" style="margin: auto; width: var(--canonic);">
|
290 |
+
<div class="hero__image">
|
291 |
+
<img src="https://i.pinimg.com/736x/bf/34/76/bf3476c1569c5af162779ecbb4134c3a.jpg" alt="Not today, maybe tomorow..." decoding="async">
|
292 |
+
</div>
|
293 |
+
<div class="hero__content">
|
294 |
+
<h1 style="font-style: normal;">{{ i18n "noArticle" }}</h1>
|
295 |
+
<p>{{ i18n "noArticlePost" }}</p>
|
296 |
+
</div>
|
297 |
+
</div>
|
298 |
+
</div>
|
299 |
+
{{- end -}}
|
layouts/_default/rss.xml
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!-- internal template -->
|
2 |
+
{{- /* Deprecate site.Author.email in favor of site.Params.author.email */}}
|
3 |
+
{{- $authorEmail := "" }}
|
4 |
+
{{- with site.Params.author }}
|
5 |
+
{{- if reflect.IsMap . }}
|
6 |
+
{{- with .email }}
|
7 |
+
{{- $authorEmail = . }}
|
8 |
+
{{- end }}
|
9 |
+
{{- end }}
|
10 |
+
{{- else }}
|
11 |
+
{{- with site.Author.email }}
|
12 |
+
{{- $authorEmail = . }}
|
13 |
+
{{- warnf "The author key in site configuration is deprecated. Use params.author.email instead." }}
|
14 |
+
{{- end }}
|
15 |
+
{{- end }}
|
16 |
+
|
17 |
+
{{- /* Deprecate site.Author.name in favor of site.Params.author.name */}}
|
18 |
+
{{- $authorName := "" }}
|
19 |
+
{{- with site.Params.author }}
|
20 |
+
{{- if reflect.IsMap . }}
|
21 |
+
{{- with .name }}
|
22 |
+
{{- $authorName = . }}
|
23 |
+
{{- end }}
|
24 |
+
{{- else }}
|
25 |
+
{{- $authorName = . }}
|
26 |
+
{{- end }}
|
27 |
+
{{- else }}
|
28 |
+
{{- with site.Author.name }}
|
29 |
+
{{- $authorName = . }}
|
30 |
+
{{- warnf "The author key in site configuration is deprecated. Use params.author.name instead." }}
|
31 |
+
{{- end }}
|
32 |
+
{{- end }}
|
33 |
+
|
34 |
+
{{- $desc := or .Params.Subtitle .Params.Description .Description .Summary }}
|
35 |
+
|
36 |
+
{{- $pctx := . }}
|
37 |
+
{{- if .IsHome }}{{ $pctx = site }}{{ end }}
|
38 |
+
{{- $pages := slice }}
|
39 |
+
{{- if or $.IsHome $.IsSection }}
|
40 |
+
{{- $pages = where $pctx.RegularPages "Type" (or "post" "articles") }}
|
41 |
+
{{- else }}
|
42 |
+
{{- $pages = $pctx.Pages }}
|
43 |
+
{{- end }}
|
44 |
+
{{- $limit := site.Config.Services.RSS.Limit }}
|
45 |
+
{{- if ge $limit 1 }}
|
46 |
+
{{- $pages = $pages | first $limit }}
|
47 |
+
{{- end }}
|
48 |
+
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
49 |
+
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
50 |
+
<channel>
|
51 |
+
<title>{{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ site.Title }}{{ end }}</title>
|
52 |
+
<link>{{ .Permalink }}</link>
|
53 |
+
<description>{{ i18n "recent"}} {{ if ne .Title site.Title }}{{ with .Title }}{{ i18n "in" | lower}} {{ . }} {{ end }}{{ end }}{{ i18n "on" | lower }} {{ site.Title }}</description>
|
54 |
+
<generator>Hugo {{ hugo.Version }}</generator>
|
55 |
+
<language>{{ site.Language.LanguageCode }}</language>
|
56 |
+
{{ with $authorName -}}
|
57 |
+
<managingEditor>{{ . }}</managingEditor>
|
58 |
+
{{ end -}}
|
59 |
+
{{ with $authorName }}
|
60 |
+
<webMaster>{{ . }}</webMaster>
|
61 |
+
{{ end -}}
|
62 |
+
{{ with site.Copyright -}}
|
63 |
+
<copyright>{{ . }}</copyright>
|
64 |
+
{{ end -}}
|
65 |
+
<lastBuildDate>{{ now.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>
|
66 |
+
{{ with .OutputFormats.Get "RSS" -}}
|
67 |
+
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML -}}
|
68 |
+
{{ end -}}
|
69 |
+
{{- range $pages }}
|
70 |
+
<item>
|
71 |
+
<title>{{ .Title }}</title>
|
72 |
+
<link>{{ .Permalink }}</link>
|
73 |
+
<pubDate>{{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
74 |
+
{{ with $authorName -}}
|
75 |
+
<author>{{ . }}</author>
|
76 |
+
{{ end -}}
|
77 |
+
<guid>{{ .Permalink }}</guid>
|
78 |
+
<description>{{ $desc | transform.XMLEscape | safeHTML }}</description>
|
79 |
+
{{- $cover := partial "partials/page/cover.html" (dict "page" .) }}
|
80 |
+
{{ with $cover -}}
|
81 |
+
<enclosure url="{{ . }}" length="0" type="image/jpeg" />
|
82 |
+
{{- end }}
|
83 |
+
</item>
|
84 |
+
{{- end }}
|
85 |
+
</channel>
|
86 |
+
</rss>
|
layouts/_default/single.html
ADDED
@@ -0,0 +1,149 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{{- define "head" }}
|
2 |
+
{{- $instance := partial "partials/fediverse/instance.html" . }}
|
3 |
+
{{- $username := partial "partials/fediverse/username.html" .}}
|
4 |
+
{{ if and $instance $username }}
|
5 |
+
<meta name="fediverse:creator" content="{{ print "@" $username "@" $instance }}">
|
6 |
+
{{ end }}
|
7 |
+
{{- /*
|
8 |
+
|
9 |
+
MathML render engine */}}
|
10 |
+
{{- if or .Params.Math site.Params.Math }}
|
11 |
+
{{ partialCached "head/js/katex.html" . }}
|
12 |
+
{{- else if or .Params.MathJax site.Params.MathJax }}
|
13 |
+
{{ partialCached "head/js/mathjax.html" . }}
|
14 |
+
{{- end }}
|
15 |
+
{{- /*
|
16 |
+
|
17 |
+
Verbatim Style */}}
|
18 |
+
{{- with findRE `class="chroma"` .Content 1 }}
|
19 |
+
{{ partialCached "head/css/verbatim.html" $ }}
|
20 |
+
{{- end }}
|
21 |
+
{{- /*
|
22 |
+
|
23 |
+
use Highlight.js */}}
|
24 |
+
{{- if .Params.Hljs -}}
|
25 |
+
{{ partialCached "head/css/verbatim.html" . }}
|
26 |
+
{{ partialCached "head/js/hljs.html" . }}
|
27 |
+
{{- end }}
|
28 |
+
{{- /*
|
29 |
+
|
30 |
+
QRCode */}}
|
31 |
+
{{/* {{ partialCached "head/js/qrcode.html" . }} */}}
|
32 |
+
{{- end }}
|
33 |
+
|
34 |
+
{{- define "main" }}
|
35 |
+
{{- $commentIsEnable := not site.Params.comments.disabled}}
|
36 |
+
{{- $commentUrl := or .Params.toot .Params.comment }}
|
37 |
+
{{- $instance := partial "partials/fediverse/instance.html" . }}
|
38 |
+
{{- $username := partial "partials/fediverse/username.html" . }}
|
39 |
+
{{- $post := partial "partials/fediverse/post.html" . }}
|
40 |
+
{{- $commentIsToot := false }}
|
41 |
+
{{- $avatar := false }}
|
42 |
+
{{- $displayName := false }}
|
43 |
+
{{- if and $commentIsEnable $instance $username $post }}
|
44 |
+
{{- $api := print "https://" $instance "/api/v1/statuses/" $post }}
|
45 |
+
{{- with resources.GetRemote $api }}
|
46 |
+
{{- $data := . | transform.Unmarshal }}
|
47 |
+
{{- $commentIsToot = $data.content }}
|
48 |
+
{{- $commentUrl = $data.url }}
|
49 |
+
{{- $avatar = $data.account.avatar }}
|
50 |
+
{{- $displayName = $data.account.display_name }}
|
51 |
+
{{- end }}
|
52 |
+
{{- end }}
|
53 |
+
|
54 |
+
<article id="main-article" class="pagewidth"
|
55 |
+
role="document" aria-labelledby="title"
|
56 |
+
{{- if ne (lower .Params.type) (or "post" "articles") }}
|
57 |
+
data-pagefind-ignore="all"
|
58 |
+
{{- else }}
|
59 |
+
data-pagefind-body
|
60 |
+
{{- end }}>
|
61 |
+
<header class="textwidth" aria-labelledby="title">
|
62 |
+
{{ partial "page/title.html" . }}
|
63 |
+
<div id="doc-author" class="textsw author">
|
64 |
+
{{- $author := cond .Params.author .Params.author site.Params.Author.name }}
|
65 |
+
{{- $authors := .GetTerms "author" }}
|
66 |
+
{{- $notMultiAuthor := eq (len $authors) 1 }}
|
67 |
+
{{- if $authors }}
|
68 |
+
{{- if $notMultiAuthor }}
|
69 |
+
{{- range $authors }}
|
70 |
+
{{ $flair := .Params.flair }}
|
71 |
+
{{- if and $commentIsEnable $commentIsToot }}
|
72 |
+
<a id="avatar" href="{{ print "https://" $instance "/@" $username }}" aria-label="{{ $displayName }}">
|
73 |
+
<img src="{{ $avatar }}" alt="{{ $displayName }}"/>
|
74 |
+
</a>
|
75 |
+
{{- else if $flair }}
|
76 |
+
{{- $displayPicture := partial "partials/page/cover.html" (dict "page" .) }}
|
77 |
+
<a id="avatar" href="{{ .Permalink }}" aria-label="{{ .LinkTitle }}">
|
78 |
+
<img src="{{ $displayPicture }}" alt="{{ .LinkTitle }}"/>
|
79 |
+
</a>
|
80 |
+
{{- end }}
|
81 |
+
<a href="{{ .Permalink }}"
|
82 |
+
{{- if and $commentIsEnable $commentIsToot }}
|
83 |
+
class="has-aria-label"
|
84 |
+
aria-label="{{ print "@" $username "@" $instance}}"
|
85 |
+
{{- else if $flair }}
|
86 |
+
class="has-aria-label"
|
87 |
+
aria-label="{{ $flair }}"
|
88 |
+
{{- end }}>
|
89 |
+
{{- .LinkTitle -}}
|
90 |
+
</a>
|
91 |
+
{{- end }}
|
92 |
+
{{- else }}
|
93 |
+
{{ partial "terms.html" (dict "taxonomy" "author" "class" "delimiter" "page" .) }}
|
94 |
+
{{- end }}
|
95 |
+
{{- else if $author -}}
|
96 |
+
<span>{{ $author }}</span>
|
97 |
+
{{- end }}
|
98 |
+
</div>
|
99 |
+
{{ partial "page/timestamp.html" . }}
|
100 |
+
</header>
|
101 |
+
{{- with .Params.toc }}
|
102 |
+
{{ partial "nav.html" (dict "navID" "TableOfContents" "page" $) }}
|
103 |
+
{{- end }}
|
104 |
+
{{ partial "page/audio.html" . }}
|
105 |
+
<section aria-labelledby="Title" id="content" data-bionRead-safe {{- with .Params.secnum }} class="secnum"{{- end }}>
|
106 |
+
{{- if or .Params.task site.Params.Post.enableCheckbox }}
|
107 |
+
{{ replace .Content "disabled=" "" | safeHTML }}
|
108 |
+
{{- else }}
|
109 |
+
{{ .Content }}
|
110 |
+
{{- end }}
|
111 |
+
</section>
|
112 |
+
<footer>
|
113 |
+
{{ partial "post/tagged.html" . }}
|
114 |
+
</footer>
|
115 |
+
</article>
|
116 |
+
<hr class="hide" style="margin: 1in 0;">
|
117 |
+
<div id="contentinfo" class="pagewidth" role="contentinfo" data-pagefind-ignore="all">
|
118 |
+
{{- if or .Params.related site.Params.posts.related }}
|
119 |
+
{{ partial "post/related.html" . }}
|
120 |
+
{{- end }}
|
121 |
+
{{- if not site.Params.posts.disableHistory }}
|
122 |
+
{{ partial "post/history.html" . }}
|
123 |
+
{{- end }}
|
124 |
+
{{- if or .Params.colophon site.Params.posts.colophon }}
|
125 |
+
{{ partial "post/colophon.html" . }}
|
126 |
+
{{- end }}
|
127 |
+
{{ partial "post/contribute.html" . }}
|
128 |
+
{{- if site.Params.posts.share }}
|
129 |
+
{{ partial "nav.html" (dict "navID" "share" "page" .) }}
|
130 |
+
{{- end }}
|
131 |
+
{{- if $commentIsEnable }}
|
132 |
+
{{- if $commentIsToot }}
|
133 |
+
{{ partial "fediverse.html" (dict "instance" $instance "user" $username "post" $post "tootContent" $commentIsToot "commentUrl" $commentUrl) }}
|
134 |
+
{{- end }}
|
135 |
+
{{- end }}
|
136 |
+
</div>
|
137 |
+
{{- end }}
|
138 |
+
|
139 |
+
{{- define "post" }}
|
140 |
+
{{ "<!-- [post] single.html -->" | safeHTML }}
|
141 |
+
{{- /* display color palette for pages with code blocks */}}
|
142 |
+
{{- with findRE `class="chroma"` .Content 1 -}}
|
143 |
+
<script>document.getElementById('setColorPalette').setAttribute('style', 'display:flex;');</script>
|
144 |
+
{{- end }}
|
145 |
+
{{- /*
|
146 |
+
|
147 |
+
bionRead Snapshot */}}
|
148 |
+
<div id="bionReadSnapshot" hidden></div>
|
149 |
+
{{- end }}
|
layouts/_default/sitemap.xml
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!-- internal template -->
|
2 |
+
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
3 |
+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
4 |
+
{{- range where (where .Pages ".Params.Headless" "ne" true ) "Sitemap.Disable" "ne" true -}}
|
5 |
+
{{- if .Permalink }}
|
6 |
+
<url>
|
7 |
+
<loc>{{ .Permalink }}</loc>
|
8 |
+
{{ if not .Lastmod.IsZero -}}
|
9 |
+
{{- $ISO8601 := "2006-01-02T15:04:05-07:00" -}}
|
10 |
+
<lastmod>
|
11 |
+
{{- .Lastmod.Format $ISO8601 | safeHTML -}}
|
12 |
+
</lastmod>
|
13 |
+
{{- end }}
|
14 |
+
{{ with .Sitemap.ChangeFreq -}}
|
15 |
+
<changefreq>{{ . }}</changefreq>
|
16 |
+
{{ end -}}
|
17 |
+
{{ if ge .Sitemap.Priority 0.0 -}}
|
18 |
+
<priority>{{ .Sitemap.Priority }}</priority>
|
19 |
+
{{ end -}}
|
20 |
+
{{ if .IsTranslated -}}
|
21 |
+
{{- range .Translations -}}
|
22 |
+
<xhtml:link rel="alternate" hreflang="{{ .Language.LanguageCode }}" href="{{ .Permalink }}" />
|
23 |
+
{{- end }}
|
24 |
+
<xhtml:link rel="alternate" hreflang="{{ .Language.LanguageCode }}" href="{{ .Permalink }}" />
|
25 |
+
{{ end -}}
|
26 |
+
</url>
|
27 |
+
{{- end }}
|
28 |
+
{{- end }}
|
29 |
+
</urlset>
|
layouts/partials/_funcs/get-page-images.html
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{{- $imgs := slice }}
|
2 |
+
{{- $imgParams := .Params.images }}
|
3 |
+
{{- $resources := .Resources.ByType "image" -}}
|
4 |
+
{{/* Find featured image resources if the images parameter is empty. */}}
|
5 |
+
{{- if not $imgParams }}
|
6 |
+
{{- $featured := $resources.GetMatch "*feature*" -}}
|
7 |
+
{{- if not $featured }}{{ $featured = $resources.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
|
8 |
+
{{- with $featured }}
|
9 |
+
{{- $imgs = $imgs | append (dict
|
10 |
+
"Image" .
|
11 |
+
"RelPermalink" .RelPermalink
|
12 |
+
"Permalink" .Permalink) }}
|
13 |
+
{{- end }}
|
14 |
+
{{- end }}
|
15 |
+
{{/* Use the first one of site images as the fallback. */}}
|
16 |
+
{{- if and (not $imgParams) (not $imgs) }}
|
17 |
+
{{- with site.Params.images }}
|
18 |
+
{{- $imgParams = first 1 . }}
|
19 |
+
{{- end }}
|
20 |
+
{{- end }}
|
21 |
+
{{/* Parse page's images parameter. */}}
|
22 |
+
{{- range $imgParams }}
|
23 |
+
{{- $img := . }}
|
24 |
+
{{- $url := urls.Parse $img }}
|
25 |
+
{{- if eq $url.Scheme "" }}
|
26 |
+
{{/* Internal image. */}}
|
27 |
+
{{- with $resources.GetMatch $img -}}
|
28 |
+
{{/* Image resource. */}}
|
29 |
+
{{- $imgs = $imgs | append (dict
|
30 |
+
"Image" .
|
31 |
+
"RelPermalink" .RelPermalink
|
32 |
+
"Permalink" .Permalink) }}
|
33 |
+
{{- else }}
|
34 |
+
{{- $imgs = $imgs | append (dict
|
35 |
+
"RelPermalink" (relURL $img)
|
36 |
+
"Permalink" (absURL $img)
|
37 |
+
) }}
|
38 |
+
{{- end }}
|
39 |
+
{{- else }}
|
40 |
+
{{/* External image */}}
|
41 |
+
{{- $imgs = $imgs | append (dict
|
42 |
+
"RelPermalink" $img
|
43 |
+
"Permalink" $img
|
44 |
+
) }}
|
45 |
+
{{- end }}
|
46 |
+
{{- end }}
|
47 |
+
{{- return $imgs }}
|
layouts/partials/a11y.html
ADDED
@@ -0,0 +1,189 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{{ "<!-- a11y.html -->" | safeHTML -}}
|
2 |
+
<details id="has-a11y" class="presentation js-details" name="on-deck" aria-haspopup="true" aria-labelledby="has-a11y-summary">
|
3 |
+
<summary id="has-a11y-summary" accesskey="a" aria-keyshortcuts="a">
|
4 |
+
<span> {{ i18n "accessibility" }}</span>
|
5 |
+
<kbd class="key">a</kbd>
|
6 |
+
</summary>
|
7 |
+
{{ "<!-- a11y console -->" | safeHTML }}
|
8 |
+
<fieldset id="a11y" role="region" disabled>
|
9 |
+
{{ "<!-- brightness & contrast -->" | safeHTML }}
|
10 |
+
<div id="setColorScheme" role="group" aria-label="{{ i18n "colorSettings" }}">
|
11 |
+
{{ partialCached "a11y/darkMode.html" . }}
|
12 |
+
{{ partialCached "a11y/contrast.html" . }}
|
13 |
+
</div>
|
14 |
+
{{ partialCached "a11y/colorPalette.html" . }}
|
15 |
+
{{ partialCached "a11y/fontsize.html" . }}
|
16 |
+
{{ partialCached "a11y/baselineStretch.html" . }}
|
17 |
+
{{ partialCached "a11y/OpenDyslexic.html" . }}
|
18 |
+
{{ partialCached "a11y/menu.html" . }}
|
19 |
+
<noscript>
|
20 |
+
<center id="noScript" role="alert">{{ i18n "noScript" }}</center>
|
21 |
+
</noscript>
|
22 |
+
<center id="noLocalStorage" class="hide" role="alert">{{ i18n "noLocalStorage" }}</center>
|
23 |
+
</fieldset>
|
24 |
+
<div class="screening js-cpn" role="presentation" aria-hidden="true"></div>
|
25 |
+
</details>
|
26 |
+
|
27 |
+
{{/*----------------------- end of a11y.html ------------------------*/}}
|
28 |
+
|
29 |
+
{{- define "partials/a11y/darkMode.html" -}}
|
30 |
+
{{ "<!-- darkMode.html -->" | safeHTML }}
|
31 |
+
<input
|
32 |
+
id="lightSwitch"
|
33 |
+
type="checkbox"
|
34 |
+
onclick="setColor()"
|
35 |
+
aria-label="{{ i18n "darkMode" }}"
|
36 |
+
>
|
37 |
+
<label for="lightSwitch">
|
38 |
+
<div class="has-aria-label off" role="status" aria-label="{{ i18n "light" }}"></div>
|
39 |
+
<div class="has-aria-label on" role="status" aria-label="{{ i18n "dark" }}"></div>
|
40 |
+
<div id="lightSwitchIndicator" aria-hidden="true"></div>
|
41 |
+
</label>
|
42 |
+
{{- end }}
|
43 |
+
|
44 |
+
{{- define "partials/a11y/contrast.html" -}}
|
45 |
+
{{ "<!-- contrast.html -->" | safeHTML }}
|
46 |
+
<fieldset id="setContrast">
|
47 |
+
<legend>{{ i18n "contrast" }}</legend>
|
48 |
+
<input
|
49 |
+
id="lessContrast"
|
50 |
+
type="radio" name="setContrast" value="less"
|
51 |
+
onclick="setColor()"
|
52 |
+
>
|
53 |
+
<label for="lessContrast">
|
54 |
+
<span>{{ i18n "lessContrast" }}</span>
|
55 |
+
</label>
|
56 |
+
<input
|
57 |
+
id="defaultContrast"
|
58 |
+
type="radio" name="setContrast" value="default"
|
59 |
+
onclick="setColor()"
|
60 |
+
>
|
61 |
+
<label for="defaultContrast">
|
62 |
+
<span>{{ i18n "defaultContrast" }}</span>
|
63 |
+
</label>
|
64 |
+
<input
|
65 |
+
id="moreContrast"
|
66 |
+
type="radio" name="setContrast" value="more"
|
67 |
+
onclick="setColor()"
|
68 |
+
>
|
69 |
+
<label for="moreContrast">
|
70 |
+
<span>{{ i18n "moreContrast" }}</span>
|
71 |
+
</label>
|
72 |
+
</fieldset>
|
73 |
+
{{- end }}
|
74 |
+
|
75 |
+
{{- define "partials/a11y/colorPalette.html" -}}
|
76 |
+
{{ "<!-- colorPalette.html -->" | safeHTML }}
|
77 |
+
<div id="setColorPalette" style="display:none;">
|
78 |
+
<label for="colorPalette">{{ i18n "colorPalette" }}</label>
|
79 |
+
<select id="colorPalette" name="colorPalette" oninput="setColorPalette()">
|
80 |
+
<option value="defaultColor">{{ i18n "defaultColor" }}</option>
|
81 |
+
<option value="deuteranopia">{{ i18n "deuteranopia" }}</option>
|
82 |
+
<option value="protanopia">{{ i18n "protanopia" }}</option>
|
83 |
+
<option value="tritanopia">{{ i18n "tritanopia" }}</option>
|
84 |
+
<option value="monochrome">{{ i18n "monochrome" }}</option>
|
85 |
+
</select>
|
86 |
+
</div>
|
87 |
+
{{- end }}
|
88 |
+
|
89 |
+
{{- define "partials/a11y/fontsize.html" -}}
|
90 |
+
{{ "<!-- fontsize.html -->" | safeHTML }}
|
91 |
+
<div class="has-aria-label-top" aria-label="{{ i18n "fontSize" }}">
|
92 |
+
<label class="range" for="fontSize" aria-label="{{ i18n "fontSize" }}">
|
93 |
+
<input
|
94 |
+
id="fontSize"
|
95 |
+
type="range" min="8" max="12" step="0.5"
|
96 |
+
oninput="setFontSize()">
|
97 |
+
<output
|
98 |
+
id="fontSizeState"
|
99 |
+
onclick="resetFontSize()"
|
100 |
+
aria-live="polite"
|
101 |
+
>10</output>
|
102 |
+
</label>
|
103 |
+
</div>
|
104 |
+
{{- end }}
|
105 |
+
|
106 |
+
{{- define "partials/a11y/baselineStretch.html" -}}
|
107 |
+
{{ "<!-- baselineStretch.html -->" | safeHTML }}
|
108 |
+
<div id="setBaselineStretch" class="has-aria-label-top" aria-label="{{ i18n "baselineStretch" }}">
|
109 |
+
<label class="range" for="baselineStretch">
|
110 |
+
<input
|
111 |
+
id="baselineStretch"
|
112 |
+
type="range" min="0.8" max="1.2" step="0.05"
|
113 |
+
oninput="setStretch()"
|
114 |
+
>
|
115 |
+
<output
|
116 |
+
id="baselineStretchState"
|
117 |
+
onclick="resetStretch()"
|
118 |
+
aria-live="polite"
|
119 |
+
>1</output>
|
120 |
+
</label>
|
121 |
+
</div>
|
122 |
+
{{- end }}
|
123 |
+
|
124 |
+
{{- define "partials/a11y/OpenDyslexic.html" -}}
|
125 |
+
{{ "<!-- OpenDyslexic.html -->" | safeHTML }}
|
126 |
+
<div id="setOpenDyslexic">
|
127 |
+
<input
|
128 |
+
id="OpenDyslexic"
|
129 |
+
type="checkbox"
|
130 |
+
onclick="useOpenDyslexic()"
|
131 |
+
aria-label="{{ i18n "OpenDyslexic" }}"
|
132 |
+
>
|
133 |
+
<label
|
134 |
+
class="has-aria-label-top"
|
135 |
+
for="OpenDyslexic"
|
136 |
+
aria-label="{{ i18n "OpenDyslexic" }}"
|
137 |
+
>
|
138 |
+
<span id="OpenDyslexicState" aria-hidden="true">
|
139 |
+
<span id="OpenDyslexicIndicator"></span>
|
140 |
+
</span>
|
141 |
+
</label>
|
142 |
+
</div>
|
143 |
+
{{- end }}
|
144 |
+
|
145 |
+
{{- define "partials/a11y/menu.html" -}}
|
146 |
+
{{ "<!-- menu.html -->" | safeHTML }}
|
147 |
+
<menu
|
148 |
+
id="a11y-menu"
|
149 |
+
class="hide"
|
150 |
+
role="toolbar"
|
151 |
+
aria-label="{{ i18n "menuControls" }}"
|
152 |
+
>
|
153 |
+
<button
|
154 |
+
id="saveButton" class="reverse"
|
155 |
+
onclick="saveA11y()"
|
156 |
+
disabled>
|
157 |
+
{{- i18n "save" }}
|
158 |
+
</button>
|
159 |
+
<button
|
160 |
+
id="resetButton" class="has-aria-label"
|
161 |
+
onclick="resetA11y()"
|
162 |
+
aria-label="{{ i18n "reset" }}"
|
163 |
+
disabled>
|
164 |
+
</button>
|
165 |
+
<button
|
166 |
+
id="closeButton" class="has-aria-label"
|
167 |
+
onclick="closeA11yConsole()"
|
168 |
+
aria-label="{{ i18n "close" }}"
|
169 |
+
>
|
170 |
+
</button>
|
171 |
+
</menu>
|
172 |
+
{{- end }}
|
173 |
+
|
174 |
+
{{- define "partials/a11y/bionread.html" -}}
|
175 |
+
{{ "<!-- bionread.html -->" | safeHTML }}
|
176 |
+
<div id="useBionRead" class="hide">
|
177 |
+
<input
|
178 |
+
id="bionReadSwitch"
|
179 |
+
accesskey="b" type="checkbox"
|
180 |
+
onclick="bionRead()"
|
181 |
+
aria-keyshortcuts="b"
|
182 |
+
aria-label="{{ i18n "bionRead" }}"
|
183 |
+
>
|
184 |
+
<label id="bionReadButton" for="bionReadSwitch">
|
185 |
+
<span><strong>Bion</strong>Read</span>
|
186 |
+
<kbd class="key">b</kbd>
|
187 |
+
</label>
|
188 |
+
</div>
|
189 |
+
{{- end }}
|
layouts/partials/bundles/branch.html
ADDED
@@ -0,0 +1,223 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{{- define "partials/taxonomies.html" -}}
|
2 |
+
{{ "<!-- taxonomies.html -->" | safeHTML }}
|
3 |
+
{{- $taxonomy := .taxonomy }}
|
4 |
+
{{- $tags := eq $taxonomy "tags"}}
|
5 |
+
{{- $class := .class }}
|
6 |
+
{{- $cover := .cover }}
|
7 |
+
{{- $limit := .limit }}
|
8 |
+
{{- with index site.Taxonomies $taxonomy }}
|
9 |
+
<ul class="{{ $class }}" role="presentation">
|
10 |
+
{{- $index := 0 }}
|
11 |
+
{{ range . -}}
|
12 |
+
{{- $index = add $index 1 }}
|
13 |
+
{{- if or (le $index $limit) (not $limit) -}}
|
14 |
+
{{- $src := partial "partials/page/cover.html" (dict "page" .Page) }}
|
15 |
+
{{- if not $src}}
|
16 |
+
{{- $src = partial "partials/flowlines.html" . }}
|
17 |
+
{{- end }}
|
18 |
+
<li {{ if $cover }}style="background-image:url({{ $src }});"{{ end }}>
|
19 |
+
<a href="{{ .Page.Permalink }}"
|
20 |
+
aria-label="{{ i18n $taxonomy 1 }}:{{ .Page.Title }}"
|
21 |
+
data-post-counter="{{ printf "%d" .Count }}"
|
22 |
+
>
|
23 |
+
<span>{{ humanize .Page.Title | title }}</span>
|
24 |
+
</a>
|
25 |
+
{{- /* workaround needed */}}
|
26 |
+
{{- /* {{- if eq $taxonomy "categories" }}
|
27 |
+
<ul role="presentation">
|
28 |
+
{{ $postWithin := where site.RegularPages "Params.categories" "intersect" .Page.Title }}
|
29 |
+
{{- range first 5 $postWithin }}
|
30 |
+
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
|
31 |
+
{{- end }}
|
32 |
+
</ul>
|
33 |
+
{{- end }} */}}
|
34 |
+
</li>
|
35 |
+
{{- end }}
|
36 |
+
{{- end }}
|
37 |
+
</ul>
|
38 |
+
{{- end }}
|
39 |
+
{{- end }}
|
40 |
+
|
41 |
+
{{- define "partials/terms.html" -}}
|
42 |
+
{{ "<!-- terms.html -->" | safeHTML }}
|
43 |
+
{{- $page := .page }}
|
44 |
+
{{- $taxonomy := .taxonomy }}
|
45 |
+
{{- $class := .class }}
|
46 |
+
{{- with $page.GetTerms $taxonomy }}
|
47 |
+
<ul class="{{ $class }}" role="presentation">
|
48 |
+
{{- range . }}
|
49 |
+
<li><a href="{{ .RelPermalink }}">{{ humanize .LinkTitle | title }}</a></li>
|
50 |
+
{{- end }}
|
51 |
+
</ul>
|
52 |
+
{{- end }}
|
53 |
+
{{- end }}
|
54 |
+
|
55 |
+
{{- define "partials/paginator.html" -}}
|
56 |
+
{{ "<!-- paginator.html -->" | safeHTML }}
|
57 |
+
{{- $pagerSize := .Params.Paginate }}
|
58 |
+
{{- $pages := .RegularPagesRecursive }}
|
59 |
+
{{- if .IsHome }}
|
60 |
+
{{- $pages = where site.RegularPages "Type" (or "post" "articles") }}
|
61 |
+
{{- end }}
|
62 |
+
{{- $paginator := .Paginate $pages }}
|
63 |
+
{{- if $pagerSize }}
|
64 |
+
{{- $paginator = .Paginate $pages $pagerSize }}
|
65 |
+
{{- end }}
|
66 |
+
{{- return $paginator }}
|
67 |
+
{{- end }}
|
68 |
+
|
69 |
+
{{- define "partials/coffeeStat.html" }}
|
70 |
+
{{- $cups := 0 }}
|
71 |
+
{{- range site.RegularPages }}
|
72 |
+
{{- range .AllTranslations }}
|
73 |
+
{{- with .Params.Coffee }}
|
74 |
+
{{- $cups = add $cups . }}
|
75 |
+
{{- end }}
|
76 |
+
{{- end }}
|
77 |
+
{{- end }}
|
78 |
+
{{- return $cups }}
|
79 |
+
{{- end }}
|
80 |
+
|
81 |
+
{{- define "partials/hero.html" }}
|
82 |
+
{{ "<!-- hero.html -->" | safeHTML }}
|
83 |
+
<div class="hero">
|
84 |
+
<div class="hero__image">
|
85 |
+
{{- $src := partial "page/cover.html" (dict "page" . ) }}
|
86 |
+
{{- $alt := or .Params.Alt .Params.coverAlt .Params.imagesAlt }}
|
87 |
+
{{- if $src }}
|
88 |
+
<img src="{{ $src }}" alt="{{ with $alt }}{{ . }}{{ end }}" role="doc-cover"/>
|
89 |
+
{{- end }}
|
90 |
+
</div>
|
91 |
+
<div class="hero__content">
|
92 |
+
{{- .Content }}
|
93 |
+
{{- /*
|
94 |
+
|
95 |
+
author page hero extras */}}
|
96 |
+
{{- if and (eq .Kind "term") (eq .Data.Singular "author") }}
|
97 |
+
{{- $authorName := .Title }}
|
98 |
+
{{- $co := or site.Params.Author.coauthor site.Params.Author.collabolator }}
|
99 |
+
{{- range $co }}
|
100 |
+
{{- if eq $authorName .name }}
|
101 |
+
<p>{{ or .bio .about }}</p>
|
102 |
+
{{- end }}
|
103 |
+
{{- end }}
|
104 |
+
{{- $author := urlize .Title }}
|
105 |
+
{{/*
|
106 |
+
|
107 |
+
author's social links */}}
|
108 |
+
{{ partial "menu.html" (dict "menuID" $author "open" "open" "page" .)}}
|
109 |
+
{{- end }}
|
110 |
+
</div>
|
111 |
+
</div>
|
112 |
+
{{ end }}
|
113 |
+
|
114 |
+
{{- define "partials/list/sections.html" -}}
|
115 |
+
{{ "<!-- sections.html -->" | safeHTML }}
|
116 |
+
{{- $page := .page }}
|
117 |
+
{{- $class := .class }}
|
118 |
+
{{- $limit := .limit }}
|
119 |
+
{{- $cover := .cover }}
|
120 |
+
{{- $getCover := .Resources.GetMatch "cover.*" }}
|
121 |
+
{{- with $page.Sections }}
|
122 |
+
<ul class="{{ $class }}" role="presentation">
|
123 |
+
{{- $index := 0 }}
|
124 |
+
{{- range . }}
|
125 |
+
{{- $index = add $index 1 }}
|
126 |
+
{{- if or (le $index $limit) (not $limit) }}
|
127 |
+
{{- $src := false }}
|
128 |
+
{{- $images := or .Page.Params.cover .Page.Params.images }}
|
129 |
+
{{- if $images }}
|
130 |
+
{{- $src = $images }}
|
131 |
+
{{- else if $getCover }}
|
132 |
+
{{- $src = $getCover.Permalink }}
|
133 |
+
{{- else }}
|
134 |
+
{{- $src = partial "flowlines.html" . }}
|
135 |
+
{{- end }}
|
136 |
+
<li {{ if $cover}}style="background-image:url({{ $src }});"{{ end }}>
|
137 |
+
<a href="{{ .Page.Permalink }}" aria-label="{{ i18n "section" 1 }}:{{ .Page.Title }}">
|
138 |
+
<span>{{ .Page.Title }}</span>
|
139 |
+
</a>
|
140 |
+
</li>
|
141 |
+
{{- end }}
|
142 |
+
{{- end }}
|
143 |
+
</ul>
|
144 |
+
{{- end }}
|
145 |
+
{{ end }}
|
146 |
+
|
147 |
+
{{- define "partials/listing.html" -}}
|
148 |
+
{{ "<!-- listing.html -->" | safeHTML }}
|
149 |
+
{{- $entry := .entry }}
|
150 |
+
{{- if index site.Taxonomies $entry }}
|
151 |
+
<div id="list-{{ $entry }}" class="carousel">
|
152 |
+
<header class="section-title">{{ i18n $entry }}</header>
|
153 |
+
{{ partial "taxonomies.html" (dict "taxonomy" $entry "class" "carousel__viewport" "cover" true) }}
|
154 |
+
</div>
|
155 |
+
{{- end }}
|
156 |
+
{{- end }}
|
157 |
+
|
158 |
+
{{- define "partials/carousel.html" -}}
|
159 |
+
{{ "<!-- carousel.html -->" | safeHTML }}
|
160 |
+
{{- $slides := where .Site.RegularPages "Type" "slide" }}
|
161 |
+
{{- with $slides }}
|
162 |
+
<aside class="carousel">
|
163 |
+
{{- $numSlides := len . }}
|
164 |
+
{{- if gt $numSlides 2 }}
|
165 |
+
<nav class="carousel__nav">
|
166 |
+
<ul class="rounded invert" role="presentation">
|
167 |
+
{{- range $index, $slide := . }}
|
168 |
+
<li>
|
169 |
+
<a href="#slide-{{ add $index 1 }}" role="button" aria-controls="slide-{{ add $index 1 }}">
|
170 |
+
<span>{{ .Title }}</span>
|
171 |
+
</a>
|
172 |
+
</li>
|
173 |
+
{{- end }}
|
174 |
+
</ul>
|
175 |
+
</nav>
|
176 |
+
{{- end }}
|
177 |
+
|
178 |
+
<div class="carousel__viewport">
|
179 |
+
{{- range $index, $slide := . }}
|
180 |
+
{{- $slideNum := add $index 1 }}
|
181 |
+
<section id="slide-{{ $slideNum }}" class="carousel__viewport__slide{{ with .Params.Background }} has-background{{ end }}"
|
182 |
+
aria-labelledby="slide-{{ $slideNum }}__heading">
|
183 |
+
{{- $hasCover := partial "partials/page/cover.html" (dict "page" .Page) }}
|
184 |
+
{{- $alt := or .Page.Params.Alt .Page.Params.coverAlt .Page.Params.imagesAlt }}
|
185 |
+
{{- if or $hasCover }}
|
186 |
+
<div class="carousel__viewport__slide__cover">
|
187 |
+
<img src="{{ $hasCover }}"
|
188 |
+
alt="{{ with $alt }}{{ . }}{{ end }}" {{ if ne $slideNum 1 }}loading="lazy"{{ end }}>
|
189 |
+
</div>
|
190 |
+
{{- end }}
|
191 |
+
<div class="carousel__viewport__slide__content">
|
192 |
+
{{- with .Title }}
|
193 |
+
<h1 id="slide-{{ $slideNum }}__heading" class="section-title">{{ . }}</h1>
|
194 |
+
{{- end }}
|
195 |
+
<div>
|
196 |
+
{{- if or .Params.task $.Site.Params.Post.enableCheckbox }}
|
197 |
+
{{ replace .Content "disabled=" "" | safeHTML }}
|
198 |
+
{{- else }}
|
199 |
+
{{ .Content }}
|
200 |
+
{{- end }}
|
201 |
+
</div>
|
202 |
+
</div>
|
203 |
+
{{- /*
|
204 |
+
|
205 |
+
simple prev/next pair for 2 slides */}}
|
206 |
+
{{- if eq $numSlides 2 }}
|
207 |
+
<nav class="carousel__nav">
|
208 |
+
{{- range $navIndex, $navSlide := $slides }}
|
209 |
+
{{- if ne $slideNum (add $navIndex 1) }}
|
210 |
+
{{ $rel := cond (eq $navIndex 1) "next" "prev" }}
|
211 |
+
<a href="#slide-{{ add $navIndex 1 }}" rel="{{ $rel }}" class="underline" role="button" aria-controls="slide-{{ add $navIndex 1 }}">
|
212 |
+
<span>{{ .Title }}</span>
|
213 |
+
</a>
|
214 |
+
{{- end }}
|
215 |
+
{{- end }}
|
216 |
+
</nav>
|
217 |
+
{{- end }}
|
218 |
+
</section>
|
219 |
+
{{- end }}
|
220 |
+
</div>
|
221 |
+
</aside>
|
222 |
+
{{- end }}
|
223 |
+
{{- end }}
|
layouts/partials/bundles/leaf.html
ADDED
@@ -0,0 +1,263 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{{- define "partials/page/title.html" -}}
|
2 |
+
{{- "<!-- title.html -->" | safeHTML }}
|
3 |
+
{{- $subtitle := .Params.Subtitle | default .Description }}
|
4 |
+
{{- $isPost := eq (lower .Params.type) (or "post" "articles") }}
|
5 |
+
{{- if $subtitle }}
|
6 |
+
<hgroup data-bionRead-safe>
|
7 |
+
<h1 id="title"
|
8 |
+
{{- if $isPost }}
|
9 |
+
data-pagefind-meta="title"
|
10 |
+
{{- end }}
|
11 |
+
>{{ .Title }}</h1>
|
12 |
+
<p class="subtitle"
|
13 |
+
role="doc-subtitle">{{ $subtitle }}</p>
|
14 |
+
</hgroup>
|
15 |
+
{{- else }}
|
16 |
+
<h1 id="title"
|
17 |
+
{{- if $isPost }}
|
18 |
+
data-pagefind-meta="title"
|
19 |
+
{{- end }}
|
20 |
+
data-bionRead-safe
|
21 |
+
>{{ .Title }}</h1>
|
22 |
+
{{- end }}
|
23 |
+
{{- end }}
|
24 |
+
|
25 |
+
{{- define "partials/page/timestamp.html" -}}
|
26 |
+
{{- "<!-- timestamp.html-->" | safeHTML }}
|
27 |
+
{{- $dateMachine := "2006-01-02T15:04:05-07:00" }}
|
28 |
+
{{- $minVersion := index ( split hugo.Version "." ) 1 }}
|
29 |
+
{{- $datePublished := cond (lt $minVersion 87) (.PublishDate.Format ( i18n "date_long" )) (.PublishDate | time.Format ":date_long") }}
|
30 |
+
{{- $dateModified := cond (lt $minVersion 87) (.Lastmod.Format ( i18n "date_long" )) (.Lastmod | time.Format ":date_long") }}
|
31 |
+
{{- $dateOnly := "2006-01-02" }}
|
32 |
+
{{- $hasMod := ne (.PublishDate.Format $dateOnly) (.Lastmod.Format $dateOnly) }}
|
33 |
+
<div {{ if $hasMod }}class="date-has-label"{{ end }}>
|
34 |
+
<time class="doc-publish-date" datetime="{{ .PublishDate.Format $dateMachine }}" data-time-label="{{ i18n "published" }} {{ i18n "on" | lower }}">
|
35 |
+
{{- $datePublished -}}
|
36 |
+
</time>
|
37 |
+
{{- if $hasMod }}
|
38 |
+
<time class="doc-lastmod-date" datetime="{{ .Lastmod.Format $dateMachine }}" data-time-label="{{ i18n "modified" }} {{ i18n "on" | lower }}">
|
39 |
+
{{- $dateModified -}}
|
40 |
+
</time>
|
41 |
+
{{- end }}
|
42 |
+
</div>
|
43 |
+
{{- end }}
|
44 |
+
|
45 |
+
{{- define "partials/page/cover.html" -}}
|
46 |
+
{{- "<!-- cover.html -->" | safeHTML }}
|
47 |
+
{{- $page := .page }}
|
48 |
+
{{- $src := or .page.Params.cover .page.Params.image }}
|
49 |
+
{{- with .page.Resources.GetMatch "cover.*" }}
|
50 |
+
{{- $src = .Permalink }}
|
51 |
+
{{- end }}
|
52 |
+
{{- return $src }}
|
53 |
+
{{- end }}
|
54 |
+
|
55 |
+
{{- define "partials/flowlines.html" -}}
|
56 |
+
{{ "<!-- flowlines -->" | safeHTML }}
|
57 |
+
{{- $flowlinesCount := site.Params.Feed.FlowlinesLimit | default 42 }}
|
58 |
+
{{- $flowlinesDir := "https://raw.githubusercontent.com/foxihd/hugo-et-hd/master/static/svg/flowlines/" }}
|
59 |
+
{{- $src := printf "%s%d.svg" $flowlinesDir (index (seq $flowlinesCount | shuffle) 1) }}
|
60 |
+
{{- return $src }}
|
61 |
+
{{- end }}
|
62 |
+
|
63 |
+
{{- define "partials/page/audio.html" -}}
|
64 |
+
{{- "<!-- audio.html -->" | safeHTML }}
|
65 |
+
{{- $audioFormats := dict
|
66 |
+
"aac" "audio/aac"
|
67 |
+
"flac" "audio/flac"
|
68 |
+
"mp3" "audio/mpeg"
|
69 |
+
"oga" "audio/ogg"
|
70 |
+
"ogg" "audio/ogg"
|
71 |
+
"opus" "audio/opus"
|
72 |
+
"wav" "audio/wav"
|
73 |
+
"weba" "audio/webm"
|
74 |
+
"webm" "audio/webm"
|
75 |
+
}}
|
76 |
+
{{- $audioFiles := dict }}
|
77 |
+
{{- range $format, $type := $audioFormats }}
|
78 |
+
{{- $file := $.Resources.GetMatch (printf "audio.%s" $format) }}
|
79 |
+
{{- if $file }}
|
80 |
+
{{- $audioFiles = merge $audioFiles (dict $format $file) }}
|
81 |
+
{{- end }}
|
82 |
+
{{- end }}
|
83 |
+
{{- $audio := .Params.Audio }}
|
84 |
+
{{- if or $audio $audioFiles }}
|
85 |
+
<audio controls preload="metadata" aria-label="{{ i18n "audio" }} : {{- .Title }}" data-pagefind-ignore="all">
|
86 |
+
{{- $ext := index ( split $audio "." ) ( sub ( len ( split $audio "." ) ) 1 ) }}
|
87 |
+
{{- with $audio }}
|
88 |
+
<source src="{{ . }}"
|
89 |
+
{{- range $format, $type := $audioFormats }}
|
90 |
+
{{ if eq $ext $format }}
|
91 |
+
type="{{ $type }}"
|
92 |
+
{{- end }}
|
93 |
+
{{- end }}>
|
94 |
+
{{- end }}
|
95 |
+
{{ with $audioFiles }}
|
96 |
+
{{ range $fileExt, $file := $audioFiles }}
|
97 |
+
<source src="{{ $file.Permalink }}"
|
98 |
+
{{- range $format, $type := $audioFormats }}
|
99 |
+
{{ if eq $fileExt $format }}
|
100 |
+
type="{{ $type }}"
|
101 |
+
{{- end }}
|
102 |
+
{{- end }}>
|
103 |
+
{{ end }}
|
104 |
+
{{ end }}
|
105 |
+
{{- "<!-- article audio download -->" | safeHTML }}
|
106 |
+
<center>
|
107 |
+
<p role="contentinfo">{{ i18n "ifNoAudioSupport" }}</p>
|
108 |
+
<ul role="presentation">
|
109 |
+
{{- $fileName := print site.Title " - " .Title }}
|
110 |
+
{{- with $audio }}
|
111 |
+
<li>
|
112 |
+
<a href="{{ . }}" download="{{ $fileName }}.{{ $ext }}">
|
113 |
+
<span>{{ $ext }}</span>
|
114 |
+
</a>
|
115 |
+
</li>
|
116 |
+
{{- end }}
|
117 |
+
{{ with $audioFiles }}
|
118 |
+
{{ range $fileExt, $file := $audioFiles }}
|
119 |
+
<li>
|
120 |
+
<a href="{{ $file.Permalink }}" download="{{ $fileName }}.{{ $fileExt }}">
|
121 |
+
<span>{{ $fileExt }}</span>
|
122 |
+
</a>
|
123 |
+
</li>
|
124 |
+
{{ end }}
|
125 |
+
{{ end }}
|
126 |
+
</ul>
|
127 |
+
</center>
|
128 |
+
</audio>
|
129 |
+
{{- end }}
|
130 |
+
{{- end }}
|
131 |
+
|
132 |
+
{{- define "partials/post/tagged.html" -}}
|
133 |
+
{{- with .Params.tags }}
|
134 |
+
<div id="keywords">
|
135 |
+
<span>{{ printf "%s:" (i18n "tags" (len . ))}} </span>
|
136 |
+
{{ $class := cond (eq (len .) 1) "inline" "delimiter" }}
|
137 |
+
{{ partial "terms.html" (dict "taxonomy" "tags" "class" $class "page" $) }}
|
138 |
+
</div>
|
139 |
+
{{- end }}
|
140 |
+
{{- end }}
|
141 |
+
|
142 |
+
{{- define "partials/post/colophon.html" -}}
|
143 |
+
{{ "<!-- colophon.html -->" | safeHTML }}
|
144 |
+
<div id="colophon" style="display: none;" aria-live="polite">
|
145 |
+
<strong class="section-title">{{ i18n "colophon" }}</strong>
|
146 |
+
<div class="f">
|
147 |
+
<div id="qr" role="img" aria-label="QR code"></div>
|
148 |
+
<div class="verbose">
|
149 |
+
<div class="has-aria-label-top" aria-label="{{ .Title }}"><span>{{- .Permalink }}</span></div>
|
150 |
+
<div><span>{{ i18n "accessTime" }}: </span><time id="time-stamp"></time></div>
|
151 |
+
{{- $buildTime := now.Format "2006-01-02T15:04:05-07:00" }}
|
152 |
+
{{- with $buildTime }}
|
153 |
+
<div><span>{{ i18n "buildTime" }}: </span><time datetime="{{ . }}">{{ . }}</time></div>
|
154 |
+
{{- end }}
|
155 |
+
{{/* <div class="sf">Powered by <a href="https://gohugo.io/" target="_blank" rel="noopener noreferrer"> Hugo</a></div> */}}
|
156 |
+
</div>
|
157 |
+
</div>
|
158 |
+
</div>
|
159 |
+
{{- end }}
|
160 |
+
|
161 |
+
{{- define "partials/post/history.html" -}}
|
162 |
+
{{- "<!-- history.html -->" | safeHTML }}
|
163 |
+
{{- $dateMachine := "2006-01-02T15:04:05-07:00" }}
|
164 |
+
{{- $minVersion := index ( split hugo.Version "." ) 1 }}
|
165 |
+
{{- $datePublished := cond (lt $minVersion 87) (.PublishDate.Format ( i18n "date_long" )) (.PublishDate | time.Format ":date_long") }}
|
166 |
+
{{- $dateModified := cond (lt $minVersion 87) (.Lastmod.Format ( i18n "date_long" )) (.Lastmod | time.Format ":date_long") }}
|
167 |
+
{{- $dateOnly := "2006-01-02" }}
|
168 |
+
{{- $hasMod := ne (.PublishDate.Format $dateOnly) (.Lastmod.Format $dateOnly) }}
|
169 |
+
{{- if or .Params.History $hasMod }}
|
170 |
+
{{- $author := .Params.author | default site.Params.Author.Name }}
|
171 |
+
<div id="has-timeline">
|
172 |
+
<strong class="section-title">{{ i18n "redactionHistory" }}</strong>
|
173 |
+
<ol>
|
174 |
+
{{- if .Params.History }}
|
175 |
+
{{- range sort .Params.History "date" "asc" }}
|
176 |
+
<li>
|
177 |
+
<details class="presentation js-details" name="redaction-history">
|
178 |
+
<summary>
|
179 |
+
<time datetime="{{ .date | time.Format $dateMachine }}">
|
180 |
+
{{- .date | time.Format "2006-01-02" -}}
|
181 |
+
</time>
|
182 |
+
</summary>
|
183 |
+
{{- $writtenAuthor := .author | default $author }}
|
184 |
+
{{- with $writtenAuthor }}
|
185 |
+
<div class="has-aria-label-top" aria-label="{{ i18n "author" }}:">{{ . }}</div>
|
186 |
+
{{- end }}
|
187 |
+
{{- with .editor }}
|
188 |
+
<div class="has-aria-label-top" aria-label="{{ i18n "editedBy" }}:">{{ . }}</div>
|
189 |
+
{{- end }}
|
190 |
+
{{- with .reviewer }}
|
191 |
+
<div class="has-aria-label-top" aria-label="{{ i18n "reviewedBy" }}:">{{ . }}</div>
|
192 |
+
{{- end }}
|
193 |
+
{{- with .note }}
|
194 |
+
<div class="has-aria-label-top" aria-label="{{ i18n "note" }}:">{{ . }}</div>
|
195 |
+
{{- end }}
|
196 |
+
</details>
|
197 |
+
</li>
|
198 |
+
{{- end }}
|
199 |
+
{{- else }}
|
200 |
+
<li>
|
201 |
+
<time datetime="{{ .PublishDate.Format $dateMachine }}">{{- $datePublished -}}</time>
|
202 |
+
<span>{{ printf "(%s)" (i18n "published") }}</span>
|
203 |
+
</li>
|
204 |
+
<li>
|
205 |
+
<time datetime="{{ .Lastmod.Format $dateMachine }}">{{- $dateModified -}}</time>
|
206 |
+
<span>{{ printf "(%s)" (i18n "modified") }}</span>
|
207 |
+
</li>
|
208 |
+
{{- end }}
|
209 |
+
</ol>
|
210 |
+
<p>{{ i18n "redactionNotes" }}</p>
|
211 |
+
</div>
|
212 |
+
{{- end }}
|
213 |
+
{{- end }}
|
214 |
+
|
215 |
+
{{- define "partials/post/contribute.html" -}}
|
216 |
+
{{- if index site.Menus "contrib" }}
|
217 |
+
<div id="contribute">
|
218 |
+
<strong class="section-title">{{ i18n "contribAskReader" }}</strong>
|
219 |
+
<br>
|
220 |
+
<span>
|
221 |
+
{{ i18n "contribAskReaderResponse" }}
|
222 |
+
{{- with .Params.Coffee }}
|
223 |
+
{{ i18n "contribCoffeeStat" }} {{ printf "%d %s" . (i18n "cup" . | lower) }} {{ i18n "contribCoffeeStatPost" }}
|
224 |
+
{{- end }}
|
225 |
+
{{ i18n "contribAskReaderToContribute" }}
|
226 |
+
</span>
|
227 |
+
{{ partial "menu.html" (dict "menuID" "contrib" "open" "open" "page" .)}}
|
228 |
+
</div>
|
229 |
+
{{- end }}
|
230 |
+
{{- end }}
|
231 |
+
|
232 |
+
{{- define "partials/post/related.html" -}}
|
233 |
+
{{- "<!-- related.html -->" | safeHTML }}
|
234 |
+
{{- $related := site.RegularPages.Related . | first 5 }}
|
235 |
+
{{- $series := .GetTerms "series" }}
|
236 |
+
{{- if or $related $series }}
|
237 |
+
<nav id="related">
|
238 |
+
<strong class="section-title">{{ i18n "related" }}</strong>
|
239 |
+
{{- if $series }}
|
240 |
+
{{- range $series | first 1 -}}
|
241 |
+
<ol>
|
242 |
+
{{- range .Pages | first 5 }}
|
243 |
+
{{ if ne $ . -}}
|
244 |
+
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
|
245 |
+
{{- end }}
|
246 |
+
{{- end }}
|
247 |
+
{{- if gt (len .Pages) 5 }}
|
248 |
+
<li class="see-more"><a href="{{ .Permalink }}">{{ i18n "series" }}: {{ .Title }}</a></li>
|
249 |
+
{{- end }}
|
250 |
+
</ol>
|
251 |
+
{{- end }}
|
252 |
+
{{- else if $related }}
|
253 |
+
{{- with $related -}}
|
254 |
+
<ol>
|
255 |
+
{{- range . }}
|
256 |
+
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
257 |
+
{{- end }}
|
258 |
+
</ol>
|
259 |
+
{{- end }}
|
260 |
+
{{- end }}
|
261 |
+
</nav>
|
262 |
+
{{- end }}
|
263 |
+
{{- end }}
|
layouts/partials/fediverse.html
ADDED
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{{ "<!-- fediverse.html -->" | safeHTML }}
|
2 |
+
{{- $instance := .instance }}
|
3 |
+
{{- $user := .user }}
|
4 |
+
{{- $post := .post }}
|
5 |
+
{{- $tootContent := .tootContent }}
|
6 |
+
{{- $commentUrl := .commentUrl }}
|
7 |
+
<details id="comments" class="presentation" aria-label="{{ i18n "comments" }}" open>
|
8 |
+
<summary class="section-title" role="button" aria-expanded="true" aria-controls="mastodon-comments-list">
|
9 |
+
<span>{{ i18n "comments" }}</span>
|
10 |
+
</summary>
|
11 |
+
<code class="verbose" aria-hidden="true" hidden>
|
12 |
+
<div class="has-aria-label-top" aria-label="Source:">
|
13 |
+
<span>https://</span><span id="metadata-instance">{{ $instance }}</span>
|
14 |
+
<span>/@</span><span id="metadata-user">{{ $user }}</span>
|
15 |
+
<span>/</span><span id="metadata-post">{{ $post }}</span>
|
16 |
+
</div>
|
17 |
+
<div id="i18n--no-comment" class="has-aria-label-top" aria-label="[l10n] if no comment to display:">
|
18 |
+
{{- i18n "noComment" -}}
|
19 |
+
</div>
|
20 |
+
<div id="i18n--is-loading" class="has-aria-label-top loading" aria-label="[l10n] if comments is loading:">
|
21 |
+
{{- i18n "fediverseIsLoading" -}}
|
22 |
+
</div>
|
23 |
+
<div id="i18n--is-replies" class="has-aria-label-top" aria-label="[l10n] replies:">
|
24 |
+
{{- i18n "replies" }}
|
25 |
+
</div>
|
26 |
+
<div id="i18n--is-reblogs" class="has-aria-label-top" aria-label="[l10n] reblogs:">
|
27 |
+
{{- i18n "reblogs" }}
|
28 |
+
</div>
|
29 |
+
<div id="i18n--is-favourites" class="has-aria-label-top" aria-label="[l10n] favorites:">
|
30 |
+
{{- i18n "favourites" }}
|
31 |
+
</div>
|
32 |
+
</code>
|
33 |
+
<article id="discussion-starter">
|
34 |
+
<div data-pagefind-body>{{ $tootContent | safeHTML }}</div>
|
35 |
+
<footer>
|
36 |
+
<a id="join-discussion" href="{{ $commentUrl }}" rel="nofollow" data-post-counter="">
|
37 |
+
<span>{{ i18n "ctaComments" }}</span>
|
38 |
+
</a>
|
39 |
+
<div id="mastodon-stats" class="stat" aria-live="polite"></div>
|
40 |
+
</footer>
|
41 |
+
</article>
|
42 |
+
<div id="mastodon-comments-list" role="feed" aria-busy="true" aria-label="{{ i18n "comments" }}"></div>
|
43 |
+
<noscript>
|
44 |
+
<div id="comments-error" role="alert">{{ i18n "noScript" }} {{ i18n "noComment" }}</div>
|
45 |
+
</noscript>
|
46 |
+
{{ partialCached "partials/fediverse/js.html" . }}
|
47 |
+
</details>
|
48 |
+
|
49 |
+
{{/*-------------------- end of fediverse.html ---------------------*/}}
|
50 |
+
|
51 |
+
{{- define "partials/fediverse/js.html" -}}
|
52 |
+
{{ "<!-- fediverse/js.html -->" | safeHTML }}
|
53 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/dompurify/2.4.1/purify.min.js" referrerpolicy="no-referrer"
|
54 |
+
integrity="sha512-uHOKtSfJWScGmyyFr2O2+efpDx2nhwHU2v7MVeptzZoiC7bdF6Ny/CmZhN2AwIK1oCFiVQQ5DA/L9FSzyPNu6Q==" crossorigin="anonymous" ></script>
|
55 |
+
{{- $fediverse := resources.Get "js/fediverse.js" | minify }}
|
56 |
+
{{- if eq hugo.Environment "development" }}
|
57 |
+
<script src="{{ $fediverse.Permalink }}" defer></script>
|
58 |
+
{{- else }}
|
59 |
+
{{- with $fediverse | fingerprint "sha384" }}
|
60 |
+
<script src="{{ $fediverse.Permalink }}"
|
61 |
+
integrity="{{ .Data.Integrity }}" crossorigin="anonymous"
|
62 |
+
defer></script>
|
63 |
+
{{- end }}
|
64 |
+
{{- end }}
|
65 |
+
{{- end }}
|
66 |
+
|
67 |
+
{{- define "partials/fediverse/instance.html" -}}
|
68 |
+
{{- $instance := or .Params.Fediverse.Host .Params.Fediverse.Instance site.Params.fediverse.instance site.Params.fediverse.host }}
|
69 |
+
{{- $commentUrl := or .Params.toot .Params.comment }}
|
70 |
+
{{- if $commentUrl }}
|
71 |
+
{{- $toot := split (replaceRE "^https?://" "" .Params.toot) "/" }}
|
72 |
+
{{- $instance = index $toot 0 }}
|
73 |
+
{{- end }}
|
74 |
+
{{- return $instance }}
|
75 |
+
{{- end }}
|
76 |
+
|
77 |
+
{{- define "partials/fediverse/username.html" -}}
|
78 |
+
{{- $username := or .Params.Fediverse.User .Params.Fediverse.Username site.Params.fediverse.username site.Params.fediverse.user }}
|
79 |
+
{{- $commentUrl := or .Params.toot .Params.comment }}
|
80 |
+
{{- if $commentUrl }}
|
81 |
+
{{- $toot := split (replaceRE "^https?://" "" .Params.toot) "/" }}
|
82 |
+
{{- $username = trim (index $toot 1) "@" }}
|
83 |
+
{{- end }}
|
84 |
+
{{- return $username }}
|
85 |
+
{{- end }}
|
86 |
+
|
87 |
+
{{- define "partials/fediverse/post.html" -}}
|
88 |
+
{{- $post := or .Params.Fediverse.post .Params.Fediverse.link }}
|
89 |
+
{{- $commentUrl := or .Params.toot .Params.comment }}
|
90 |
+
{{- if $commentUrl }}
|
91 |
+
{{- $toot := split (replaceRE "^https?://" "" .Params.toot) "/" }}
|
92 |
+
{{- $post = index $toot 2 }}
|
93 |
+
{{- end }}
|
94 |
+
{{- return $post }}
|
95 |
+
{{- end }}
|
layouts/partials/footer.html
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{{ "<!-- footer.html -->" | safeHTML }}
|
2 |
+
<footer id="body-footer" class="pagewidth" style="display: none;">
|
3 |
+
<div id="background-footer" class="background" role="presentation"></div>
|
4 |
+
{{ partialCached "a11y.html" . }}
|
5 |
+
{{ partialCached "a11y/bionread.html" . }}
|
6 |
+
{{ "<!-- [top] bypass block -->" | safeHTML }}
|
7 |
+
<nav aria-label="{{ i18n "bypassNavigation" }}">
|
8 |
+
<a id="to-top" href="#top" title="{{ i18n "toTop" }}" accesskey="c" aria-keyshortcuts="c" aria-label="{{ i18n "toTop" }}">
|
9 |
+
<kbd class="key">c</kbd>
|
10 |
+
</a>
|
11 |
+
</nav>
|
12 |
+
</footer>
|
13 |
+
|
14 |
+
{{- define "partials/main/footer.html" -}}
|
15 |
+
{{ "<!-- main/footer.html -->" | safeHTML }}
|
16 |
+
{{- $page := . }}
|
17 |
+
{{- $iterateEntry := where .Site.RegularPages "Type" "footer" }}
|
18 |
+
{{ with $iterateEntry -}}
|
19 |
+
<hr class="hide">
|
20 |
+
<footer id="main-footer">
|
21 |
+
<div class="column column--multicols pagewidth" style="--multicols: 2">
|
22 |
+
{{- $counter := 1 }}
|
23 |
+
{{- with index . 0 -}}
|
24 |
+
<div id="main-footer-primary"
|
25 |
+
{{- if .Params.Span }} class="span-all" {{ end }}
|
26 |
+
aria-labelledby="footer-1">
|
27 |
+
{{- with .Title -}}
|
28 |
+
<strong id="footer-1" class="section-title">{{ . }}</strong>
|
29 |
+
{{- end }}
|
30 |
+
{{ .Content }}
|
31 |
+
</div>
|
32 |
+
{{- end }}
|
33 |
+
<div id="main-footer-secondary" class="column" style="--col: 15rem">
|
34 |
+
{{- range after 1 . -}}
|
35 |
+
{{- $counter := add 1 $counter }}
|
36 |
+
<div
|
37 |
+
{{- if .Params.Span }} class="span-all" {{ end }}
|
38 |
+
aria-labelledby="footer-{{ $counter }}">
|
39 |
+
{{- with .Title -}}
|
40 |
+
<strong id="footer-{{ $counter }}" class="section-title">{{ . }}</strong>
|
41 |
+
{{- end }}
|
42 |
+
{{ .Content }}
|
43 |
+
</div>
|
44 |
+
{{- end }}
|
45 |
+
{{- if site.Params.coffeeStat }}
|
46 |
+
{{- $coffeeStat := partialCached "partials/coffeeStat.html" . }}
|
47 |
+
{{- with $coffeeStat }}
|
48 |
+
<div id="coffee-counter">
|
49 |
+
<strong class="section-title">{{ i18n "coffeeStat" }}</strong>
|
50 |
+
<p>{{ i18n "coffeeCount" }}{{ printf "%d %s" . (i18n "cup" . | lower) }}{{ i18n "coffeeCountPost" }}</p>
|
51 |
+
</div>
|
52 |
+
{{- end }}
|
53 |
+
{{- end }}
|
54 |
+
{{ partial "menu.html" ( dict "page" $page "menuID" "footer") }}
|
55 |
+
</div>
|
56 |
+
</div>
|
57 |
+
</footer>
|
58 |
+
{{- end }}
|
59 |
+
{{- end }}
|
layouts/partials/head.html
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{{ "<!-- head.html -->" | safeHTML -}}
|
2 |
+
{{ if .Params.Headless -}}
|
3 |
+
{{- $url := "/404.html" }}
|
4 |
+
{{- with or .Params.Target .Params.Alias }}
|
5 |
+
{{- $url = . }}
|
6 |
+
{{- end }}
|
7 |
+
<title>{{ $url }}</title>
|
8 |
+
<link rel="canonical" href="{{ $url }}">
|
9 |
+
<meta name="robots" content="noindex">
|
10 |
+
<meta charset="utf-8">
|
11 |
+
<meta http-equiv="refresh" content="0; url={{ $url }}" />
|
12 |
+
{{- else -}}
|
13 |
+
{{ partial "head/meta.html" . -}}
|
14 |
+
{{ with .OutputFormats.Get "rss" -}}
|
15 |
+
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
16 |
+
{{ end -}}
|
17 |
+
{{ partialCached "head/js.html" . -}}
|
18 |
+
{{ partialCached "head/css.html" . -}}
|
19 |
+
{{ partial "head/css/inline.html" . -}}
|
20 |
+
{{ end }}
|
layouts/partials/head/css.html
ADDED
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{{ "<!-- css.html -->" | safeHTML }}
|
2 |
+
{{- /*------------------- x-height matched type --------------------*/}}
|
3 |
+
{{- /* serif */}}
|
4 |
+
{{- $cormorant := resources.Get "css/typeface/Cormorant.css" }}
|
5 |
+
{{- $crimson := resources.Get "css/typeface/Crimson.css" }}
|
6 |
+
{{- $EBGaramond := resources.Get "css/typeface/EBGaramond.css" }}
|
7 |
+
{{- /* sans-serif */}}
|
8 |
+
{{- $inter := resources.Get "css/typeface/Inter.css" }}
|
9 |
+
{{- $montserrat := resources.Get "css/typeface/Montserrat.css" }}
|
10 |
+
{{- $rosario := resources.Get "css/typeface/Rosario.css" }}
|
11 |
+
{{- /* teletype & other */}}
|
12 |
+
{{- $inconsolata := resources.Get "css/typeface/Inconsolata.css" }}
|
13 |
+
{{- $openDyslexic := resources.Get "css/typeface/OpenDyslexic.css" }}
|
14 |
+
{{- $icon := resources.Get "css/typeface/icon.css" }}
|
15 |
+
{{- $websafe := resources.Get "css/typeface/websafe.css" }}
|
16 |
+
|
17 |
+
{{- if site.Params.Typeface.localHost }}
|
18 |
+
{{- $icon = resources.Get "css/typeface-local/icon.css" }}
|
19 |
+
{{- $cormorant = resources.Get "css/typeface-local/Cormorant.css" }}
|
20 |
+
{{- $crimson = resources.Get "css/typeface-local/Crimson.css" }}
|
21 |
+
{{- $EBGaramond = resources.Get "css/typeface-local/EBGaramond.css" }}
|
22 |
+
{{- $inter = resources.Get "css/typeface-local/Inter.css" }}
|
23 |
+
{{- $montserrat = resources.Get "css/typeface-local/Montserrat.css" }}
|
24 |
+
{{- $rosario = resources.Get "css/typeface-local/Rosario.css" }}
|
25 |
+
{{- $inconsolata = resources.Get "css/typeface-local/Inconsolata.css" }}
|
26 |
+
{{- $openDyslexic = resources.Get "css/typeface-local/OpenDyslexic.css" }}
|
27 |
+
{{- end }}
|
28 |
+
|
29 |
+
{{- $teletype := $inconsolata }}
|
30 |
+
|
31 |
+
{{- /* configure typeface */}}
|
32 |
+
{{- $roman := $EBGaramond }}
|
33 |
+
{{- $uRoman := lower (or site.Params.Typeface.Roman site.Params.Typeface.serif) }}
|
34 |
+
{{- if eq $uRoman "cormorant" }}
|
35 |
+
{{- $roman = $cormorant }}
|
36 |
+
{{- else if eq $uRoman "crimson" }}
|
37 |
+
{{- $roman = $crimson }}
|
38 |
+
{{- end }}
|
39 |
+
|
40 |
+
{{- $sans := $rosario }}
|
41 |
+
{{- $uSans := lower (or site.Params.Typeface.Sans site.Params.Typeface.SansSerif) }}
|
42 |
+
{{- if eq $uSans "montserrat" }}
|
43 |
+
{{- $sans = $montserrat }}
|
44 |
+
{{- else if eq $uSans "inter" }}
|
45 |
+
{{- $sans = $inter }}
|
46 |
+
{{- end }}
|
47 |
+
|
48 |
+
{{- /*--------------------------- layout ---------------------------*/}}
|
49 |
+
{{- $baseSty:= slice
|
50 |
+
(resources.Get "css/layout/_default/baseof.css")
|
51 |
+
(resources.Get "css/typesetting/default.css")
|
52 |
+
(resources.Get "css/typesetting/sectioning.css")
|
53 |
+
(resources.Get "css/component/background.css")
|
54 |
+
(resources.Get "css/component/breadcrumb.css")
|
55 |
+
(resources.Get "css/component/column.css")
|
56 |
+
(resources.Get "css/component/a11y.css")
|
57 |
+
(resources.Get "css/component/keyframe.css")
|
58 |
+
(resources.Get "css/component/logotype.css")
|
59 |
+
(resources.Get "css/component/link.css")
|
60 |
+
(resources.Get "css/component/menu.css")
|
61 |
+
(resources.Get "css/component/skipper.css")
|
62 |
+
(resources.Get "css/layout/_default/list.css")
|
63 |
+
(resources.Get "css/component/card.css")
|
64 |
+
(resources.Get "css/component/carousel.css")
|
65 |
+
(resources.Get "css/component/hero.css")
|
66 |
+
(resources.Get "css/layout/_default/single.css")
|
67 |
+
(resources.Get "css/component/marginpar.css")
|
68 |
+
(resources.Get "css/media/print.css")
|
69 |
+
(resources.Get "css/optimize.css")
|
70 |
+
}}
|
71 |
+
|
72 |
+
{{- $baseFonts := slice $icon $openDyslexic }}
|
73 |
+
{{- if site.Params.typeface.webSafe }}
|
74 |
+
{{- $baseFonts = $baseFonts | append $websafe }}
|
75 |
+
{{- else }}
|
76 |
+
{{- $baseFonts = $baseFonts | append $roman $sans $teletype }}
|
77 |
+
{{- end }}
|
78 |
+
|
79 |
+
{{- $custom := resources.Get "css/custom.css" }}
|
80 |
+
{{- $extrasSty := slice $custom }}
|
81 |
+
|
82 |
+
{{- $search := resources.Get "css/component/search.css" }}
|
83 |
+
{{- if site.Params.search.enable }}
|
84 |
+
{{- $extrasSty = $extrasSty | append $search }}
|
85 |
+
{{- end }}
|
86 |
+
{{- $share := resources.Get "css/component/share.css" }}
|
87 |
+
{{- if site.Params.posts.share }}
|
88 |
+
{{- $extrasSty = $extrasSty | append $share }}
|
89 |
+
{{- end }}
|
90 |
+
|
91 |
+
{{- $hugo_brewm := ($baseFonts | append ($baseSty | append $extrasSty)) | resources.Concat "css/hugo-brewm.css" | minify }}
|
92 |
+
|
93 |
+
{{- if eq hugo.Environment "development" }}
|
94 |
+
<link rel="stylesheet" href="{{ $hugo_brewm.Permalink }}">
|
95 |
+
{{- else }}
|
96 |
+
{{- with $hugo_brewm | fingerprint "sha256" }}
|
97 |
+
<link rel="stylesheet" href="{{ $hugo_brewm.Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
98 |
+
{{- end }}
|
99 |
+
{{- end }}
|
100 |
+
|
101 |
+
{{- /*---------------------- end of css.html -----------------------*/}}
|
102 |
+
|
103 |
+
{{- define "partials/head/css/inline.html"}}
|
104 |
+
{{ "<!-- css/inline.html -->" | safeHTML }}
|
105 |
+
{{- $noIndent := or site.Params.Posts.NoIndent .Params.NoIndent }}
|
106 |
+
{{- $justifying := or site.Params.Posts.Justifying .Params.Justifying }}
|
107 |
+
<style>
|
108 |
+
/* graceful degradation fallback */
|
109 |
+
body {max-width: 786px; margin: auto; padding: 2rem;}
|
110 |
+
img {max-width: 86vw;}
|
111 |
+
{{- if $noIndent }}
|
112 |
+
* p {text-indent: unset !important;}
|
113 |
+
{{- end }}
|
114 |
+
{{- if $justifying }}
|
115 |
+
article p {text-align: justify;}
|
116 |
+
{{- end }}
|
117 |
+
{{- with .Resources.GetMatch "*.css" }}
|
118 |
+
{{ .Content | safeCSS }}
|
119 |
+
{{- end }}
|
120 |
+
</style>
|
121 |
+
{{- end }}
|
122 |
+
|
123 |
+
{{- define "partials/head/css/verbatim.html" }}
|
124 |
+
{{ "<!-- css/verbatim.html -->" | safeHTML }}
|
125 |
+
{{- $verbatimSty := resources.Get "css/typesetting/verbatim.css" | minify }}
|
126 |
+
{{- if eq hugo.Environment "development" }}
|
127 |
+
<link href="{{ $verbatimSty.Permalink }}" rel="stylesheet" type="text/css">
|
128 |
+
{{- else }}
|
129 |
+
{{- with $verbatimSty | fingerprint }}
|
130 |
+
<link href="{{ $verbatimSty.Permalink }}" rel="stylesheet" type="text/css" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
131 |
+
{{- end }}
|
132 |
+
{{- end }}
|
133 |
+
{{- end }}
|
layouts/partials/head/js.html
ADDED
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{{ "<!-- js.html -->" | safeHTML }}
|
2 |
+
{{- $js_files := slice
|
3 |
+
(resources.Get "js/default.js")
|
4 |
+
(resources.Get "js/accessibility.js")
|
5 |
+
(resources.Get "js/bionread.js")
|
6 |
+
}}
|
7 |
+
|
8 |
+
{{- if site.Params.posts.colophon }}
|
9 |
+
{{- $js_files = $js_files | append (resources.Get "js/qrcode.js") }}
|
10 |
+
{{- end }}
|
11 |
+
|
12 |
+
{{- $hugo_brewm := $js_files | resources.Concat "js/hugo-brewm.js" | minify }}
|
13 |
+
{{- if eq hugo.Environment "development" }}
|
14 |
+
<script src="{{ $hugo_brewm.Permalink }}" defer></script>
|
15 |
+
{{- else }}
|
16 |
+
{{- with $hugo_brewm | fingerprint "sha384" -}}
|
17 |
+
<script src="{{ $hugo_brewm.Permalink }}"
|
18 |
+
integrity="{{ .Data.Integrity }}" crossorigin="anonymous"
|
19 |
+
defer></script>
|
20 |
+
{{- end }}
|
21 |
+
{{- end }}
|
22 |
+
|
23 |
+
{{- /*----------------------- end of js.html -----------------------*/}}
|
24 |
+
|
25 |
+
{{- define "partials/head/js/hljs.html" -}}
|
26 |
+
{{ "<!-- hljs.html -->" | safeHTML }}
|
27 |
+
<script src="https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/highlight.min.js"
|
28 |
+
integrity="sha384-4l+9bhb7rakZ18megzl0/DWczL8ojbDl1jIEzBVffeMho9A6xB/lkqt1K0PC8Jin" crossorigin="anonymous"></script>
|
29 |
+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/highlightjs-line-numbers.min.js"
|
30 |
+
integrity="sha384-+ch8x/dgaV//v6Sa8m4v5+7KScnpCuxHqilN8njQ013CEKg3Fbd8Q3oN9tfpouLh" crossorigin="anonymous"
|
31 |
+
onload="hljs.highlightAll(); hljs.initLineNumbersOnLoad();"></script>
|
32 |
+
{{- if .Params.Hljslang }}
|
33 |
+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/highlightjs-lang.min.js"
|
34 |
+
integrity="sha384-75WGRpKMq3Y83/0jMJ4YeuDd3z48ZvyiFJCYsGoGuE3s8D1P3AiXa6CLxc1wO//W" crossorigin="anonymous"
|
35 |
+
onload="hljs.initLangOnLoad();"></script>
|
36 |
+
{{- end }}
|
37 |
+
{{- end }}
|
38 |
+
|
39 |
+
{{- define "partials/head/js/katex.html" -}}
|
40 |
+
{{ "<!-- katex.html -->" | safeHTML }}
|
41 |
+
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" rel="stylesheet"
|
42 |
+
integrity="sha384-vKruj+a13U8yHIkAyGgK1J3ArTLzrFGBbBc0tDp4ad/EyewESeXE/Iv67Aj8gKZ0" crossorigin="anonymous">
|
43 |
+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js"
|
44 |
+
integrity="sha384-PwRUT/YqbnEjkZO0zZxNqcxACrXe+j766U2amXcgMg5457rve2Y7I6ZJSm2A0mS4" crossorigin="anonymous"
|
45 |
+
defer></script>
|
46 |
+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js"
|
47 |
+
integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous"
|
48 |
+
onload="renderMathInElement(document.body);"
|
49 |
+
defer></script>
|
50 |
+
<script src="/js/katex.js" defer></script>
|
51 |
+
{{- end }}
|
52 |
+
|
53 |
+
{{- define "partials/head/js/mathjax.html" -}}
|
54 |
+
{{ "<!-- mathjax.html -->" | safeHTML }}
|
55 |
+
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"
|
56 |
+
integrity="sha384-WSLBwI+Q8tqRHaC+f1sjS/FVv5cWp7VAfrGB17HLfZlXhbp5F/RPVP7bYVHtiAWE"
|
57 |
+
crossorigin="anonymous"></script>
|
58 |
+
<script src="/js/mathjax.js" defer></script>
|
59 |
+
<script
|
60 |
+
id="MathJax-script"
|
61 |
+
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"
|
62 |
+
integrity="sha384-Wuix6BuhrWbjDBs24bXrjf4ZQ5aFeFWBuKkFekO2t8xFU0iNaLQfp2K6/1Nxveei" crossorigin="anonymous"
|
63 |
+
async></script>
|
64 |
+
{{- end }}
|
65 |
+
|
66 |
+
{{- define "partials/head/js/qrcode.html" -}}
|
67 |
+
{{ "<!-- qrcode.html -->" | safeHTML }}
|
68 |
+
{{ $qrcode := resources.Get "js/qrcode.js" | minify }}
|
69 |
+
{{ if eq hugo.Environment "development" }}
|
70 |
+
<script src="{{ $qrcode.Permalink }}" defer></script>
|
71 |
+
{{- else }}
|
72 |
+
{{- with $qrcode | fingerprint "sha384" -}}
|
73 |
+
<script src="{{ $qrcode.Permalink }}"
|
74 |
+
integrity="{{ .Data.Integrity }}" crossorigin="anonymous"
|
75 |
+
defer></script>
|
76 |
+
{{- end }}
|
77 |
+
{{- end }}
|
78 |
+
{{- end }}
|
layouts/partials/head/meta.html
ADDED
@@ -0,0 +1,204 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{{ "<!-- meta.html -->" | safeHTML -}}
|
2 |
+
{{- $author := cond (and .IsPage .Params.author) .Params.author site.Params.Author.Name }}
|
3 |
+
{{- $siteTitle := or site.Title site.Params.title | plainify }}
|
4 |
+
{{- $permalink := .Permalink }}
|
5 |
+
{{- $title := cond .IsHome $siteTitle (printf "%s | %s" .Title $siteTitle) | plainify }}
|
6 |
+
{{- $desc := or .Params.Subtitle .Params.Description .Description .Summary }}
|
7 |
+
{{- $siteDesc := or site.Params.description site.Params.subtitle }}
|
8 |
+
{{- if and .IsHome $siteDesc }}
|
9 |
+
{{- $desc = $siteDesc }}
|
10 |
+
{{- else if and (not .IsPage) $siteDesc }}
|
11 |
+
{{- $desc = printf "%s | %s" .Kind $siteTitle }}
|
12 |
+
{{- end }}
|
13 |
+
{{- $desc = $desc | plainify | htmlUnescape | truncate 150 }}
|
14 |
+
{{- $cover := partial "page/cover.html" (dict "page" .) }}
|
15 |
+
{{- if and (not $cover) (not .IsPage) }}
|
16 |
+
{{- $cover = or site.Params.images site.Params.socialCard }}
|
17 |
+
{{- end }}
|
18 |
+
{{- $keywords := dict }}
|
19 |
+
{{- $tag := or .Params.keywords .Params.tags }}
|
20 |
+
{{- if .IsHome }}
|
21 |
+
{{- $keywords = slice (i18n "home") }}
|
22 |
+
{{- else if $tag }}
|
23 |
+
{{- $keywords = $tag }}
|
24 |
+
{{- end }}
|
25 |
+
|
26 |
+
<meta charset="utf-8">
|
27 |
+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
28 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
29 |
+
<title>{{ $title }}</title>
|
30 |
+
<meta name="author" content="{{ $author }}">
|
31 |
+
{{ with $desc -}}
|
32 |
+
<meta name="description" content="{{ . }}" >
|
33 |
+
{{ end -}}
|
34 |
+
{{ with $keywords -}}
|
35 |
+
<meta name="keywords" content="{{ delimit . "," }}">
|
36 |
+
{{ end -}}
|
37 |
+
<link rel="canonical" href="{{ .Permalink }}">
|
38 |
+
{{ with .Translations -}}
|
39 |
+
{{- range . -}}
|
40 |
+
<link rel="alternate" hreflang="{{ .Language.Lang }}" href="{{ .Permalink }}" title="{{ .Language.LanguageName }}">
|
41 |
+
{{- end }}
|
42 |
+
{{- end }}
|
43 |
+
{{ with .Site.Params.favicon }}
|
44 |
+
<link rel="icon" href="{{ . }}">
|
45 |
+
{{ end }}
|
46 |
+
|
47 |
+
{{- $host := partial "partials/fediverse/instance.html" . }}
|
48 |
+
{{- $user := partial "partials/fediverse/username.html" .}}
|
49 |
+
{{ if and $host $user }}
|
50 |
+
<link rel="me" href="{{ print "https://" $host "/@" $user }}">
|
51 |
+
{{ end }}
|
52 |
+
|
53 |
+
{{- $ISO8601 := "2006-01-02T15:04:05-07:00" }}
|
54 |
+
{{- $publishDate := .PublishDate.Format $ISO8601 }}
|
55 |
+
{{- $lastMod := .Lastmod.Format $ISO8601 }}
|
56 |
+
|
57 |
+
{{- $extMeta := or site.Params.extMeta site.Params.socialCard.enable }}
|
58 |
+
{{- if or $extMeta site.Params.socialCard.twitter }}
|
59 |
+
{{ template "twitterCard" (dict "page" . "title" $title "desc" $desc "cover" $cover) }}
|
60 |
+
{{- end }}
|
61 |
+
|
62 |
+
{{- if or $extMeta site.Params.socialCard.opengraph }}
|
63 |
+
{{ template "openGraph" (dict "page" . "siteTitle" $siteTitle "author" $author "title" $title "desc" $desc "cover" $cover "keywords" $keywords "publishDate" $publishDate "lastMod" $lastMod) }}
|
64 |
+
{{- end }}
|
65 |
+
|
66 |
+
{{- if site.Params.socialCard.schema }}
|
67 |
+
{{/* no HTMl props at the moment */}}
|
68 |
+
{{- template "schema" (dict "page" . "title" $title "desc" $desc "cover" $cover "keywords" $keywords) }}
|
69 |
+
{{- end }}
|
70 |
+
|
71 |
+
{{- if site.Params.socialCard.jsonLD }}
|
72 |
+
{{/* permalink needs workaround */}}
|
73 |
+
{{- template "jsonLD" (dict "page" . "siteTitle" $siteTitle "permalink" $permalink "author" $author "title" $title "desc" $desc "cover" $cover "keywords" $keywords "publishDate" $publishDate "lastMod" $lastMod) }}
|
74 |
+
{{- end }}
|
75 |
+
|
76 |
+
{{- /*---------------------- end of meta.html ----------------------*/}}
|
77 |
+
|
78 |
+
{{- define "openGraph" }}
|
79 |
+
{{ "<!-- openGraph -->" | safeHTML -}}
|
80 |
+
{{- $ISO8601 := "2006-01-02T15:04:05-07:00" }}
|
81 |
+
{{- $facebookAdmin := site.Params.socialCard.facebookAdmin }}
|
82 |
+
{{- $facebookAppID := site.Params.socialCard.facebookAppID }}
|
83 |
+
<meta property="og:title" content="{{ .title }}" />
|
84 |
+
<meta property="og:description" content="{{ .desc }}" />
|
85 |
+
<meta property="og:type" content="{{ if .page.IsPage }}article{{ else }}website{{ end }}" />
|
86 |
+
<meta property="og:url" content="{{ .page.Permalink }}" />
|
87 |
+
{{- with .cover }}
|
88 |
+
<meta property="og:image" content="{{ . }}" />
|
89 |
+
{{- end }}
|
90 |
+
<meta property="og:site_name" content="{{ .siteTitle }}" />
|
91 |
+
{{- if .IsPage -}}
|
92 |
+
<meta property="article:author" content="{{ .author }}" />
|
93 |
+
{{- with .publishDate }}
|
94 |
+
<meta property="article:published_time" content="{{ . }}" />
|
95 |
+
{{- end }}
|
96 |
+
{{ with .lastMod }}
|
97 |
+
<meta property="article:modified_time" content="{{ . }}" />
|
98 |
+
{{- end }}
|
99 |
+
{{- with .keywords }}
|
100 |
+
<meta property="article:tags" content="{{ delimit . ", " }}" />
|
101 |
+
{{- end }}
|
102 |
+
{{- with site.RegularPages.Related . | first 5 }}
|
103 |
+
{{- range . }}
|
104 |
+
{{- if ne $ . }}
|
105 |
+
<meta property="og:see_also" content="{{ .Permalink }}">
|
106 |
+
{{- end }}
|
107 |
+
{{- end }}
|
108 |
+
{{- end }}
|
109 |
+
{{- end }}
|
110 |
+
{{- end }}
|
111 |
+
|
112 |
+
{{- define "twitterCard" }}
|
113 |
+
{{ "<!-- twitterCard -->" | safeHTML -}}
|
114 |
+
{{ $twitterCreator := site.Params.socialCard.twitterCreator }}
|
115 |
+
{{ $twitterSite := site.Params.socialCard.twitterSite }}
|
116 |
+
<meta name="twitter:card" content="{{ if .cover }}summary_large_image{{ else }}summary{{ end }}" />
|
117 |
+
<meta name="twitter:title" content="{{ .title }}" />
|
118 |
+
<meta name="twitter:description" content="{{ .desc }}" />
|
119 |
+
{{- with .cover }}
|
120 |
+
<meta name="twitter:image" content="{{ . }}" />
|
121 |
+
{{- end }}
|
122 |
+
{{- with $twitterSite }}
|
123 |
+
<meta name="twitter:site" content="@{{ . }}" />
|
124 |
+
{{- end }}
|
125 |
+
{{- with $twitterCreator }}
|
126 |
+
<meta name="twitter:creator" content="@{{ . }}" />
|
127 |
+
{{- end }}
|
128 |
+
{{- end }}
|
129 |
+
|
130 |
+
{{- define "schema" }}
|
131 |
+
{{ "<!-- schema -->" | safeHTML -}}
|
132 |
+
{{- with .title }}
|
133 |
+
<meta itemprop="name" content="{{ . }}">
|
134 |
+
{{- end }}
|
135 |
+
{{- with .desc }}
|
136 |
+
<meta itemprop="description" content="{{ trim . "\n\r\t " }}">
|
137 |
+
{{- end }}
|
138 |
+
{{- with .PublishDate }}
|
139 |
+
<meta itemprop="datePublished" content="{{ . }}">
|
140 |
+
{{- end }}
|
141 |
+
{{- with .Lastmod }}
|
142 |
+
<meta itemprop="dateModified" content="{{ . }}">
|
143 |
+
{{- end }}
|
144 |
+
{{- with .page.WordCount }}
|
145 |
+
<meta itemprop="wordCount" content="{{ . }}">
|
146 |
+
{{- end }}
|
147 |
+
{{- with .cover }}
|
148 |
+
<meta itemprop="image" content="{{ . }}">
|
149 |
+
{{- end }}
|
150 |
+
{{- with .keywords }}
|
151 |
+
<meta itemprop="keywords" content="{{ delimit . `,` }}">
|
152 |
+
{{- end -}}
|
153 |
+
{{- end }}
|
154 |
+
|
155 |
+
{{- define "jsonLD" }}
|
156 |
+
{{ "<!-- jsonLD -->" | safeHTML -}}
|
157 |
+
<script type="application/ld+json">
|
158 |
+
{
|
159 |
+
"@context": "https://schema.org",
|
160 |
+
"@type": "Article",
|
161 |
+
"mainEntityOfPage": {
|
162 |
+
"@type": "WebPage",
|
163 |
+
"@id": "{{ .Permalink | safeURL }}"
|
164 |
+
},
|
165 |
+
"headline": "{{ .title }}",
|
166 |
+
{{- with .desc }}
|
167 |
+
"description": "{{ . }}",
|
168 |
+
{{- end }}
|
169 |
+
{{- with .cover }}
|
170 |
+
"image": "{{ . }}",
|
171 |
+
{{- end }}
|
172 |
+
{{- with .PublishDate }}
|
173 |
+
"datePublished": "{{ . }}",
|
174 |
+
{{- end }}
|
175 |
+
{{- with .Lastmod }}
|
176 |
+
"dateModified": "{{ . }}",
|
177 |
+
{{- end }}
|
178 |
+
{{- with .author }}
|
179 |
+
"author": {
|
180 |
+
"@type": "Person",
|
181 |
+
"name": "{{ . }}"
|
182 |
+
},
|
183 |
+
{{- end }}
|
184 |
+
{{- with .page.GetTerms "author" }}
|
185 |
+
{{ range . }}
|
186 |
+
"author": {
|
187 |
+
"@type": "Person",
|
188 |
+
"name": "{{ humanize .LinkTitle | title }}"
|
189 |
+
},
|
190 |
+
{{- end }}
|
191 |
+
{{- end }}
|
192 |
+
"publisher": {
|
193 |
+
"@type": "Organization",
|
194 |
+
"name": "{{ .siteTitle }}",
|
195 |
+
{{- with site.Params.logo.logomark }}
|
196 |
+
"logo": {
|
197 |
+
"@type": "ImageObject",
|
198 |
+
"url": "{{ . | absURL }}"
|
199 |
+
}
|
200 |
+
{{- end }}
|
201 |
+
}
|
202 |
+
}
|
203 |
+
</script>
|
204 |
+
{{- end }}
|
layouts/partials/header.html
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{{ "<!-- header.html -->" | safeHTML }}
|
2 |
+
<header class="pagewidth">
|
3 |
+
<div id="background-header" class="background" aria-hidden="true"></div>
|
4 |
+
{{/*
|
5 |
+
|
6 |
+
skipper/bypass block [KB] */}}
|
7 |
+
<nav aria-label="{{ i18n "bypass" }}">
|
8 |
+
{{- $content := "content" }}
|
9 |
+
{{- if not .IsPage }}
|
10 |
+
{{- $content = "list-posts" }}
|
11 |
+
{{- end }}
|
12 |
+
<a id="to-content" class="underline" href="{{ printf "#%s" $content }}" aria-label="{{ i18n "toContent" }}">
|
13 |
+
<span>{{ i18n "toContent" }}</span>
|
14 |
+
<kbd class="key" aria-hidden="true">c</kbd>
|
15 |
+
<span class="screening" aria-hidden="true"></span>
|
16 |
+
</a>
|
17 |
+
</nav>
|
18 |
+
{{/*
|
19 |
+
|
20 |
+
site banner */}}
|
21 |
+
{{- $logoMark := site.Params.logo.logoMark }}
|
22 |
+
{{- $logoType := site.Params.logo.logoType }}
|
23 |
+
{{- $siteTitle := or site.Title site.Params.Title }}
|
24 |
+
{{- if or $logoType $logoMark }}
|
25 |
+
<a id="logo" href="{{ absLangURL "" }}" aria-label="{{ $siteTitle }}">
|
26 |
+
{{- with site.Params.logo.logoMarkDark }}
|
27 |
+
<img id="logomark--dark" src="{{ . }}" alt="{{ $siteTitle }}" />
|
28 |
+
{{- end }}
|
29 |
+
{{- with $logoMark }}
|
30 |
+
<img id="logomark" src="{{ . }}" alt="{{ $siteTitle }}" />
|
31 |
+
{{- end }}
|
32 |
+
{{- if or $logoType (not $logoMark) }}
|
33 |
+
{{ partialCached "header/logotype.html" . }}
|
34 |
+
{{- end }}
|
35 |
+
</a>
|
36 |
+
{{- end }}
|
37 |
+
{{/*
|
38 |
+
|
39 |
+
top nav */}}
|
40 |
+
<details class="presentation" id="top-nav">
|
41 |
+
<summary class="on-deck">
|
42 |
+
<span class="t t2">{{ i18n "nav" }}</span>
|
43 |
+
<span class="menu-icon" role="presentation"></span>
|
44 |
+
</summary>
|
45 |
+
<nav tabindex="-1" aria-label="{{ i18n "top-nav" }}">
|
46 |
+
{{ partial "menu.html" (dict "menuID" "main" "open" "open" "page" .) }}
|
47 |
+
{{ if site.Params.search.enable }}{{ partialCached "search.html" . }}{{ end }}
|
48 |
+
{{ partial "menu.html" (dict "menuID" "more" "page" .) }}
|
49 |
+
{{ partialCached "i18n.html" . }}
|
50 |
+
</nav>
|
51 |
+
<div id="top-nav-screen" class="screening js-cpn" role="presentation" aria-hidden="true"></div>
|
52 |
+
</details>
|
53 |
+
</header>
|
54 |
+
{{- /*--------------------- end of header.html ---------------------*/}}
|
55 |
+
|
56 |
+
{{- define "partials/main/header.html" -}}
|
57 |
+
{{ "<!-- main/header.html -->" | safeHTML }}
|
58 |
+
{{- if not .IsHome }}
|
59 |
+
<header class="pagewidth">
|
60 |
+
{{/*
|
61 |
+
|
62 |
+
action menu */}}
|
63 |
+
{{ partial "nav/menu.html" . }}
|
64 |
+
{{/*
|
65 |
+
|
66 |
+
breadcrumb */}}
|
67 |
+
{{- $minVersion := index ( split hugo.Version "." ) 1 }}
|
68 |
+
{{- if lt $minVersion 109 }}
|
69 |
+
{{ partial "legacy/breadcrumb.html" . }}
|
70 |
+
{{- else }}
|
71 |
+
{{ partial "nav.html" ( dict "navID" "breadcrumb" "page" . )}}
|
72 |
+
{{- end }}
|
73 |
+
</header>
|
74 |
+
{{- end }}
|
75 |
+
{{- end }}
|
76 |
+
|
77 |
+
{{- define "partials/header/logotype.html" -}}
|
78 |
+
{{ "<!-- logotype.html -->" | safeHTML }}
|
79 |
+
{{- $siteTitle := or site.Title site.Params.Title }}
|
80 |
+
{{- with $siteTitle -}}
|
81 |
+
{{- $estimatedWidth := printf "%dpt" (mul (len . ) 28) -}}
|
82 |
+
<svg id="logotype" xmlns="http://www.w3.org/2000/svg" version="1.1" width="{{ $estimatedWidth }}">
|
83 |
+
<text id="logotype__text" y="19.5pt" x="0">{{ . }}</text>
|
84 |
+
</svg>
|
85 |
+
{{- end }}
|
86 |
+
{{- end }}
|
layouts/partials/i18n.html
ADDED
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{{ "<!-- i18n.html -->" | safeHTML }}
|
2 |
+
{{- $IsMultilingual := hugo.IsMultilingual }}
|
3 |
+
{{- $minVersion := index ( split hugo.Version "." ) 1 }}
|
4 |
+
{{- if lt $minVersion 124 }}
|
5 |
+
{{- $IsMultilingual = site.IsMultiLingual }}
|
6 |
+
{{- end }}
|
7 |
+
{{ $flagSrc := "https://raw.githubusercontent.com/lipis/flag-icons/c95b262e5ee2366cad4c5aecc4a5ad86220c9ab9/flags/4x3/" }}
|
8 |
+
{{- if $IsMultilingual }}
|
9 |
+
{{- $bilingual := eq (where $.Site.Home.AllTranslations ".Language.disabled" "ne" true | len ) 2 }}
|
10 |
+
{{- if $bilingual }}
|
11 |
+
{{- range where $.Site.Home.AllTranslations "Lang" "ne" $.Lang }}
|
12 |
+
{{- $act639 := index (split $.Language.LanguageCode "-") 0 | upper }}
|
13 |
+
{{- $alt639 := index (split .Language.LanguageCode "-") 0 | upper }}
|
14 |
+
{{- $alt3166 := index (split .Language.LanguageCode "-") 1 | lower }}
|
15 |
+
{{- $name := .Language.LanguageName }}
|
16 |
+
<a id="has-i18n" class="on-deck"
|
17 |
+
href="{{ .Permalink }}" title="{{ i18n "switchLangTo" }}{{ $name }}"
|
18 |
+
aria-label="{{ $name }}"
|
19 |
+
>
|
20 |
+
<img
|
21 |
+
src="{{ printf "%s%s.svg" $flagSrc $alt3166 }}" alt=""
|
22 |
+
width="64" height="48"
|
23 |
+
aria-hidden="true"
|
24 |
+
>
|
25 |
+
<span class="act iso639" aria-hidden="true">{{ $act639 }}</span>
|
26 |
+
<span class="alt iso639" aria-hidden="true">{{ $alt639 }}</span>
|
27 |
+
<span class="t t2">{{ $name }}</span>
|
28 |
+
</a>
|
29 |
+
{{- end }}
|
30 |
+
{{- else }}
|
31 |
+
<details id="has-i18n" class="presentation js-details" name="on-deck">
|
32 |
+
<summary class="anchor on-deck" aria-label="{{ i18n "selectLang" }}">
|
33 |
+
{{ with $.Language }}
|
34 |
+
{{- $iso639 := index (split .LanguageCode "-") 0 | upper }}
|
35 |
+
{{- $iso3166 := index (split .LanguageCode "-") 1 | lower }}
|
36 |
+
<img
|
37 |
+
src="{{ printf "%s%s.svg" $flagSrc $iso3166 }}" alt=""
|
38 |
+
width="64" height="48"
|
39 |
+
loading="lazy"
|
40 |
+
>
|
41 |
+
<span class="iso639" aria-hidden="true">{{ $iso639 }}</span>
|
42 |
+
<span class="languangeName">{{ .LanguageName }}</span>
|
43 |
+
{{ end }}
|
44 |
+
</summary>
|
45 |
+
|
46 |
+
{{ "<!-- on hull -->" | safeHTML }}
|
47 |
+
<nav id="i18n-menu" aria-label="{{ i18n "selectLang" }}">
|
48 |
+
<ul class="on-plank">
|
49 |
+
{{- range where $.Site.Home.AllTranslations "Lang" "ne" $.Lang }}
|
50 |
+
<li>
|
51 |
+
{{- $iso3166 := index (split .Language.LanguageCode "-") 1 | lower }}
|
52 |
+
<a href="{{ .Permalink }}" aria-label="{{ printf "Change language to %s" .Language.LanguageName }}">
|
53 |
+
<img
|
54 |
+
src="{{ printf "%s%s.svg" $flagSrc $iso3166 }}" alt=""
|
55 |
+
width="64" height="48"
|
56 |
+
aria-hidden="true"
|
57 |
+
loading="lazy"
|
58 |
+
>
|
59 |
+
<span>{{ .Language.LanguageName }}</span>
|
60 |
+
</a>
|
61 |
+
</li>
|
62 |
+
{{- end }}
|
63 |
+
</ul>
|
64 |
+
<div class="screening js-cgpn" role="presentation" aria-hidden="true"></div>
|
65 |
+
</nav>
|
66 |
+
</details>
|
67 |
+
{{- end }}
|
68 |
+
{{- end }}
|
69 |
+
{{/*----------------------- end of i18n.html -----------------------*/}}
|
70 |
+
|
71 |
+
{{- define "partials/l10n.html" }}
|
72 |
+
{{ "<!-- l10n.html -->" | safeHTML }}
|
73 |
+
{{- $page := .page }}
|
74 |
+
<details id="has-l10n" class="presentation">
|
75 |
+
<summary aria-label="{{ i18n "selectLang" }}">
|
76 |
+
<span>{{ $page.Lang | upper }}</span>
|
77 |
+
</summary>
|
78 |
+
<ul class="on-plank" role="presentation">
|
79 |
+
{{- range $page.Translations }}
|
80 |
+
{{- $iso3166 := index (split .Language.LanguageCode "-") 1 | lower }}
|
81 |
+
<li>
|
82 |
+
<a href="{{ .RelPermalink }}" aria-label="{{ printf "Change language to %s" .LinkTitle }}">
|
83 |
+
<img
|
84 |
+
src="{{ printf "https://raw.githubusercontent.com/lipis/flag-icons/c95b262e5ee2366cad4c5aecc4a5ad86220c9ab9/flags/4x3/%s.svg" $iso3166 }}" alt=""
|
85 |
+
width="64" height="48"
|
86 |
+
aria-hidden="true"
|
87 |
+
loading="lazy"
|
88 |
+
>
|
89 |
+
<span>{{ .LinkTitle }}</span>
|
90 |
+
</a>
|
91 |
+
</li>
|
92 |
+
{{- end }}
|
93 |
+
</ul>
|
94 |
+
</details>
|
95 |
+
{{- end }}
|
layouts/partials/menu.html
ADDED
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{{ "<!-- menu.html -->" | safeHTML }}
|
2 |
+
{{- $menuID := .menuID }}
|
3 |
+
{{- $page := .page }}
|
4 |
+
{{- $open := .open }}
|
5 |
+
{{- $more := eq $menuID "more" }}
|
6 |
+
{{- if eq $menuID "footer" }}
|
7 |
+
{{- with index site.Menus "footer" }}
|
8 |
+
<nav id="menu-footer" class="has-aria-label-top" aria-label="{{ i18n "keepInTouch" }}">
|
9 |
+
<ul role="presentation">
|
10 |
+
{{- range . }}
|
11 |
+
{{- $label := or .Name .Pre }}
|
12 |
+
<li><a href="{{ .URL }}" aria-label="{{ $label }}">
|
13 |
+
{{- with .Pre }}
|
14 |
+
<i class="icon {{ . }}" role="presentation" aria-hidden="true"></i>
|
15 |
+
<span class="t" role="tooltip">{{ $label }}</span>
|
16 |
+
{{- end }}
|
17 |
+
</a>
|
18 |
+
</li>
|
19 |
+
{{- end }}
|
20 |
+
</ul>
|
21 |
+
</nav>
|
22 |
+
{{- end }}
|
23 |
+
{{- else if index site.Menus $menuID }}
|
24 |
+
<details id="{{ printf "has-%s-menu" $menuID }}" {{ if $more }}class="presentation js-details" name="on-deck"{{ else }}class="presentation"{{ end }} {{ $open | safeHTMLAttr -}}>
|
25 |
+
<summary {{ if $more }} accesskey="=" class="on-deck" {{ else }} class="hide" {{ end }} aria-label="{{ i18n $menuID }}">
|
26 |
+
{{ if $more -}}
|
27 |
+
<span class="t t2">{{ i18n $menuID }}</span>
|
28 |
+
<span class="menu-icon" role="presentation"></span>
|
29 |
+
{{- else -}}
|
30 |
+
<span>{{ i18n $menuID }}</span>
|
31 |
+
{{- end }}
|
32 |
+
</summary>
|
33 |
+
{{- with index site.Menus $menuID }}
|
34 |
+
{{ if $more }}{{ "<!-- on hull -->" | safeHTML }}{{ end }}
|
35 |
+
<nav id="{{ printf "%s-menu" $menuID }}" aria-label="{{ i18n $menuID }}">
|
36 |
+
{{- $n := 1 }}
|
37 |
+
{{- $no := printf "l%d" $n }}
|
38 |
+
<ul class="{{ $no }} {{ if $more }} on-plank {{ end }}" role="presentation" tabindex="-1" >
|
39 |
+
{{ partial "inline/menu/walk.html" (dict "page" $page "menuID" $menuID "n" $n "menuEntries" .) }}
|
40 |
+
</ul>
|
41 |
+
{{- if $more }}
|
42 |
+
<div class="screening js-cgpn" role="presentation" aria-hidden="true"></div>
|
43 |
+
{{- end }}
|
44 |
+
</nav>
|
45 |
+
{{- end }}
|
46 |
+
</details>
|
47 |
+
{{- end }}
|
48 |
+
|
49 |
+
{{- /*---------------------- end of menu.html ----------------------*/}}
|
50 |
+
|
51 |
+
{{- define "partials/inline/menu/walk.html" -}}
|
52 |
+
{{- $page := .page }}
|
53 |
+
{{- $menuID := .menuID }}
|
54 |
+
{{- $open := .open }}
|
55 |
+
{{- $main := eq $menuID "main" }}
|
56 |
+
{{- $n := .n }}
|
57 |
+
{{- $n = add $n 1 }}
|
58 |
+
{{- $l := printf "l%d" $n }}
|
59 |
+
{{- $deck := and $main (eq $n 2) }}
|
60 |
+
{{ range .menuEntries -}}
|
61 |
+
{{- $name := .Name }}
|
62 |
+
{{- $attrs := dict "href" .URL }}
|
63 |
+
{{- if $page.IsMenuCurrent .Menu . }}
|
64 |
+
{{- $attrs = merge $attrs (dict "aria-current" "page") }}
|
65 |
+
{{- else if $page.HasMenuCurrent .Menu . }}
|
66 |
+
{{- $attrs = merge $attrs (dict "aria-current" "true") }}
|
67 |
+
{{- end }}
|
68 |
+
{{- $desc := .Post }}
|
69 |
+
{{- if $deck }}
|
70 |
+
{{- $attrs = merge $attrs (dict "class" "on-deck") }}
|
71 |
+
{{- else if $desc }}
|
72 |
+
{{- $attrs = merge $attrs (dict "class" "has-desc") }}
|
73 |
+
{{- end }}
|
74 |
+
{{- $icon := .Pre }}
|
75 |
+
{{- with $icon }}
|
76 |
+
{{- $attrs = merge $attrs (dict "title" . "aria-label" .) }}
|
77 |
+
{{- end }}
|
78 |
+
{{- $identifier := .Identifier }}
|
79 |
+
<li role="presentation">
|
80 |
+
{{- if .Children }}
|
81 |
+
{{- template "menuItemWithChildren" dict "item" . "attrs" $attrs "icon" $icon "name" $name "desc" $desc "deck" $deck "menuID" $menuID "open" $open "l" $l "n" $n "page" $page }}
|
82 |
+
{{- else }}
|
83 |
+
{{- template "menuItem" dict "attrs" $attrs "name" $name "desc" $desc "icon" $icon "identifier" $identifier }}
|
84 |
+
{{- end }}
|
85 |
+
</li>
|
86 |
+
{{- end }}
|
87 |
+
{{- end }}
|
88 |
+
|
89 |
+
{{- define "menuItem" }}
|
90 |
+
<a {{ range $key, $val := .attrs }}
|
91 |
+
{{- with $val }}
|
92 |
+
{{- printf " %s=%s" $key $val | safeHTMLAttr }}
|
93 |
+
{{- end }}
|
94 |
+
{{- end }}
|
95 |
+
{{ with .desc }} aria-description="{{ . }}" {{ end }}>
|
96 |
+
{{ if not .name }}
|
97 |
+
{{- $tooltip := .identifier }}
|
98 |
+
<span class="t" role="tooltip">{{ title $tooltip }}</span>
|
99 |
+
{{- end }}
|
100 |
+
{{- with .icon -}}
|
101 |
+
<i class="icon {{ . }}" aria-hidden="true"></i>
|
102 |
+
{{- end }}
|
103 |
+
{{- with .name }}
|
104 |
+
<span>{{ . }}</span>
|
105 |
+
{{- end }}
|
106 |
+
</a>
|
107 |
+
{{- end }}
|
108 |
+
|
109 |
+
{{- define "menuItemWithChildren" }}
|
110 |
+
<details class="presentation js-details" aria-expanded="true"
|
111 |
+
{{ if .deck }}name="on-deck"{{ end }}
|
112 |
+
{{- if eq .menuID "more" }} open {{ else }} {{ .open | safeHTMLAttr }} {{ end }}>
|
113 |
+
<summary class="anchor {{ if .deck }} on-deck {{ end }}">
|
114 |
+
{{ with .icon }}<i class="icon {{ . }}" aria-hidden="true"></i>{{ end }}
|
115 |
+
<span {{ with .desc }} class="has-desc" aria-description="{{ . }}" {{ end }}>
|
116 |
+
{{- .name -}}
|
117 |
+
</span>
|
118 |
+
</summary>
|
119 |
+
<ul class="{{ .l }} {{ if .deck }} on-plank {{ end }}" role="presentation">
|
120 |
+
{{ partial "inline/menu/walk.html" (dict "page" .page "n" .n "menuEntries" .item.Children) }}
|
121 |
+
{{- range $key, $val := .attrs }}
|
122 |
+
{{- if eq $key "href" }}
|
123 |
+
<li class="parent-anchor">
|
124 |
+
<a {{- printf " %s=%s" $key $val | safeHTMLAttr }} aria-label="{{ i18n "seeAll" }}:{{ $.name }}">
|
125 |
+
{{ with $.icon }}<i class="icon {{- . }}" aria-hidden="true"></i>{{ end }}
|
126 |
+
<span aria-hidden="true"> {{ $.name }}</span>
|
127 |
+
</a>
|
128 |
+
</li>
|
129 |
+
{{- end }}
|
130 |
+
{{- end }}
|
131 |
+
</ul>
|
132 |
+
{{- if .deck -}}
|
133 |
+
<div class="screening js-cpn" role="presentation" aria-hidden="true"></div>
|
134 |
+
{{- end }}
|
135 |
+
</details>
|
136 |
+
{{- end }}
|
layouts/partials/nav.html
ADDED
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{{ "<!-- nav.html -->" | safeHTML }}
|
2 |
+
{{- $navID := .navID }}
|
3 |
+
{{- $page := .page }}
|
4 |
+
{{- $toc := eq $navID "TableOfContents" }}
|
5 |
+
<details class="presentation" aria-expanded="true" id="{{ printf "has-%s" $navID }}" open>
|
6 |
+
<summary id="{{ $navID }}" tabindex="-1">
|
7 |
+
<span>{{ i18n $navID }}</span>
|
8 |
+
</summary>
|
9 |
+
{{- if $toc }}
|
10 |
+
{{- replace
|
11 |
+
(replace $page.TableOfContents
|
12 |
+
"TableOfContents" "doc-toc")
|
13 |
+
"id" "data-pagefind-body role"
|
14 |
+
| safeHTML }}
|
15 |
+
{{- else }}
|
16 |
+
<nav aria-labelledby="{{ $navID }}">
|
17 |
+
<ul role="presentation" class="{{ $navID }}">
|
18 |
+
{{- if eq $navID "breadcrumb" }}
|
19 |
+
{{ partial "nav/breadcrumb.html" ( dict "page" $page ) }}
|
20 |
+
{{- else if eq $navID "pagination"}}
|
21 |
+
{{ partial "nav/paginator.html" ( dict "page" $page ) }}
|
22 |
+
{{- else if eq $navID "share" }}
|
23 |
+
{{ partial "nav/share.html" ( dict "page" $page ) }}
|
24 |
+
{{- end }}
|
25 |
+
</ul>
|
26 |
+
</nav>
|
27 |
+
{{- end }}
|
28 |
+
</details>
|
29 |
+
{{- /*---------------------- end of nav.html -----------------------*/}}
|
30 |
+
|
31 |
+
{{- define "partials/nav/breadcrumb.html" -}}
|
32 |
+
{{ "<!-- breadcrumb.html -->" | safeHTML }}
|
33 |
+
{{- $page := .page }}
|
34 |
+
{{- if $page.IsTranslated }}
|
35 |
+
<li id="is-translated">
|
36 |
+
{{ partial "l10n.html" ( dict "page" $page ) }}
|
37 |
+
</li>
|
38 |
+
{{- end }}
|
39 |
+
{{- range $page.Ancestors.Reverse }}
|
40 |
+
{{- if not .IsHome }}
|
41 |
+
<li>
|
42 |
+
<a href="{{ .Permalink }}" aria-current="true">
|
43 |
+
{{- .Title }}
|
44 |
+
</a>
|
45 |
+
</li>
|
46 |
+
{{- end }}
|
47 |
+
{{- end }}
|
48 |
+
<li>
|
49 |
+
<a href="{{ .Permalink }}" aria-current="page" tabindex="-1">
|
50 |
+
{{- $page.Title }}
|
51 |
+
</a>
|
52 |
+
</li>
|
53 |
+
{{- end }}
|
54 |
+
|
55 |
+
{{- define "partials/legacy/breadcrumb.html" -}}
|
56 |
+
{{ "<!-- legacy/breadcrumb.html -->" | safeHTML }}
|
57 |
+
<details id="has-breadcrumb" class="presentation" aria-expanded="true" open>
|
58 |
+
<summary id="breadcrumb" tabindex="-1">
|
59 |
+
<span>{{- i18n "breadcrumb"}}</span>
|
60 |
+
</summary>
|
61 |
+
{{ partial "breadcrumb/menu.html" . }}
|
62 |
+
<nav aria-labelledby="breadcrumb">
|
63 |
+
<ul class="breadcrumb ldots" role="presentation">
|
64 |
+
{{- if .IsTranslated -}}
|
65 |
+
<li id="is-translated">
|
66 |
+
{{ partial "l10n.html" ( dict "page" . ) }}
|
67 |
+
</li>
|
68 |
+
{{- end }}
|
69 |
+
{{ partial "legacy/breadcrumb/loop.html" . }}
|
70 |
+
<li>
|
71 |
+
<a href="{{ .Permalink }}" aria-current="page" tabindex="-1">
|
72 |
+
<span>{- .Title }}</span>
|
73 |
+
</a>
|
74 |
+
</li>
|
75 |
+
</ul>
|
76 |
+
</nav>
|
77 |
+
</details>
|
78 |
+
{{- end }}
|
79 |
+
|
80 |
+
{{- define "partials/legacy/breadcrumb/loop.html" -}}
|
81 |
+
{{ "<!-- legacy/breadcrumb/loop.html -->" | safeHTML }}
|
82 |
+
{{- with .Parent }}
|
83 |
+
{{ partial "legacy/breadcrumb/loop.html" . }}
|
84 |
+
{{- if not .IsHome }}
|
85 |
+
<li>
|
86 |
+
<a href="{{ .Permalink }}" aria-current="true">
|
87 |
+
<span>{{ .Title }}</span>
|
88 |
+
</a>
|
89 |
+
</li>
|
90 |
+
{{- end }}
|
91 |
+
{{- end }}
|
92 |
+
{{- end }}
|
93 |
+
|
94 |
+
{{- define "partials/nav/menu.html" -}}
|
95 |
+
{{ "<!-- menu.html -->" | safeHTML }}
|
96 |
+
<menu role="presentation">
|
97 |
+
<li>
|
98 |
+
<a id="print-button" class="hide" href="javascript:window.print()" title="{{ i18n "print" }}" role="button" aria-label="{{ i18n "print" }}">
|
99 |
+
<span class="t" role="tooltip">{{ i18n "print" }}</span>
|
100 |
+
</a>
|
101 |
+
</li>
|
102 |
+
<li>
|
103 |
+
<a id="navigatorShare" href="{{ if .IsPage }}#share{{ else }}javascript:navigator.share({title: document.title, url: window.location.href}){{ end }}" title="{{ i18n "share" }}" role="button" aria-label="{{ i18n "share" }}">
|
104 |
+
<span class="t" role="tooltip">{{ i18n "share" }}</span>
|
105 |
+
</a>
|
106 |
+
</li>
|
107 |
+
<li>
|
108 |
+
<a id="copyPermalink" class="hide" href="javascript:navigator.clipboard.writeText(window.location.href)" title="{{ i18n "copy" }}" role="button" aria-label="{{ i18n "copy" }}">
|
109 |
+
<span class="t" role="tooltip">{{ i18n "copy" }}</span>
|
110 |
+
</a>
|
111 |
+
</li>
|
112 |
+
{{- if and (eq .Kind "term" ) (eq .Data.Plural "series") -}}
|
113 |
+
{{- with .OutputFormats.Get "rss" }}
|
114 |
+
<li>
|
115 |
+
<a id="rss-button" href="{{ .Permalink }}" title="{{ i18n "followRSS" }}" role="button" aria-label="{{ i18n "followRSS" }}">
|
116 |
+
<span class="t" role="tooltip">{{ i18n "followRSS" }}</span>
|
117 |
+
</a>
|
118 |
+
</li>
|
119 |
+
{{- end }}
|
120 |
+
{{- end }}
|
121 |
+
</menu>
|
122 |
+
<button id="back" class="hide" type="button" onclick="history.back();" aria-label="{{ i18n "back" }}">
|
123 |
+
<span class="t" role="tooltip">{{ i18n "back" }}</span>
|
124 |
+
</button>
|
125 |
+
{{- end }}
|
126 |
+
|
127 |
+
{{- define "partials/nav/paginator.html" -}}
|
128 |
+
{{ "<!-- paginator.html -->" | safeHTML }}
|
129 |
+
{{- $page := .page }}
|
130 |
+
{{- if $page.Paginator.HasPrev }}
|
131 |
+
<li class="rfill">
|
132 |
+
<a class="underline" href="{{ $page.Paginator.Prev.URL }}" rel="prev">
|
133 |
+
<span>{{- i18n "prev" }}</span>
|
134 |
+
</a>
|
135 |
+
</li>
|
136 |
+
{{- end }}
|
137 |
+
{{- if $page.Paginator.HasNext }}
|
138 |
+
<li class="lfill">
|
139 |
+
<a class="underline" href="{{ $page.Paginator.Next.URL }}" rel="next">
|
140 |
+
<span>{{- i18n "next" }}</span>
|
141 |
+
</a>
|
142 |
+
</li>
|
143 |
+
{{- end }}
|
144 |
+
{{- end }}
|
145 |
+
|
146 |
+
{{- define "partials/nav/share/mastodon.html" -}}
|
147 |
+
{{ "<!-- mastodon.html -->" | safeHTML }}
|
148 |
+
{{- $page := .page }}
|
149 |
+
<form class="form" id="mastodon" action="//sharetomastodon.github.io/" target="_blank" rel="noopener noreferrer">
|
150 |
+
<input id="mastodonTitle" type="hidden" name="title" value="{{ $page.Title }}">
|
151 |
+
<input id="mastodonPermalink" type="hidden" name="url" value="{{ $page.Permalink }}">
|
152 |
+
<input id="mastodonText" type="hidden" name="text" value="{{ $page.Title }} {{ $page.Permalink }}" disabled>
|
153 |
+
<input id="mastodonInstance" type="url" class="ldots form__input" placeholder="Enter Mastodon instance (https://www.example.com)" aria-label="Mastodon instance URL">
|
154 |
+
<button class="form__button" type="submit" aria-label="{{ i18n "shareOn" }} Mastodon">
|
155 |
+
<i class="icon mastodon" aria-hidden="true"></i>
|
156 |
+
<span class="t" role="tooltip">{{ i18n "shareOn" }} Mastodon</span>
|
157 |
+
</button>
|
158 |
+
</form>
|
159 |
+
{{- end }}
|
160 |
+
|
161 |
+
{{- define "partials/nav/share.html" -}}
|
162 |
+
{{ "<!-- share.html -->" | safeHTML }}
|
163 |
+
{{- $page := .page }}
|
164 |
+
{{- $shareAttr := `rel="noopener noreferrer" target="_blank"` | safeHTMLAttr }}
|
165 |
+
<li id="has-mastodon">
|
166 |
+
{{ partial "nav/share/mastodon.html" (dict "page" $page ) }}
|
167 |
+
</li>
|
168 |
+
<li>
|
169 |
+
<a href="mailto:?subject={{ $page.Title | htmlEscape }}&body={{ $page.Permalink }}" role="button" aria-label="{{ i18n "shareOn" }} {{ i18n "email"}}">
|
170 |
+
<i class="email" aria-hidden="true"></i>
|
171 |
+
<span class="t" role="tooltip">{{ i18n "shareOn" }} {{ i18n "email" }}</span>
|
172 |
+
</a>
|
173 |
+
</li>
|
174 |
+
<li>
|
175 |
+
<a href="whatsapp://send?text={{ $page.Title | htmlEscape }}%20{{ $page.Permalink }}" role="button" aria-label="{{ i18n "shareOn" }} Whatsapp">
|
176 |
+
<i class="whatsapp" aria-hidden="true"></i>
|
177 |
+
<span class="t" role="tooltip">{{ i18n "shareOn" }} Whatsapp</span>
|
178 |
+
</a>
|
179 |
+
</li>
|
180 |
+
{{- $socialLinks := slice
|
181 |
+
(dict "platform" "telegram" "url" (printf "https://telegram.me/share/url?text=%s&url=%s" ($page.Title | htmlEscape) $page.Permalink))
|
182 |
+
(dict "platform" "bluesky" "url" (printf "https://bsky.app/intent/compose?text=%s&url=%s" ($page.Title | htmlEscape) $page.Permalink))
|
183 |
+
(dict "platform" "facebook" "url" (printf "https://facebook.com/sharer/sharer.php?u=%s" $page.Permalink))
|
184 |
+
(dict "platform" "hackernews" "url" (printf "https://news.ycombinator.com/submitlink?u=%s&t=%s" $page.Permalink ($page.Title | htmlEscape)))
|
185 |
+
(dict "platform" "linkedin" "url" (printf "https://www.linkedin.com/shareArticle?mini=true&url=%s&title=%s&summary=%s&source=%s" $page.Permalink ($page.Title | htmlEscape) ($page.Title | htmlEscape) $page.Permalink))
|
186 |
+
(dict "platform" "pinterest" "url" (printf "https://pinterest.com/pin/create/button/?url=%s&media=%s&description=%s" $page.Permalink $page.Permalink ($page.Title | htmlEscape)))
|
187 |
+
(dict "platform" "reddit" "url" (printf "https://reddit.com/submit/?url=%s&resubmit=true&title=%s" $page.Permalink ($page.Title | htmlEscape)))
|
188 |
+
(dict "platform" "tumblr" "url" (printf "https://www.tumblr.com/widgets/share/tool?posttype=link&title=%s&caption=%s&content=%s&canonicalUrl=%s" ($page.Title | htmlEscape) ($page.Title | htmlEscape) $page.Permalink $page.Permalink))
|
189 |
+
(dict "platform" "vk" "url" (printf "http://vk.com/share.php?title=%s&url=%s" ($page.Title | htmlEscape) $page.Permalink))
|
190 |
+
(dict "platform" "twitter" "url" (printf "https://twitter.com/intent/tweet/?text=%s&url=%s" ($page.Title | htmlEscape) $page.Permalink))
|
191 |
+
(dict "platform" "xing" "url" (printf "https://www.xing.com/app/user?op=share;url=%s;title=%s" $page.Permalink ($page.Title | htmlEscape)))
|
192 |
+
}}
|
193 |
+
{{- range $socialLinks }}
|
194 |
+
<li>
|
195 |
+
<a {{ $shareAttr }} href="{{ .url }}" role="button"
|
196 |
+
aria-label="{{ i18n "shareOn" }} {{ title .platform }} {{ i18n "inNewTab" }}">
|
197 |
+
<i class="{{ .platform }}" aria-hidden="true"></i>
|
198 |
+
<span class="t" role="tooltip">{{ i18n "shareOn" }} {{ title .platform }}</span>
|
199 |
+
</a>
|
200 |
+
</li>
|
201 |
+
{{- end }}
|
202 |
+
{{- end }}
|
layouts/partials/search.html
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{{ "<!-- search.html -->" | safeHTML }}
|
2 |
+
<details id="has-search" class="presentation js-details" name="on-deck">
|
3 |
+
<summary class="on-deck" accesskey="q" aria-keyshortcuts="q">
|
4 |
+
<span class="t t2">{{ i18n "search" }}</span>
|
5 |
+
<kbd class="key" style="display: none;">q</kbd>
|
6 |
+
</summary>
|
7 |
+
{{ if site.Params.search.pagefind }}
|
8 |
+
{{ partialCached "search/pagefind.html" . }}
|
9 |
+
<noscript id="hasDuckDuckGo" class="on-hull">
|
10 |
+
{{ partialCached "search/duckduckgo.html" . }}
|
11 |
+
</noscript>
|
12 |
+
{{ else }}
|
13 |
+
<div id="hasDuckDuckGo" class="on-hull">
|
14 |
+
{{ partialCached "search/duckduckgo.html" . }}
|
15 |
+
</div>
|
16 |
+
{{ end }}
|
17 |
+
</details>
|
18 |
+
{{- /*-------------------- end of search.html ----------------------*/}}
|
19 |
+
|
20 |
+
{{- define "partials/search/duckduckgo.html" }}
|
21 |
+
{{ "<!-- duckduckgo.html -->" | safeHTML }}
|
22 |
+
{{- $site := index (split site.BaseURL "/") 2 }}
|
23 |
+
<form id="duckduckgo" class="form on-plank"
|
24 |
+
name="x" action="//duckduckgo.com/"
|
25 |
+
role="search" aria-label="{{ i18n "searchDuckDuckGo" }}">
|
26 |
+
<input type="hidden" value="{{ $site }}" name="sites"></input>
|
27 |
+
<input type="hidden" value="1" name="kh"></input>
|
28 |
+
<input type="hidden" value="1" name="kn"></input>
|
29 |
+
<input type="hidden" value="1" name="kac"></input>
|
30 |
+
<input class="ldots form__input" type="search" placeholder="{{ i18n "search" }}" name="q"></input>
|
31 |
+
<button class="form__button" type="submit" aria-label="{{ i18n "search" }}">
|
32 |
+
<img src="https://duckduckgo.com/assets/logo_header.v109.svg" alt="" role="presentation" aria-hidden="true">
|
33 |
+
</button>
|
34 |
+
</form>
|
35 |
+
<div role="presentation" class="screening js-cgpn"></div>
|
36 |
+
{{- end }}
|
37 |
+
|
38 |
+
{{- define "partials/search/pagefind.html" -}}
|
39 |
+
{{ "<!-- pagefind.html -->" | safeHTML }}
|
40 |
+
<div id="search" class="on-hull">
|
41 |
+
<div role="presentation" class="screening js-cgpn"></div>
|
42 |
+
</div>
|
43 |
+
<script src="/_pagefind/pagefind-ui.js" type="text/javascript"></script>
|
44 |
+
<script>
|
45 |
+
let pageFindInitialized = false;
|
46 |
+
const initPageFind = function(event) {
|
47 |
+
if (!pageFindInitialized) {
|
48 |
+
new PagefindUI({
|
49 |
+
element: "#search",
|
50 |
+
showImages: false,
|
51 |
+
translations: {
|
52 |
+
placeholder: "{{ i18n "search" }}"
|
53 |
+
}
|
54 |
+
});
|
55 |
+
pageFindInitialized = true;
|
56 |
+
document.removeEventListener('DOMContentLoaded', initPageFind);
|
57 |
+
}
|
58 |
+
};
|
59 |
+
document.addEventListener('DOMContentLoaded', initPageFind);
|
60 |
+
</script>
|
61 |
+
{{- end }}
|
layouts/shortcodes/figure.html
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{{- $type := .Get "type" }}
|
2 |
+
{{- $figID := print "fig-" .Page.File.UniqueID "-" .Ordinal }}
|
3 |
+
{{- if not (eq $type "margin") }}
|
4 |
+
{{- if eq $type "full" }}<figure class="fullwidth">
|
5 |
+
{{- else }}<figure {{ with .Get "class" }} class="{{ . }}"{{ end }}>
|
6 |
+
{{- end }}
|
7 |
+
{{- end }}
|
8 |
+
{{- if eq $type "full" }}
|
9 |
+
{{- with .Get "link" }}<a href="{{ . }}" class="has-img">{{ end }}
|
10 |
+
<img src="{{ .Get "src" }}"
|
11 |
+
{{ with .Get "alt" }}
|
12 |
+
alt=" {{ . }}"
|
13 |
+
title="{{ . }}"
|
14 |
+
{{ end }}
|
15 |
+
aria-describedby="{{ $figID }}"
|
16 |
+
loading="lazy"
|
17 |
+
>
|
18 |
+
{{- if .Get "link" }}</a>{{ end }}
|
19 |
+
<figcaption id="{{ $figID }}">
|
20 |
+
{{- else }}
|
21 |
+
<input id="{{ $figID }}" class="marginpar-ctrl" type="checkbox" aria-controls="the-{{ $figID }}" hidden>
|
22 |
+
<label for="{{ $figID }}"></label>
|
23 |
+
{{- if eq $type "margin" }}
|
24 |
+
<span id="the-{{ $figID }}" class="marginpar">
|
25 |
+
{{- with .Get "link" }}<a href="{{ . }}" class="has-img">
|
26 |
+
{{- end }}
|
27 |
+
<img src="{{ .Get "src" }}" {{ with .Get "alt" }} alt=" {{ . }}" title="{{ . }}" {{ end }} aria-describedby="{{ $figID }}" loading="lazy">
|
28 |
+
{{- if .Get "link" }}</a>{{ end }}
|
29 |
+
{{ else }}
|
30 |
+
<span id="the-{{ $figID }}" class="marginpar">
|
31 |
+
{{- end }}
|
32 |
+
{{- end }}
|
33 |
+
{{ with .Get "title" }}<strong>{{ . }} </strong>{{ end }}
|
34 |
+
{{ with .Get "caption" }}{{ . }}{{ end }}
|
35 |
+
{{ with .Get "attrlink" }}<a href="{{ .}}">{{ end }}
|
36 |
+
{{- with .Get "attr" }}{{ . }}{{ end }}
|
37 |
+
{{- if .Get "attrlink" }}</a>{{ end }}
|
38 |
+
{{- if eq $type "full" }}
|
39 |
+
</figcaption>
|
40 |
+
{{- else }}
|
41 |
+
</span>
|
42 |
+
{{- end }}
|
43 |
+
{{- if and (not (eq $type "full")) (not (eq $type "margin")) }}
|
44 |
+
{{ with .Get "link" }}<a href="{{ . }}" class="has-img">{{ end }}
|
45 |
+
<img src="{{ .Get "src" }}"
|
46 |
+
{{- with .Get "alt" }}
|
47 |
+
alt="{{ . }}"
|
48 |
+
title="{{ . }}"
|
49 |
+
{{- end -}}
|
50 |
+
aria-describedby="{{ $figID }}"
|
51 |
+
loading="lazy"
|
52 |
+
>
|
53 |
+
{{- if .Get "link" }}</a>{{ end }}
|
54 |
+
{{- end }}
|
55 |
+
{{- if not (eq $type "margin") }}
|
56 |
+
</figure>
|
57 |
+
{{- end }}
|
layouts/shortcodes/include.html
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{{- $minVersion := index ( split hugo.Version "." ) 1 }}
|
2 |
+
{{- if lt $minVersion 125 -}}
|
3 |
+
{{- with site.GetPage (.Get 0) }}
|
4 |
+
{{ .RenderShortcodes }}
|
5 |
+
{{- end }}
|
6 |
+
{{- end }}
|
layouts/shortcodes/marginpar.html
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{{- $marginparID := print "marginpar-" .Ordinal }}
|
2 |
+
<input id="{{ $marginparID }}" class="marginpar-ctrl" type="checkbox" aria-label="{{ i18n "marginpar" }}" aria-controls="the-{{ $marginparID }}" hidden>
|
3 |
+
<label for="{{ $marginparID }}" tabindex="0" role="checkbox" aria-label="{{ i18n "marginpar" }}" aria-controls="the-{{ $marginparID }}" aria-expanded="undefined"></label>
|
4 |
+
<span id="the-{{ $marginparID }}" class="marginpar" role="note">{{ .Inner | markdownify }}</span>
|
layouts/shortcodes/pin.html
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{{- $var := .Get 0 }}
|
2 |
+
{{- $pinID := print "pin-" .Page.File.UniqueID "-" .Ordinal }}
|
3 |
+
{{- $url := .Get "url" }}
|
4 |
+
{{- $label := .Get "label" }}
|
5 |
+
{{- $img := .Get "img" }}
|
6 |
+
{{- $alt := .Get "alt" }}
|
7 |
+
{{- if .IsNamedParams }}
|
8 |
+
{{- if .Get "quote" }}
|
9 |
+
<a href="{{ $url }}" class="has-img has-aria-label has-quote"
|
10 |
+
{{ with $label }} aria-label="{{ . }}"{{ end }}>
|
11 |
+
{{ with .Get "quote" }}<div>{{ safeHTML . }}</div>{{ end }}
|
12 |
+
{{ with $img }} <img src="{{ . }}" alt="{{ or $alt $label }}" loading="lazy">{{ end }}
|
13 |
+
</a>
|
14 |
+
{{- else }}
|
15 |
+
<figure>
|
16 |
+
{{ with $img }}<img src="{{ . }}" alt="{{ or $alt $label }}" loading="lazy">{{ end }}
|
17 |
+
{{- with $label }}
|
18 |
+
<figcaption>
|
19 |
+
{{ if $url }}<a href="{{ $url }}"> {{ . }}</a>{{ else }}{{ . }}{{ end }}
|
20 |
+
</figcaption>
|
21 |
+
{{- end }}
|
22 |
+
</figure>
|
23 |
+
{{- end }}
|
24 |
+
{{ else if or (eq $var "") (eq $var "begin") }}<div class="column pin">
|
25 |
+
{{ else if eq $var "end" }}</div>
|
26 |
+
{{- end }}
|
layouts/shortcodes/rss.html
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{{- $url := .Get "url" }}
|
2 |
+
{{- $limit := or (.Get "limit") (.Get "pagerSize")}}
|
3 |
+
{{- $data := dict }}
|
4 |
+
{{- with resources.GetRemote $url }}
|
5 |
+
{{- $data = . | transform.Unmarshal }}
|
6 |
+
{{- end }}
|
7 |
+
{{- with $data }}
|
8 |
+
{{- $version := index $data "-version" }}
|
9 |
+
{{- if not $version }}
|
10 |
+
<p class="verbose">{{- printf "Unable to get remote resource %q" $url }}</p>
|
11 |
+
{{- else if eq $version "2.0" }}
|
12 |
+
{{- $siteTitle := .channel.title }}
|
13 |
+
{{- $siteDescription := .channel.description }}
|
14 |
+
{{- $siteLink := .channel.link }}
|
15 |
+
{{- $siteImage := .channel.image.url }}
|
16 |
+
{{- $siteLanguage := .channel.language }}
|
17 |
+
{{- $buildDate := .channel.lastBuildDate }}
|
18 |
+
{{- with .channel.item }}
|
19 |
+
<div role="feed" aria-busy="false">
|
20 |
+
{{- $pagerSize := or $limit 10 }}
|
21 |
+
{{- range $index, $channelItem := . | first $pagerSize }}
|
22 |
+
{{- $author := or .author .creator }}
|
23 |
+
{{- $title := .title }}
|
24 |
+
{{- $description := or .description .summary }}
|
25 |
+
{{- $link := .link }}
|
26 |
+
{{- $date := .pubDate }}
|
27 |
+
{{- $category := .category }}
|
28 |
+
{{- $type := index .enclosure "-type" }}
|
29 |
+
{{- $url := index .enclosure "-url" }}
|
30 |
+
{{- if $index }}<hr class="ldots" role="presentation" aria-hidden="true">{{- end }}
|
31 |
+
<article class="feed-item">
|
32 |
+
<hgroup>
|
33 |
+
<div>
|
34 |
+
{{- with $author }}<span>{{ . }} </span>{{ end }}
|
35 |
+
{{- with $date }}<div><time datetime="{{ . }}">{{ . | truncate 19 "" }}</time></div>{{ end }}
|
36 |
+
</div>
|
37 |
+
<h1>{{ $title }}</h1>
|
38 |
+
</hgroup>
|
39 |
+
<a class="underline" href="{{ .link }}" aria-label="{{ .title }}"></a>
|
40 |
+
{{ $hasCover := or (eq $type "image/jpeg") .coverImage }}
|
41 |
+
<section {{ if $hasCover }}class="has-cover"{{ end }}>
|
42 |
+
{{- if $hasCover }}
|
43 |
+
{{- if .coverImage }}
|
44 |
+
{{- $url = .coverImage }}
|
45 |
+
{{- end }}
|
46 |
+
<img src="{{ $url }}" alt="{{ .title }}" loading="lazy" />
|
47 |
+
{{- end }}
|
48 |
+
<div class="par">{{ $description | safeHTML }}</div>
|
49 |
+
</section>
|
50 |
+
</article>
|
51 |
+
{{- end }}
|
52 |
+
</div>
|
53 |
+
{{- end }}
|
54 |
+
{{- end }}
|
55 |
+
{{- end }}
|
static/css/_grain.svg
ADDED
|
static/css/fonts/README.md
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Disclaimer
|
2 |
+
All product and company names are trademarks or registered trademarks of their respective holders.
|
3 |
+
Use of them does not imply any affiliation with or endorsement by them.
|
4 |
+
The Icons is used under fair-use, without any intention to infringe the trademark.
|
5 |
+
Please open an issue for addition or removal.
|
6 |
+
|
7 |
+
# Copyright Notice & License
|
8 |
+
`base-ui` fonts family is licensed under copyleft license, you are free to modify, which can be done using [IcoMoon](https://icomoon.io) App by importing the `base-ui.json` files.
|
static/css/fonts/base-ui.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
static/css/fonts/base-ui.woff2
ADDED
Binary file (21.6 kB). View file
|
|
static/css/fonts/fonts.uri.txt
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
https://fonts.gstatic.com/s/amiri/v27/J7aRnpd8CGxBHpUrtLMS7JNKIjk.woff2
|
2 |
+
https://fonts.gstatic.com/s/amiri/v27/J7acnpd8CGxBHp2VkaY6zp5gGDAbnCA.woff2
|
3 |
+
https://fonts.gstatic.com/s/amiri/v27/J7afnpd8CGxBHpUrhLQY67FIEjgjpQ.woff2
|
4 |
+
https://fonts.gstatic.com/s/amiri/v27/J7aanpd8CGxBHpUrjAo9_plqHxIZrCE4KA.woff2
|
5 |
+
https://fonts.gstatic.com/s/ebgaramond/v26/SlGUmQSNjdsmc35JDF1K5GR2SDk_YAPIlWk.woff2
|
6 |
+
https://fonts.gstatic.com/s/ebgaramond/v26/SlGUmQSNjdsmc35JDF1K5GR2SDk_YAPIlWk.woff2
|
7 |
+
https://fonts.gstatic.com/s/ebgaramond/v26/SlGWmQSNjdsmc35JDF1K5GRweDg1ZyHKpWiGIg.woff2
|
8 |
+
https://fonts.gstatic.com/s/ebgaramond/v26/SlGWmQSNjdsmc35JDF1K5GRweDg1ZyHKpWiGIg.woff2
|
9 |
+
https://fonts.gstatic.com/s/ebgaramond/v26/SlGWmQSNjdsmc35JDF1K5GRweDc1ZyHKpWiGIg.woff2
|
10 |
+
https://fonts.gstatic.com/s/ebgaramond/v26/SlGWmQSNjdsmc35JDF1K5GRweDc1ZyHKpWiGIg.woff2
|
11 |
+
https://fonts.gstatic.com/s/ebgaramond/v26/SlGUmQSNjdsmc35JDF1K5GR5SDk_YAPIlWk.woff2
|
12 |
+
https://fonts.gstatic.com/s/ebgaramond/v26/SlGUmQSNjdsmc35JDF1K5GR5SDk_YAPIlWk.woff2
|
13 |
+
https://fonts.gstatic.com/s/ebgaramond/v26/SlGUmQSNjdsmc35JDF1K5GRxSDk_YAPIlWk.woff2
|
14 |
+
https://fonts.gstatic.com/s/ebgaramond/v26/SlGUmQSNjdsmc35JDF1K5GRxSDk_YAPIlWk.woff2
|
15 |
+
https://fonts.gstatic.com/s/ebgaramond/v26/SlGWmQSNjdsmc35JDF1K5GRweD81ZyHKpWiGIg.woff2
|
16 |
+
https://fonts.gstatic.com/s/ebgaramond/v26/SlGWmQSNjdsmc35JDF1K5GRweD81ZyHKpWiGIg.woff2
|
17 |
+
https://fonts.gstatic.com/s/ebgaramond/v26/SlGUmQSNjdsmc35JDF1K5GR4SDk_YAPIlWk.woff2
|
18 |
+
https://fonts.gstatic.com/s/ebgaramond/v26/SlGUmQSNjdsmc35JDF1K5GR4SDk_YAPIlWk.woff2
|
19 |
+
https://fonts.gstatic.com/s/ebgaramond/v26/SlGWmQSNjdsmc35JDF1K5GRweDY1ZyHKpWiGIg.woff2
|
20 |
+
https://fonts.gstatic.com/s/ebgaramond/v26/SlGWmQSNjdsmc35JDF1K5GRweDY1ZyHKpWiGIg.woff2
|
21 |
+
https://fonts.gstatic.com/s/notosanssundanese/v19/FwZH7_84xUkosG2xJo2gm7nFwSLQkdymgViMPossZPHXcw.woff2
|
22 |
+
https://fonts.gstatic.com/s/notosanssundanese/v19/FwZH7_84xUkosG2xJo2gm7nFwSLQkdymgViMPossZPHXcw.woff2
|
23 |
+
https://raw.githubusercontent.com/antijingoist/opendyslexic/master/compiled/OpenDyslexic-Regular.woff2
|
24 |
+
https://raw.githubusercontent.com/antijingoist/opendyslexic/master/compiled/OpenDyslexic-Italic.woff2
|
25 |
+
https://raw.githubusercontent.com/antijingoist/opendyslexic/master/compiled/OpenDyslexic-Bold.woff2
|
26 |
+
https://raw.githubusercontent.com/antijingoist/opendyslexic/master/compiled/OpenDyslexic-Bold-Italic.woff2
|
27 |
+
https://raw.githubusercontent.com/CatharsisFonts/Cormorant/master/fonts/webfonts/Cormorant-Regular.woff2
|
28 |
+
https://raw.githubusercontent.com/CatharsisFonts/Cormorant/master/fonts/webfonts/Cormorant-Italic.woff2
|
29 |
+
https://raw.githubusercontent.com/CatharsisFonts/Cormorant/master/fonts/webfonts/Cormorant-Bold.woff2
|
30 |
+
https://raw.githubusercontent.com/CatharsisFonts/Cormorant/master/fonts/webfonts/Cormorant-BoldItalic.woff2
|
31 |
+
https://raw.githubusercontent.com/googlefonts/Inconsolata/main/fonts/webfonts/Inconsolata-Regular.woff2
|
32 |
+
https://raw.githubusercontent.com/googlefonts/Inconsolata/main/fonts/webfonts/Inconsolata-Bold.woff2
|
33 |
+
https://raw.githubusercontent.com/JulietaUla/Montserrat/master/fonts/webfonts/Montserrat-Regular.woff2
|
34 |
+
https://raw.githubusercontent.com/JulietaUla/Montserrat/master/fonts/webfonts/Montserrat-Italic.woff2
|
35 |
+
https://raw.githubusercontent.com/JulietaUla/Montserrat/master/fonts/webfonts/Montserrat-Bold.woff2
|
36 |
+
https://raw.githubusercontent.com/JulietaUla/Montserrat/master/fonts/webfonts/Montserrat-BoldItalic.woff2
|
37 |
+
https://raw.githubusercontent.com/skosch/Crimson/master/Web%20Fonts/crimson-roman-webfont.woff2
|
38 |
+
https://raw.githubusercontent.com/skosch/Crimson/master/Web%20Fonts/crimson-italic-webfont.woff2
|
39 |
+
https://raw.githubusercontent.com/skosch/Crimson/master/Web%20Fonts/crimson-bold-webfont.woff2
|
40 |
+
https://raw.githubusercontent.com/skosch/Crimson/master/Web%20Fonts/crimson-bolditalic-webfont.woff2
|
41 |
+
https://raw.githubusercontent.com/Omnibus-Type/Rosario/master/fonts/webfonts/Rosario-Regular.woff2
|
42 |
+
https://raw.githubusercontent.com/Omnibus-Type/Rosario/master/fonts/webfonts/Rosario-Italic.woff2
|
43 |
+
https://raw.githubusercontent.com/Omnibus-Type/Rosario/master/fonts/webfonts/Rosario-Bold.woff2
|
44 |
+
https://raw.githubusercontent.com/Omnibus-Type/Rosario/master/fonts/webfonts/Rosario-BoldItalic.woff2
|
45 |
+
https://raw.githubusercontent.com/rsms/inter/master/docs/font-files/Inter-Regular.woff2
|
46 |
+
https://raw.githubusercontent.com/rsms/inter/master/docs/font-files/Inter-Italic.woff2
|
47 |
+
https://raw.githubusercontent.com/rsms/inter/master/docs/font-files/Inter-Bold.woff2
|
48 |
+
https://raw.githubusercontent.com/rsms/inter/master/docs/font-files/Inter-BoldItalic.woff2
|
49 |
+
https://raw.githubusercontent.com/imedadel/typeface-eb-garamond-latest/master/files/EBGaramond12-Regular.woff2
|
50 |
+
https://raw.githubusercontent.com/imedadel/typeface-eb-garamond-latest/master/files/EBGaramond12-Italic.woff2
|
51 |
+
https://raw.githubusercontent.com/googlefonts/ebgaramond-specimen/main/docs/fonts/EBGaramond12-Bold.woff
|
52 |
+
https://raw.githubusercontent.com/googlefonts/ebgaramond-specimen/main/docs/fonts/EBGaramond12-BoldItalic.woff
|
static/js/katex.js
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
document.addEventListener("DOMContentLoaded", function() {
|
2 |
+
renderMathInElement(document.getElementById('main-article'), {
|
3 |
+
delimiters: [
|
4 |
+
{left: '$', right: '$', display: false},
|
5 |
+
{left: '$$', right: '$$', display: true},
|
6 |
+
{left: '\(', right: '\)', display: false},
|
7 |
+
{left: '\[', right: '\]', display: true},
|
8 |
+
{left: '\\(', right: '\\)', display: false},
|
9 |
+
{left: '\\[', right: '\\]', display: true},
|
10 |
+
{left: "\begin{equation}", right: "\end{equation}", display: true},
|
11 |
+
{left: "\begin{align}", right: "\end{align}", display: true},
|
12 |
+
],
|
13 |
+
throwOnError : false
|
14 |
+
});
|
15 |
+
});
|
static/js/mathjax.js
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
MathJax = {
|
2 |
+
tex: {
|
3 |
+
inlineMath: [['$', '$'], ['\\(', '\\)']],
|
4 |
+
displayMath: [['$$','$$'], ['\\[', '\\]'], ['\begin{equation}','\end{equation}'], ['\begin{align}','\end{align}']],
|
5 |
+
equationNumbers: { autoNumber: "AMS" },
|
6 |
+
extensions: ["AMSmath.js", "AMSsymbols.js"],
|
7 |
+
}
|
8 |
+
};
|