initial commit

This commit is contained in:
2025-02-19 00:16:57 +01:00
parent 1d9cd91fcd
commit d89698593b
1293 changed files with 55933 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
{{- $alerttype := .AlertType }}
{{- $alerttitle := "" }}
{{- $alertsign := "" }}
{{- $hugoVersion := "0.134.0" }}
{{- if ge hugo.Version $hugoVersion }}
{{- $alerttitle = .AlertTitle }}
{{- $alertsign = .AlertSign }}
{{- end }}
{{- $text := .Text }}
{{- if $alerttype }}
{{- partial "shortcodes/notice.html" (dict
"page" .Page
"content" $text
"expanded" (cond (eq $alertsign "+") true (cond (eq $alertsign "-") false ""))
"style" $alerttype
"title" $alerttitle
) }}
{{ else -}}
<blockquote>
{{ $text | safeHTML }}</blockquote>
{{ end }}

View File

@@ -0,0 +1,6 @@
{{- partial "shortcodes/math.html" (dict
"page" .Page
"attributes" .Attributes
"content" .Inner
"align" (index .Attributes "align")
) }}

View File

@@ -0,0 +1,6 @@
{{- partial "shortcodes/mermaid.html" (dict
"page" .Page
"attributes" .Attributes
"content" .Inner
"align" (index .Attributes "align")
) }}

View File

@@ -0,0 +1,7 @@
{{- partial "shortcodes/highlight.html" (dict
"page" .Page
"attributes" .Attributes
"content" .Inner
"options" .Options
"type" .Type
) }}

View File

@@ -0,0 +1,9 @@
{{- $id := "" }}
{{- partial "shortcodes/image.html" (dict
"page" .Page
"url" .Destination
"title" .Title
"alt" .Text
"id" $id
"attributes" .Attributes
) }}

View File

@@ -0,0 +1,6 @@
{{- partial "shortcodes/link.html" (dict
"page" .Page
"url" .Destination
"title" .Title
"content" .Text
) }}

View File

@@ -0,0 +1,83 @@
<!DOCTYPE html>
{{- block "storeOutputFormat" . }}{{ end }}
{{- if .IsHome }}
{{- $hugoVersion := "0.126.0" }}
{{- if lt hugo.Version $hugoVersion }}
{{- errorf "The Relearn theme requires Hugo %s or later" $hugoVersion }}
{{- end }}
{{- end }}
{{- if .Site.Params.description }}
{{- warnf "UNSUPPORTED usage of 'params.description' config parameter found, move it to the front matter of your home page; see https://mcshelby.github.io/hugo-theme-relearn/introduction/releasenotes/6/#6-0-0" }}
{{- end }}
<html lang="{{ .Page.Language.LanguageCode }}" dir="{{ .Page.Language.LanguageDirection | default (T "Reading-direction") | default "ltr" }}" itemscope itemtype="http://schema.org/Article" data-r-output-format="{{ with .Store.Get "relearnOutputFormat" }}{{ . }}{{ else }}html{{ end }}">
<head>
{{- partial "meta.html" . }}
{{- $title := partial "title.gotmpl" (dict "page" . "fullyQualified" true "reverse" true) }}
<title>{{ $title }}</title>
{{- /* multilingual stuff */}}
{{- if .IsTranslated -}}
{{- range $index, $trans := .AllTranslations }}
{{- if eq $index 0 }}
<link href="{{ partial "permalink.gotmpl" (dict "to" . "abs" true) }}" rel="alternate" hreflang="x-default">
{{- end }}
<link href="{{ partial "permalink.gotmpl" (dict "to" . "abs" true) }}" rel="alternate" hreflang="{{ .Language.LanguageCode }}">
{{- end }}
{{- end }}
{{- /* output formats */}}
{{- $page := . }}
{{- $link := "<link href=\"%s\" rel=\"%s\" type=\"%s\" title=\"%s\">" }}
{{- range .AlternativeOutputFormats }}
{{- if eq .Rel "canonical" }}
{{ (printf $link (partial "permalink.gotmpl" (dict "to" . "abs" true)) .Rel .MediaType.Type ($title | htmlEscape)) | safeHTML }}
{{- else if not (partial "_relearn/pageIsSpecial.gotmpl" $page) }}
{{ (printf $link (partial "permalink.gotmpl" (dict "to" .)) .Rel .MediaType.Type ($title | htmlEscape)) | safeHTML }}
{{- end }}
{{- end }}
{{- partialCached "favicon.html" . }}
{{- partial "stylesheet.html" . }}
{{- partial "dependencies.gotmpl" (dict "page" . "location" "header") }}
{{- partial "custom-header.html" . }}
</head>
<body class="mobile-support {{ with .Store.Get "relearnOutputFormat" }}{{ . }}{{ else }}html{{ end }}{{- if .Site.Params.disableHoverBlockCopyToClipBoard }} disableHoverBlockCopyToClipBoard{{ end }}" data-url="{{ partial "permalink.gotmpl" (dict "to" .) }}">
<div id="R-body" class="default-animation">
<div id="R-body-overlay"></div>
<nav id="R-topbar">
<div class="topbar-wrapper">
<div class="topbar-sidebar-divider"></div>
<div class="topbar-area topbar-area-start" data-area="start">
{{- partial "topbar/area/start.html" . }}
</div>
{{- $showBreadcrumb := (and (not .Params.disableBreadcrumb) (not .Site.Params.disableBreadcrumb)) }}
{{- if $showBreadcrumb }}
<ol class="topbar-breadcrumbs breadcrumbs highlightable" itemscope itemtype="http://schema.org/BreadcrumbList">
{{- partial "breadcrumbs.html" (dict "page" .) }}
</ol>
{{- else }}
<span class="topbar-breadcrumbs highlightable">
{{ partial "title.gotmpl" (dict "page" . "linkTitle" true) }}
</span>
{{- end }}
<div class="topbar-area topbar-area-end" data-area="end">
{{- partial "topbar/area/end.html" . }}
</div>
</div>
</nav>
<div id="R-main-overlay"></div>
<main id="R-body-inner" class="highlightable{{ with or .Type "default" }} {{ . }}{{ end }}" tabindex="-1">
<div class="flex-block-wrapper">
{{- block "body" . }}{{ end }}
</div>
</main>
{{- partial "custom-comments.html" . }}
</div>
{{- block "menu" . }}{{ end }}
{{- $assetBusting := partialCached "assetbusting.gotmpl" . }}
<script src="{{"js/clipboard.min.js" | relURL}}{{ $assetBusting }}" defer></script>
<script src="{{"js/perfect-scrollbar.min.js" | relURL}}{{ $assetBusting }}" defer></script>
{{- partial "dependencies.gotmpl" (dict "page" . "location" "footer") }}
<script src="{{"js/theme.js" | relURL}}{{ $assetBusting }}" defer></script>
{{- partial "custom-footer.html" . }}
</body>
</html>

View File

@@ -0,0 +1,6 @@
{{/* the following check avoids to print out content of headless bundles if called from nestedContent.gotmpl */}}
{{- if .RelPermalink -}}
# {{ .Title }}
{{ strings.TrimLeft "\n\r\t " .RawContent | safeHTML }}
{{- end }}

View File

@@ -0,0 +1,4 @@
{{/* the following check avoids to print out content of headless bundles if called from nestedContent.gotmpl */}}
{{- with and .File .File.Filename -}}
{{ readFile . | safeHTML }}
{{- end }}

View File

@@ -0,0 +1,9 @@
{{- define "storeOutputFormat" }}
{{- .Render "views/storeOutputFormat" }}
{{- end }}
{{- define "body" }}
{{- .Render "views/body" }}
{{- end }}
{{- define "menu" }}
{{- .Render "views/menu" }}
{{- end }}

View File

@@ -0,0 +1 @@
{{ define "_empty" }}{{ end }}

View File

@@ -0,0 +1 @@
{{ define "_empty" }}{{ end }}

View File

@@ -0,0 +1,56 @@
{{- /* based on Hugo 0.135.0 rss.xml */}}
{{- $authorEmail := "" }}
{{- with .Site.Params.author }}
{{- if reflect.IsMap . }}
{{- with .email }}
{{- $authorEmail = . }}
{{- end }}
{{- end }}
{{- end }}
{{- $authorName := partialCached "_relearn/authorName.gotmpl" . }}
{{- $pages := .Pages }}
{{- $limit := .Site.Config.Services.RSS.Limit }}
{{- if ge $limit 1 }}
{{- $pages = $pages | first $limit }}
{{- end }}
{{- $page := . }}
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ partial "title.gotmpl" (dict "page" . "fullyQualified" true "reverse" true) }}</title>
<link>{{ partial "permalink.gotmpl" (dict "to" . "abs" true) }}</link>
<description>{{ trim (or .Description .Summary | plainify | htmlUnescape) "\n\r\t " | transform.XMLEscape | safeHTML }}</description>
<generator>Hugo</generator>
<language>{{ site.Language.LanguageCode }}</language>{{ with $authorEmail }}
<managingEditor>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</managingEditor>{{ end }}{{ with $authorEmail }}
<webMaster>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</webMaster>{{ end }}{{ with .Site.Copyright }}
<copyright>{{ . }}</copyright>{{ end }}{{ if not .Date.IsZero }}
<lastBuildDate>{{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{- with .OutputFormats.Get "rss" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" ( partial "permalink.gotmpl" (dict "to" . "abs" true)) .MediaType | safeHTML }}
{{- end }}
{{- range $pages }}
{{- $visible := true }}
{{- if partial "_relearn/pageIsSpecial.gotmpl" . }}
{{- $visible = false }}
{{- else if or (eq .Kind "taxonomy") (eq .Kind "term") }}
{{- $visible = and .Title .Permalink (or (ne .Site.Params.disableTagHiddenPages true) (not (partialCached "_relearn/pageIsHidden.gotmpl" . .Path) ) ) }}
{{- else }}
{{- $visible = and .Title .Permalink (or (ne .Site.Params.disableSeoHiddenPages true) (not (partialCached "_relearn/pageIsHiddenSelfOrAncestor.gotmpl" (dict "page" . "to" $page) .Path $page.Path) ) ) }}
{{- end }}
{{- if $visible }}
<item>
<title>{{ partial "title.gotmpl" (dict "page" .) }}</title>
<link>{{ partial "permalink.gotmpl" (dict "to" . "abs" true) }}</link>
<pubDate>{{ (or .PublishDate .Date).Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{- with $authorEmail }}<author>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</author>{{ end }}
<guid>{{ partial "permalink.gotmpl" (dict "to" . "abs" true) }}</guid>
<description>{{ trim (or .Description .Summary | plainify | htmlUnescape) "\n\r\t " | transform.XMLEscape | safeHTML }}</description>
</item>
{{- end }}
{{- end }}
</channel>
</rss>

View File

@@ -0,0 +1,9 @@
{{- define "storeOutputFormat" }}
{{- .Render "views/storeOutputFormat" }}
{{- end }}
{{- define "body" }}
{{- .Render "views/body" }}
{{- end }}
{{- define "menu" }}
{{- .Render "views/menu" }}
{{- end }}

View File

@@ -0,0 +1 @@
{{ define "_empty" }}{{ end }}

View File

@@ -0,0 +1 @@
{{ define "_empty" }}{{ end }}

View File

@@ -0,0 +1,17 @@
{{- /* based on Hugo 0.125.5 sitemap.xml */}}
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
{{- range where .Pages "Sitemap.Disable" "ne" true }}
{{- if partial "_relearn/pageIsSpecial.gotmpl" . }}
{{- else if and .Title .RelPermalink (or (ne .Site.Params.disableSeoHiddenPages true) (not (partialCached "_relearn/pageIsHiddenSelfOrAncestor.gotmpl" (dict "page" . "to" .Site.Home) .Path .Site.Home.Path) ) ) }}
<url>
<loc>{{ partial "permalink.gotmpl" (dict "to" . "abs" true) }}</loc>{{ if not .Lastmod.IsZero }}
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range $index, $trans := .AllTranslations }}{{- if eq $index 0 }}
<xhtml:link rel="alternate" hreflang="x-default" href="{{ partial "permalink.gotmpl" (dict "to" . "abs" true) }}" />{{ end }}
<xhtml:link rel="alternate" hreflang="{{ .Language.LanguageCode }}" href="{{ partial "permalink.gotmpl" (dict "to" . "abs" true) }}" />{{ end }}{{ end }}
</url>
{{- end -}}
{{- end }}
</urlset>

View File

@@ -0,0 +1,9 @@
{{- define "storeOutputFormat" }}
{{- .Render "views/storeOutputFormat" }}
{{- end }}
{{- define "body" }}
{{- partial "bodys/taxonomy.html" . }}
{{- end }}
{{- define "menu" }}
{{- .Render "views/menu" }}
{{- end }}

View File

@@ -0,0 +1,9 @@
{{- define "storeOutputFormat" }}
{{- .Render "views/storeOutputFormat" }}
{{- end }}
{{- define "body" }}
{{- partial "bodys/term.html" . }}
{{- end }}
{{- define "menu" }}
{{- .Render "views/menu" }}
{{- end }}

View File

@@ -0,0 +1,12 @@
<article class="default">
<header class="headline">
{{- partial "content-header.html" . }}
</header>
{{ partial "heading-pre.html" . }}{{ partial "heading.html" . }}{{ partial "heading-post.html" . }}
{{ partial "article-content.html" . }}
<footer class="footline">
{{- partial "content-footer.html" . }}
</footer>
</article>

View File

@@ -0,0 +1 @@
{{- partial "bodys/single.html" . }}

View File

@@ -0,0 +1 @@
{{- partial "bodys/tree.html" . }}

View File

@@ -0,0 +1 @@
{{- partial "menu.html" . }}

View File

@@ -0,0 +1 @@
{{- .Store.Set "relearnOutputFormat" "html" }}

View File

@@ -0,0 +1 @@
{{- .Store.Set "relearnOutputFormat" "print" }}