let's try !publish!

This commit is contained in:
Marcell Mars 2020-12-19 00:23:52 +01:00
parent 676f232539
commit ee16267b90
19 changed files with 642 additions and 574 deletions

View file

@ -307,6 +307,10 @@ body {
color: black; color: black;
} }
#preview {
display: none;
}
sup, sup,
sub { sub {
vertical-align: baseline; vertical-align: baseline;

View file

@ -1,83 +1,115 @@
window.addEventListener('scroll', function(e) { window.addEventListener("scroll", function (e) {
if (document.querySelector('body').clientWidth > 767) { if (document.querySelector("body").clientWidth > 767) {
let rightcolumn = document.querySelector('.rightcolumn'); let rightcolumn = document.querySelector(".rightcolumn");
let mantletitle = document.querySelector('.mantletitle') || document.querySelector('.crusttitle') || false; let mantletitle =
if (!mantletitle) { document.querySelector(".mantletitle") ||
return document.querySelector(".crusttitle") ||
} false;
let mantlebar = document.querySelector('.mantlebar') if (!mantletitle) {
let grid = document.querySelector('.grid') return;
let gridrect = mantletitle.getBoundingClientRect();
if ((document.querySelector('body').clientHeight - (grid.clientHeight + mantletitle.clientHeight + 32)) < window.innerHeight) {
return
}
if (gridrect.top < 20 && !grid.classList.contains('moved')) {
grid.classList.add('moved');
mantlebar.style.display = "inline";
mantletitle.style.visibility = "hidden";
} else if (gridrect.top > 21 && grid.classList.contains('moved')) {
grid.classList.remove('moved');
mantletitle.style.visibility = "visible";
mantlebar.style.display = "none";
}
} else {
let rightcolumn = document.querySelector('.rightcolumn');
let mantletitle = document.querySelector('.mantletitle') || document.querySelector('.crusttitle') || false;
if (!mantletitle) {
return
}
let mantlebar = document.querySelector('.mantlebar')
let grid = document.querySelector('.grid')
let gridrect = mantletitle.getBoundingClientRect();
if (gridrect.top < 20 && !grid.classList.contains('moved')) {
grid.classList.add('moved');
mantlebar.style.display = "inline";
mantletitle.style.visibility = "hidden";
} else if (gridrect.top > 21 && grid.classList.contains('moved')) {
grid.classList.remove('moved');
mantletitle.style.visibility = "visible";
mantlebar.style.display = "none";
}
} }
}) let mantlebar = document.querySelector(".mantlebar");
let grid = document.querySelector(".grid");
window.addEventListener('DOMContentLoaded', (e) => { let gridrect = mantletitle.getBoundingClientRect();
let par = document.querySelector("#TableOfContents > ol:first-child > li:first-child");
let s = document.createElement("span");
s.appendChild(par.cloneNode(true))
par.remove()
document.querySelector("#TableOfContents > ol:first-child").insertBefore(s, document.querySelector("#TableOfContents > ol:first-child").firstChild)
if (document.querySelector(".soundcite")) {
let relPath ="../".repeat(relPathDepth - 1);
var popcorn = document.createElement('script');
popcorn.src = `${relPath}js/popcorn.min.js`;
document.body.appendChild(popcorn);
var soundcite = document.createElement('script');
soundcite.src = `${relPath}js/soundcite.min.js`;
document.body.appendChild(soundcite);
if (
document.querySelector("body").clientHeight -
(grid.clientHeight + mantletitle.clientHeight + 32) <
window.innerHeight
) {
return;
} }
document.querySelectorAll('#TableOfContents a, .anchorz, .footnote-backref, .footnote-ref').forEach(i => { if (gridrect.top < 20 && !grid.classList.contains("moved")) {
i.addEventListener('click', e => { grid.classList.add("moved");
setTimeout(() => { mantlebar.style.display = "inline";
window.scrollBy({top: document.querySelector('.header').clientHeight * -1.25, behavior: 'smooth'})}, 50); mantletitle.style.visibility = "hidden";
}) } else if (gridrect.top > 21 && grid.classList.contains("moved")) {
}) grid.classList.remove("moved");
}) mantletitle.style.visibility = "visible";
mantlebar.style.display = "none";
}
} else {
let rightcolumn = document.querySelector(".rightcolumn");
let mantletitle =
document.querySelector(".mantletitle") ||
document.querySelector(".crusttitle") ||
false;
if (!mantletitle) {
return;
}
let mantlebar = document.querySelector(".mantlebar");
let grid = document.querySelector(".grid");
let gridrect = mantletitle.getBoundingClientRect();
if (gridrect.top < 20 && !grid.classList.contains("moved")) {
grid.classList.add("moved");
mantlebar.style.display = "inline";
mantletitle.style.visibility = "hidden";
} else if (gridrect.top > 21 && grid.classList.contains("moved")) {
grid.classList.remove("moved");
mantletitle.style.visibility = "visible";
mantlebar.style.display = "none";
}
}
});
window.addEventListener("DOMContentLoaded", (e) => {
let preview = document.querySelector("#preview");
if (
location.pathname.split("/").includes("_preview") ||
location.hash.startsWith("#/_edit")
) {
preview.style.display = "flex";
}
let par = document.querySelector(
"#TableOfContents > ol:first-child > li:first-child"
);
let s = document.createElement("span");
s.appendChild(par.cloneNode(true));
par.remove();
document
.querySelector("#TableOfContents > ol:first-child")
.insertBefore(
s,
document.querySelector("#TableOfContents > ol:first-child").firstChild
);
if (document.querySelector(".soundcite")) {
let relPath = "../".repeat(relPathDepth - 1);
var popcorn = document.createElement("script");
popcorn.src = `${relPath}js/popcorn.min.js`;
document.body.appendChild(popcorn);
var soundcite = document.createElement("script");
soundcite.src = `${relPath}js/soundcite.min.js`;
document.body.appendChild(soundcite);
}
document
.querySelectorAll(
"#TableOfContents a, .anchorz, .footnote-backref, .footnote-ref"
)
.forEach((i) => {
i.addEventListener("click", (e) => {
setTimeout(() => {
window.scrollBy({
top: document.querySelector(".header").clientHeight * -1.25,
behavior: "smooth",
});
}, 50);
});
});
});
toggleAllLinks = function () { toggleAllLinks = function () {
document.querySelectorAll('details').forEach(i => { document.querySelectorAll("details").forEach((i) => {
if (i.open) { if (i.open) {
i.removeAttribute('open'); i.removeAttribute("open");
} else { } else {
i.setAttribute('open', true); i.setAttribute("open", true);
} }
}) });
} };

View file

@ -6,43 +6,43 @@
{{- end -}} {{- end -}}
{{- if strings.HasPrefix .Destination "bib:" -}} {{- if strings.HasPrefix .Destination "bib:" -}}
{{- $destination := (substr .Destination 4) -}} {{- $destination := (substr .Destination 4) -}}
{{- $c_prefix := .Page.Site.Params.sandpointsCatalogPrefix | default "/library/" -}} {{- $c_prefix := .Page.Site.Params.sandpointsCatalogPrefix | default "/library/" -}}
{{- if index $.Page.Site.Data.books.catalog $destination -}} {{- if index $.Page.Site.Data.books.catalog $destination -}}
{{- $b := index $.Page.Site.Data.books.catalog $destination -}} {{- $b := index $.Page.Site.Data.books.catalog $destination -}}
{{- $bibhref := printf "%sBROWSE_LIBRARY.html#/book/%s" (safeURL ($c_prefix)) $destination }} {{- $bibhref := printf "%sBROWSE_LIBRARY.html#/book/%s" (safeURL ($c_prefix)) $destination }}
{{ $bibtitle := "" }} {{ $bibtitle := "" }}
{{ with $b.title }} {{ with $b.title }}
{{- $bibtitle = printf "%s" $b.title }} {{- $bibtitle = printf "%s" $b.title }}
{{ end }} {{ end }}
{{ .Page.Scratch.Add "bibs" (slice (slice $bibhref $bibtitle)) }} {{ .Page.Scratch.Add "bibs" (slice (slice $bibhref $bibtitle)) }}
{{- if not $text_link -}} {{- if not $text_link -}}
<span>{{- delimit $b.authors ", " " & " -}}{{- with $b.pubdate -}}, {{- substr . 0 4}}{{- end -}}.<a href="{{- $c_prefix | safeURL -}}BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with $b.title}} title="{{- . -}}"{{- end -}} target="_blank"><span class="sup">bib</span><i>{{- $b.title -}}</i></a>. {{- with $b.publisher -}}{{- . -}}.{{- end -}}</span> <span>{{- delimit $b.authors ", " " & " -}}{{- with $b.pubdate -}}, {{- substr . 0 4}}{{- end -}}.<a href="{{- $c_prefix | safeURL -}}BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with $b.title}} title="{{- . -}}"{{- end -}} target="_blank"><span class="sup">bib</span><i>{{- $b.title -}}</i></a>. {{- with $b.publisher -}}{{- . -}}.{{- end -}}</span>
{{- else -}}
<a href="{{- $c_prefix | safeURL -}}BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with $b.title}} title="{{- . -}}"{{- end -}} target="_blank">{{- $text_link -}}</a>
{{- end -}}
{{- else -}} {{- else -}}
<a href="{{- $c_prefix | safeURL -}}BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with .Title}} title="{{- . -}}"{{- end -}}>{{- $text_link -}}⦚<span class="text-xs font-bold p-1 bg-AuChico text-CoconutCream">bib:{{- $destination -}} not found</span></a> <a href="{{- $c_prefix | safeURL -}}BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with $b.title}} title="{{- . -}}"{{- end -}} target="_blank">{{- $text_link -}}</a>
{{- end -}} {{- end -}}
{{- else -}}
<a href="{{- $c_prefix | safeURL -}}BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with .Title}} title="{{- . -}}"{{- end -}}>{{- $text_link -}}⦚<span class="text-xs font-bold p-1 bg-AuChico text-CoconutCream">bib:{{- $destination -}} not found</span></a>
{{- end -}}
{{- else if in ($_.Get "triads") (index (split .Destination ":") 0) -}} {{- else if in ($_.Get "triads") (index (split .Destination ":") 0) -}}
{{- if $.Page.Site.GetPage (printf "/%s" (replace .Destination ":" "/")) -}} {{- if $.Page.Site.GetPage (printf "/%s" (replace .Destination ":" "/")) -}}
{{- $session := $.Page.Site.GetPage (printf "/%s" (replace .Destination ":" "/")) -}} {{- $session := $.Page.Site.GetPage (printf "/%s" (replace .Destination ":" "/")) -}}
{{ .Page.Scratch.Add "links" (slice $session) }} {{ .Page.Scratch.Add "links" (slice $session) }}
{{- if not $text_link -}} {{- if not $text_link -}}
<a href="{{- $session.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $session.Title}} title="{{- $session.Title -}}"{{- end -}}><span class="sup">{{- index (split .Destination ":") 0 -}}</span>{{- $session.Title -}}</a> <a href="{{- $session.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $session.Title}} title="{{- $session.Title -}}"{{- end -}}><span class="sup">{{- index (split .Destination ":") 0 -}}</span>{{- $session.Title -}}</a>
{{- else -}}
<a href="{{- $session.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with .Title}} title="{{- . -}}"{{- end -}}><span class="sup">{{- index (split .Destination ":") 0 -}}</span>{{- $text_link -}}</a>
{{- end -}}
{{- else -}} {{- else -}}
<a href="{{- .Destination -}}/{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}">{{- $text_link -}}⦚<span>{{- .Destination -}} not found</span></a> <a href="{{- $session.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with .Title}} title="{{- . -}}"{{- end -}}><span class="sup">{{- index (split .Destination ":") 0 -}}</span>{{- $text_link -}}</a>
{{- end -}} {{- end -}}
{{- else -}}
<a href="{{- .Destination -}}/{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}">{{- $text_link -}}⦚<span>{{- .Destination -}} not found</span></a>
{{- end -}}
{{- else if strings.HasPrefix .Destination "audio:" -}} {{- else if strings.HasPrefix .Destination "audio:" -}}
{{- $a_destination := (substr .Destination 6) -}} {{- $a_destination := (substr .Destination 6) -}}
{{- if findRE "^.*static" $a_destination -}} {{- if findRE "^.*static" $a_destination -}}
<span class="soundcite" data-url="{{- (replaceRE "^.*static" "" $a_destination ) | safeURL -}}">{{ .Text }}</span> <span class="soundcite" data-url="{{- (replaceRE "^.*static" "" $a_destination ) | safeURL -}}">{{ .Text }}</span>
{{- else -}} {{- else -}}
<span class="soundcite" data-url="{{- $a_destination | safeURL -}}">{{ .Text }}</span> <span class="soundcite" data-url="{{- $a_destination | safeURL -}}">{{ .Text }}</span>
{{- end -}} {{- end -}}
{{- else if findRE "^.*static" .Destination -}} {{- else if findRE "^.*static" .Destination -}}
<img src="{{- (replaceRE "^.*static" "" .Destination ) | safeURL -}}" alt="{{- .Text -}}" {{- with .Title}} title="{{- . -}}"{{- end -}} /> <img src="{{- (replaceRE "^.*static" "" .Destination ) | safeURL -}}" alt="{{- .Text -}}" {{- with .Title}} title="{{- . -}}"{{- end -}} />
{{- else -}} {{- else -}}

View file

@ -1,13 +1,13 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-us{{ end }}"> <html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-us{{ end }}">
<head> <head>
{{- partialCached "head.html" . -}} {{- partialCached "head.html" . -}}
<title>{{- .Title }} - {{ .Site.Title -}}</title> <title>{{- .Title }} - {{ .Site.Title -}}</title>
{{- partialCached "sandpointjs.html" . .RelPermalink -}} {{- partialCached "sandpointjs.html" . .RelPermalink -}}
</head> </head>
<body> <body>
{{- block "singlebody" . }}{{- end }} {{- block "singlebody" . }}{{- end }}
{{- partialCached "footer.html" . -}} {{- partialCached "footer.html" . -}}
</body> </body>
</html> </html>

View file

@ -1,36 +1,35 @@
{{ define "singlebody" }} {{ define "singlebody" }}
{{ $currentNode := . }}
{{ $currentNode := . }} {{ $currentDir := "" }}
{{ $currentDir := "" }} {{ with .File }}
{{ with .File }} {{ $currentDir = .Dir }}
{{ $currentDir = .Dir }} {{ end }}
{{ end }} {{ $currentFile := (printf "/%s" .File) }}
{{ $currentFile := (printf "/%s" .File) }}
<div class="coretitle"><span class="supt">Sitemap{{ substr $.Site.Title 0 1 }}</span>{{ substr $.Site.Title 1 }} ({{ $currentDir }})</div>
<div class="coretitle"><span class="supt">Sitemap{{ substr $.Site.Title 0 1 }}</span>{{ substr $.Site.Title 1 }} ({{ $currentDir }})</div>
{{ $s := partialCached "scratch.html" . }}
{{ $s := partialCached "scratch.html" . }} {{ $noTriad := (slice) }}
{{ $noTriad := (slice) }} {{ range $p := .Site.RegularPages }}
{{ range $p := .Site.RegularPages }} {{ $scratch := $s.Get (printf "/%s" $p.File) }}
{{ $scratch := $s.Get (printf "/%s" $p.File) }} {{ if eq $scratch.depth "core" }}
{{ if eq $scratch.depth "core" }} <div class="sitemap" ><div class="{{ with $p.File }}{{ if eq $currentDir .Dir }}highline{{ end }}{{ end }}"><a href="{{- $p.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $p.Title}} title="{{- $p.Title -}}"{{- end -}}><span class="sup">{{- substr $p.File.Dir 0 -1 -}}</span>{{- $p.Title -}}</a></div>
<div class="sitemap" ><div class="{{ with $p.File }}{{ if eq $currentDir .Dir }}highline{{ end }}{{ end }}"><a href="{{- $p.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $p.Title}} title="{{- $p.Title -}}"{{- end -}}><span class="sup">{{- substr $p.File.Dir 0 -1 -}}</span>{{- $p.Title -}}</a></div> {{ range $coreKid := $scratch.has_children }}
{{ range $coreKid := $scratch.has_children }} <div class="sitemap"><a href="{{- $coreKid.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $coreKid.Title}} title="{{- $coreKid.Title -}}"{{- end -}}><div class="{{ with $coreKid.File }}{{ if eq $currentDir .Dir }}highline{{ end }}{{ end }}"><span class="sup">{{- substr $coreKid.File.Dir 0 -1 -}}</span>{{- $coreKid.Title -}}</a></div>
<div class="sitemap"><a href="{{- $coreKid.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $coreKid.Title}} title="{{- $coreKid.Title -}}"{{- end -}}><div class="{{ with $coreKid.File }}{{ if eq $currentDir .Dir }}highline{{ end }}{{ end }}"><span class="sup">{{- substr $coreKid.File.Dir 0 -1 -}}</span>{{- $coreKid.Title -}}</a></div> {{ $scratchCKid := $s.Get (printf "/%s" $coreKid.File) }}
{{ $scratchCKid := $s.Get (printf "/%s" $coreKid.File) }} {{ range $mantleKid := $scratchCKid.has_children }}
{{ range $mantleKid := $scratchCKid.has_children }} <div class="sitemap"><div class="{{ with $mantleKid.File }}{{ if eq $currentDir .Dir }} highline{{ end }}{{ end }}"><a href="{{- $mantleKid.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $mantleKid.Title}} title="{{- $mantleKid.Title -}}"{{- end -}}><span class="sup">{{ with $mantleKid.File }}{{substr .Dir 0 -1 -}}{{ end }}</span>{{- $mantleKid.Title -}}</a></div></div>
<div class="sitemap"><div class="{{ with $mantleKid.File }}{{ if eq $currentDir .Dir }} highline{{ end }}{{ end }}"><a href="{{- $mantleKid.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $mantleKid.Title}} title="{{- $mantleKid.Title -}}"{{- end -}}><span class="sup">{{ with $mantleKid.File }}{{substr .Dir 0 -1 -}}{{ end }}</span>{{- $mantleKid.Title -}}</a></div></div> {{ end }}
{{ end }} </div>
</div> {{ end }}
{{ end }} {{ else if not (in (slice "core" "mantle" "crust") $scratch.depth)}}
{{ else if not (in (slice "core" "mantle" "crust") $scratch.depth)}} {{ $noTriad = $noTriad | append $p }}
{{ $noTriad = $noTriad | append $p }} {{ else }}
{{ else }} </div>
</div> {{ end }}
{{ end }}
{{ range $noTriad }}
<div class="sitemap {{ with .File }}{{ if eq $currentDir .Dir }} highline{{ end }}{{ end }}"><a href="{{- .RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with .Title }} title="{{- . -}}"{{- end -}}><span class="sup">{{- substr .File.Dir 0 -1 -}}</span>{{- .Title -}}</a></div>
{{ end }} {{ end }}
{{ end }}
{{ range $noTriad }}
<div class="sitemap {{ with .File }}{{ if eq $currentDir .Dir }} highline{{ end }}{{ end }}"><a href="{{- .RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with .Title }} title="{{- . -}}"{{- end -}}><span class="sup">{{- substr .File.Dir 0 -1 -}}</span>{{- .Title -}}</a></div>
{{ end }}
{{ end }} {{ end }}

View file

@ -1,11 +1,6 @@
{{- define "singlebody" -}} {{- define "singlebody" -}}
{{- partialCached "header.html" . .RelPermalink -}}
{{- partialCached "header.html" . .RelPermalink -}} <h1>{{ .Title }}</h1>
{{- partialCached "singlebody.html" . .RelPermalink -}}
<h1>{{ .Title }}</h1> <div class="content">{{ .Content }}</div>
{{- partialCached "singlebody.html" . .RelPermalink -}}
<div class="content">{{ .Content }}</div>
{{- end -}} {{- end -}}

View file

@ -4,13 +4,15 @@
<meta name="theme-color" content="#ffffff"> <meta name="theme-color" content="#ffffff">
{{ if .Description }} {{ if .Description }}
<meta name="description" content="{{ .Description }}" /> <meta name="description" content="{{ .Description }}" />
{{ end }} {{ end }}
{{ if .Keywords }} {{ if .Keywords }}
<meta name="keywords" content="{{ delimit .Keywords "," }}" /> <meta name="keywords" content="{{ delimit .Keywords "," }}" />
{{ end }} {{ end }}
{{ if .Params.Author }} {{ if .Params.Author }}
<meta name="author" content="{{ .Params.Author}}" /> <meta name="author" content="{{ .Params.Author}}" />
{{ end }} {{ end }}
{{ template "_internal/opengraph.html" . }} {{ template "_internal/opengraph.html" . }}

View file

@ -10,15 +10,15 @@
{{ $is_in_ := newScratch }} {{ $is_in_ := newScratch }}
{{ with eq $scratch.depth "crust" }} {{ with eq $scratch.depth "crust" }}
{{ range $scratch.is_in }} {{ range $scratch.is_in }}
{{ range $k,$v := $s.Get (printf "/%s" .File) }} {{ range $k,$v := $s.Get (printf "/%s" .File) }}
{{ if eq $k "is_in" }} {{ if eq $k "is_in" }}
{{ range $v }} {{ range $v }}
{{ $is_in_.Set (printf "/%s" .File) (printf "/%s" .File) }} {{ $is_in_.Set (printf "/%s" .File) (printf "/%s" .File) }}
{{ end }}
{{ end }}
{{ end }} {{ end }}
{{ end }}
{{ end }} {{ end }}
{{ end }}
{{ end }} {{ end }}
{{ $is_in_is_in := (slice) }} {{ $is_in_is_in := (slice) }}
@ -26,76 +26,76 @@
{{ $is_in_is_in = $is_in_is_in | append ($.GetPage .) }} {{ $is_in_is_in = $is_in_is_in | append ($.GetPage .) }}
{{ end }} {{ end }}
{{ if eq hugo.Environment "preview" }} {{ if eq hugo.Environment "gitea" }}
<div class="headiter"> <div class="headiter" id="preview">
<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_edit/master/content/{{ .File }}">EDIT_THIS</a> <a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_edit/master/content/{{ .File }}">EDIT_THIS</a>
{{ with $scratch.core }}<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_new/master/content/{{ index . 0 }}/">ADD_{{ index . 0 | upper }}</a>{{ end }} {{ with $scratch.core }}<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_new/master/content/{{ index . 0 }}/">ADD_{{ index . 0 | upper }}</a>{{ end }}
{{ with $scratch.mantle }}<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_new/master/content/{{ index . 0 }}/">ADD_{{ index . 0 | upper }}</a>{{ end }} {{ with $scratch.mantle }}<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_new/master/content/{{ index . 0 }}/">ADD_{{ index . 0 | upper }}</a>{{ end }}
{{ with $scratch.crust }}<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_new/master/content/{{ index . 0 }}/">ADD_{{ index . 0 | upper }}</a>{{ end }} {{ with $scratch.crust }}<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_new/master/content/{{ index . 0 }}/">ADD_{{ index . 0 | upper }}</a>{{ end }}
{{ if not $scratch.core }}<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_new/master/content/{{ $currentDir }}">ADD_{{ substr $currentDir 0 -1 | upper }}</a>{{ end }} {{ if not $scratch.core }}<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_new/master/content/{{ $currentDir }}">ADD_{{ substr $currentDir 0 -1 | upper }}</a>{{ end }}
<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_edit/master/PUBLISH.trigger.md">PUBLISH</a> <a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_edit/master/PUBLISH.trigger.md">PUBLISH</a>
<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}"> ? </a> <a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}"> ? </a>
</div> </div>
{{ end }} {{ end }}
<div class="header"> <div class="header">
<a title="{{ $.Site.Home.Title }}'s Bibliotheke" href="/library/BROWSE_LIBRARY.html" class="bibliotheke" target="_blank"> <a title="{{ $.Site.Home.Title }}'s Bibliotheke" href="/library/BROWSE_LIBRARY.html" class="bibliotheke" target="_blank">
<img src="/images/bibliotheke.svg" /> <img src="/images/bibliotheke.svg" />
</a> </a>
<div class="breadcrumbs"> <div class="breadcrumbs">
{{ if eq $scratch.depth "mantle" }} {{ if eq $scratch.depth "mantle" }}
{{ with gt (len $scratch.is_in) 1 }} {{ with gt (len $scratch.is_in) 1 }}
<div class="ddmenu"> <div class="ddmenu">
<input id="toggly0" type="checkbox"> <input id="toggly0" type="checkbox">
<label for="toggly0" tabindex="1"><span class="sup">cf.&nbsp;</span><a href="{{ with (index $scratch.is_in 0) }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ with index $scratch.is_in 0 }}<i>{{ .Title }}</i></a>&nbsp;{{ end }}</label> <label for="toggly0" tabindex="1"><span class="sup">cf.&nbsp;</span><a href="{{ with (index $scratch.is_in 0) }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ with index $scratch.is_in 0 }}<i>{{ .Title }}</i></a>&nbsp;{{ end }}</label>
<div class="hiddendiv"> <div class="hiddendiv">
<ul class="mt-4"> <ul class="mt-4">
{{ range after 1 $scratch.is_in }} {{ range after 1 $scratch.is_in }}
<li><a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><i>{{ .Title }}</i></a></li> <li><a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><i>{{ .Title }}</i></a></li>
{{ end }} {{ end }}
</ul> </ul>
</div> </div>
</div> </div>
{{ else }} {{ else }}
<a href="{{ with (index $scratch.is_in 0) }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><span class="supt">{{ with (index $scratch.is_in 0) }}{{ substr .Title 0 1 }}</span><i>{{ substr .Title 1 }}</i></a>{{ end }} <a href="{{ with (index $scratch.is_in 0) }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><span class="supt">{{ with (index $scratch.is_in 0) }}{{ substr .Title 0 1 }}</span><i>{{ substr .Title 1 }}</i></a>{{ end }}
{{ end }} {{ end }}
<span class="mantlebar"><i> » <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a></i></span> <span class="mantlebar"><i> » <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a></i></span>
{{ end }} {{ end }}
{{ if eq $scratch.depth "crust" }} {{ if eq $scratch.depth "crust" }}
{{ with gt (len $is_in_is_in) 1 }} {{ with gt (len $is_in_is_in) 1 }}
<div class="ddmenu"> <div class="ddmenu">
<input id="toggly1" type="checkbox"> <input id="toggly1" type="checkbox">
<label for="toggly1" tabindex="1"><span class="sup">cf.&nbsp;</span><a href="{{ with (index $is_in_is_in 0) }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ with (index $is_in_is_in 0) }}<i>{{ .Title }}</i></a>&nbsp;{{ end }}</label> <label for="toggly1" tabindex="1"><span class="sup">cf.&nbsp;</span><a href="{{ with (index $is_in_is_in 0) }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ with (index $is_in_is_in 0) }}<i>{{ .Title }}</i></a>&nbsp;{{ end }}</label>
<div class="hiddendiv"> <div class="hiddendiv">
<ul class="mt-4"> <ul class="mt-4">
{{ range after 1 $is_in_is_in }} {{ range after 1 $is_in_is_in }}
<li><a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><i>{{ .Title }}</i></a></li> <li><a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><i>{{ .Title }}</i></a></li>
{{ end }} {{ end }}
</ul> </ul>
</div> </div>
</div> </div>
{{ else }} {{ else }}
{{ $home := index $is_in_is_in 0 }} {{ $home := index $is_in_is_in 0 }}
<a href="{{ $home.RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><span class="supt">{{ substr $home.Title 0 1 }}</span><i>{{ substr $home.Title 1 }}</i></a> <a href="{{ $home.RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><span class="supt">{{ substr $home.Title 0 1 }}</span><i>{{ substr $home.Title 1 }}</i></a>
{{ end }} {{ end }}
{{ with gt (len $scratch.is_in) 1 }} {{ with gt (len $scratch.is_in) 1 }}
»&nbsp; »&nbsp;
<div class="ddmenu"> <div class="ddmenu">
<input id="toggly" type="checkbox"> <input id="toggly" type="checkbox">
<label for="toggly" tabindex="1"><span class="sup">cf.&nbsp;</span><a href="{{ with (index $scratch.is_in 0) }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ with (index $scratch.is_in 0) }}<i>{{ .Title }}</i></a>&nbsp;{{ end }}</label> <label for="toggly" tabindex="1"><span class="sup">cf.&nbsp;</span><a href="{{ with (index $scratch.is_in 0) }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ with (index $scratch.is_in 0) }}<i>{{ .Title }}</i></a>&nbsp;{{ end }}</label>
<div class="hiddendiv"> <div class="hiddendiv">
<ul class="mt-4"> <ul class="mt-4">
{{ range after 1 $scratch.is_in }} {{ range after 1 $scratch.is_in }}
<li><a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><i>{{ .Title }}</i></a></li> <li><a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><i>{{ .Title }}</i></a></li>
{{ end }} {{ end }}
</ul> </ul>
</div> </div>
</div> </div>
{{ else }}»&nbsp;<a href="{{ with (index $scratch.is_in 0) }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ with (index $scratch.is_in 0) }}<i>{{ .Title }}</i></a>{{ end }} {{ else }}»&nbsp;<a href="{{ with (index $scratch.is_in 0) }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ with (index $scratch.is_in 0) }}<i>{{ .Title }}</i></a>{{ end }}
{{ end }} {{ end }}
<span class="mantlebar"><i> » <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a></i></span> <span class="mantlebar"><i> » <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a></i></span>
{{ end }} {{ end }}
</div> </div>
</div> </div>

View file

@ -5,182 +5,182 @@
{{ $pPath := "" }} {{ $pPath := "" }}
{{ range $p := .Site.RegularPages }} {{ range $p := .Site.RegularPages }}
{{ $pPath = printf "/%s" $p.File }} {{ $pPath = printf "/%s" $p.File }}
{{ $pageDir := "" }} {{ $pageDir := "" }}
{{ with $p.File }} {{ with $p.File }}
{{ $pageDir = (substr .Dir 0 -1)}} {{ $pageDir = (substr .Dir 0 -1)}}
{{ end }}
{{ $content := $p.Content }}
{{ with $links := $p.Scratch.Get "links" }}
{{ range $link := $links }}
{{ $linkPath := printf "/%s" $link.File}}
{{ with ($_.Get $linkPath) }}
{{ $_.SetInMap $linkPath "backlinks" (uniq ((index ($_.Get $linkPath) "backlinks") | append $p)) }}
{{ else }}
{{ $_.SetInMap $linkPath "backlinks" (slice $p) }}
{{ end }}
{{ end }} {{ end }}
{{ end }}
{{ with $authors := $p.Params.authors }} {{ $content := $p.Content }}
{{ range $author := $authors }} {{ with $links := $p.Scratch.Get "links" }}
{{ $authorLink := printf "/author/%s" $author }} {{ range $link := $links }}
{{ with ($_.Get $authorLink) }} {{ $linkPath := printf "/%s" $link.File}}
{{ $_.SetInMap $authorLink "backlinks" (uniq ((index ($_.Get $authorLink) "backlinks") | append $p)) }} {{ with ($_.Get $linkPath) }}
{{ else }} {{ $_.SetInMap $linkPath "backlinks" (uniq ((index ($_.Get $linkPath) "backlinks") | append $p)) }}
{{ $_.SetInMap $authorLink "backlinks" (slice $p) }} {{ else }}
{{ end }} {{ $_.SetInMap $linkPath "backlinks" (slice $p) }}
{{ end }}
{{ end }}
{{ $gp := $.GetPage $pPath }}
{{ $gpPath := printf "/%s" $gp.File }}
{{ range $k, $v := $gp.Params }}
{{ with in $k "has_" }}
{{ $s := index (split $k "has_") 1 }}
{{ range $sin,$plur := $currentNode.Site.Data.sandpointsnamegraph }}
{{ if eq $s $plur }}
{{ range index $gp.Params $k }}
{{ $cp := $.GetPage (printf "/%s/%s" $sin .) }}
{{ $cpPath := printf "/%s" $cp.File }}
{{ range $kcp, $vcp := $cp.Params }}
{{ with in $kcp "has_" }}
{{ $scp := index (split $kcp "has_") 1 }}
{{ range $sincp,$plurcp := $currentNode.Site.Data.sandpointsnamegraph }}
{{ if eq $scp $plurcp }}
{{ $_.SetInMap $gpPath "depth" "core" }}
{{ $_.SetInMap $gpPath "child_depth" "mantle" }}
{{ $_.SetInMap $gpPath "has" $s }}
{{ with $gp.File }}
{{ $core := substr .Dir 0 -1 }}
{{ with index ($_.Get $gpPath) "core" }}
{{ $_.SetInMap $gpPath "core" (uniq ((index ($_.Get $gpPath) "core") | append $core)) }}
{{ else }}
{{ $_.SetInMap $gpPath "core" (slice $core) }}
{{ end }}
{{ $cor := $_.Get $cpPath }}
{{ with $cor.core }}
{{ $_.SetInMap $cpPath "core" (uniq ((index ($_.Get $cpPath) "core") | append $core)) }}
{{ else }}
{{ $_.SetInMap $cpPath "core" (slice $core) }}
{{ end }}
{{ end }}
{{ with $cp.File }}
{{ $mantle := substr .Dir 0 -1 }}
{{ with index ($_.Get $gpPath) "mantle" }}
{{ $_.SetInMap $gpPath "mantle" (uniq ((index ($_.Get $gpPath) "mantle") | append $mantle)) }}
{{ else }}
{{ $_.SetInMap $gpPath "mantle" (slice $mantle) }}
{{ end }}
{{ with index ($_.Get $cpPath) "mantle" }}
{{ $_.SetInMap $cpPath "mantle" (uniq ((index ($_.Get $cpPath) "mantle") | append $mantle)) }}
{{ else }}
{{ $_.SetInMap $cpPath "mantle" (slice $mantle) }}
{{ end }}
{{ end }}
{{ with $_.Get $gpPath }}
{{ if .has_children }}
{{ $hasChildren := index . "has_children" | append $cp }}
{{ $_.SetInMap $gpPath "has_children" (uniq $hasChildren) }}
{{ else }}
{{ $_.SetInMap $gpPath "has_children" (slice $cp) }}
{{ end }}
{{ end }}
{{ $_.SetInMap $cpPath "depth" "mantle" }}
{{ $_.SetInMap $cpPath "child_depth" "crust" }}
{{ $_.SetInMap $cpPath "plural" $plur }}
{{ $_.SetInMap $cpPath "has" $scp }}
{{ if isset $cp.Params $kcp }}
{{ $_.SetInMap $cpPath "has_children" (slice) }}
{{ with index ($_.Get $cpPath) "is_in" }}
{{ $isincore := index ($_.Get $cpPath) "is_in" | append $gp}}
{{ $_.SetInMap $cpPath "is_in" (uniq $isincore) }}
{{ else }}
{{ $_.SetInMap $cpPath "is_in" (slice $gp) }}
{{ end }}
{{ end }}
{{ range index $cp.Params $kcp }}
{{ $gcp := $.GetPage (printf "/%s/%s" $sincp .) }}
{{ $gcpPath := printf "/%s" $gcp.File }}
{{ with $_.Get $cpPath }}
{{ if .has_children }}
{{ $hasGChildren := index . "has_children" | append $gcp }}
{{ $_.SetInMap $cpPath "has_children" (uniq $hasGChildren) }}
{{ else }}
{{ $_.SetInMap $cpPath "has_children" (slice $gcp) }}
{{ end }}
{{ end }}
{{ $_.SetInMap $gcpPath "depth" "crust" }}
{{ $_.SetInMap $gcpPath "plural" $plurcp }}
{{ $_.SetInMap $gcpPath "in" (slice $sin $plur) }}
{{ with $gp.File }}
{{ $core := substr .Dir 0 -1 }}
{{ with index ($_.Get $gcpPath) "core" }}
{{ $_.SetInMap $gcpPath "core" (uniq ((index ($_.Get $gcpPath) "core") | append $core)) }}
{{ else }}
{{ $_.SetInMap $gcpPath "core" (slice $core) }}
{{ end }}
{{ end }}
{{ with $cp.File }}
{{ $mantle := substr .Dir 0 -1 }}
{{ with index ($_.Get $gcpPath) "mantle" }}
{{ $_.SetInMap $gcpPath "mantle" (uniq ((index ($_.Get $gcpPath) "mantle") | append $mantle)) }}
{{ else }}
{{ $_.SetInMap $gcpPath "mantle" (slice $mantle) }}
{{ end }}
{{ end }}
{{ with $gcp.File }}
{{ $crust := substr .Dir 0 -1 }}
{{ with index ($_.Get $gpPath) "crust" }}
{{ $_.SetInMap $gpPath "crust" (uniq ((index ($_.Get $gpPath) "crust") | append $crust)) }}
{{ else }}
{{ $_.SetInMap $gpPath "crust" (slice $crust) }}
{{ end }}
{{ with index ($_.Get $cpPath) "crust" }}
{{ $_.SetInMap $cpPath "crust" (uniq ((index ($_.Get $cpPath) "crust") | append $crust)) }}
{{ else }}
{{ $_.SetInMap $cpPath "crust" (slice $crust) }}
{{ end }}
{{ with index ($_.Get $gcpPath) "crust" }}
{{ $_.SetInMap $gcpPath "crust" (uniq ((index ($_.Get $gcpPath) "crust") | append $crust)) }}
{{ else }}
{{ $_.SetInMap $gcpPath "crust" (slice $crust) }}
{{ end }}
{{ end }}
{{ with $_.Get $gcpPath }}
{{ if .is_in }}
{{ $isinmantle := index . "is_in" | append $cp}}
{{ $_.SetInMap $gcpPath "is_in" (uniq $isinmantle) }}
{{ else }}
{{ $_.SetInMap $gcpPath "is_in" (slice $cp) }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }} {{ end }}
{{ end }}
{{ end }} {{ end }}
{{ end }}
{{ end }} {{ end }}
{{ end }}
{{ $_.SetInMap $pPath "debug" (printf "%#v" $debug) }} {{ with $authors := $p.Params.authors }}
{{ range $author := $authors }}
{{ $authorLink := printf "/author/%s" $author }}
{{ with ($_.Get $authorLink) }}
{{ $_.SetInMap $authorLink "backlinks" (uniq ((index ($_.Get $authorLink) "backlinks") | append $p)) }}
{{ else }}
{{ $_.SetInMap $authorLink "backlinks" (slice $p) }}
{{ end }}
{{ end }}
{{ end }}
{{ $gp := $.GetPage $pPath }}
{{ $gpPath := printf "/%s" $gp.File }}
{{ range $k, $v := $gp.Params }}
{{ with in $k "has_" }}
{{ $s := index (split $k "has_") 1 }}
{{ range $sin,$plur := $currentNode.Site.Data.sandpointsnamegraph }}
{{ if eq $s $plur }}
{{ range index $gp.Params $k }}
{{ $cp := $.GetPage (printf "/%s/%s" $sin .) }}
{{ $cpPath := printf "/%s" $cp.File }}
{{ range $kcp, $vcp := $cp.Params }}
{{ with in $kcp "has_" }}
{{ $scp := index (split $kcp "has_") 1 }}
{{ range $sincp,$plurcp := $currentNode.Site.Data.sandpointsnamegraph }}
{{ if eq $scp $plurcp }}
{{ $_.SetInMap $gpPath "depth" "core" }}
{{ $_.SetInMap $gpPath "child_depth" "mantle" }}
{{ $_.SetInMap $gpPath "has" $s }}
{{ with $gp.File }}
{{ $core := substr .Dir 0 -1 }}
{{ with index ($_.Get $gpPath) "core" }}
{{ $_.SetInMap $gpPath "core" (uniq ((index ($_.Get $gpPath) "core") | append $core)) }}
{{ else }}
{{ $_.SetInMap $gpPath "core" (slice $core) }}
{{ end }}
{{ $cor := $_.Get $cpPath }}
{{ with $cor.core }}
{{ $_.SetInMap $cpPath "core" (uniq ((index ($_.Get $cpPath) "core") | append $core)) }}
{{ else }}
{{ $_.SetInMap $cpPath "core" (slice $core) }}
{{ end }}
{{ end }}
{{ with $cp.File }}
{{ $mantle := substr .Dir 0 -1 }}
{{ with index ($_.Get $gpPath) "mantle" }}
{{ $_.SetInMap $gpPath "mantle" (uniq ((index ($_.Get $gpPath) "mantle") | append $mantle)) }}
{{ else }}
{{ $_.SetInMap $gpPath "mantle" (slice $mantle) }}
{{ end }}
{{ with index ($_.Get $cpPath) "mantle" }}
{{ $_.SetInMap $cpPath "mantle" (uniq ((index ($_.Get $cpPath) "mantle") | append $mantle)) }}
{{ else }}
{{ $_.SetInMap $cpPath "mantle" (slice $mantle) }}
{{ end }}
{{ end }}
{{ with $_.Get $gpPath }}
{{ if .has_children }}
{{ $hasChildren := index . "has_children" | append $cp }}
{{ $_.SetInMap $gpPath "has_children" (uniq $hasChildren) }}
{{ else }}
{{ $_.SetInMap $gpPath "has_children" (slice $cp) }}
{{ end }}
{{ end }}
{{ $_.SetInMap $cpPath "depth" "mantle" }}
{{ $_.SetInMap $cpPath "child_depth" "crust" }}
{{ $_.SetInMap $cpPath "plural" $plur }}
{{ $_.SetInMap $cpPath "has" $scp }}
{{ if isset $cp.Params $kcp }}
{{ $_.SetInMap $cpPath "has_children" (slice) }}
{{ with index ($_.Get $cpPath) "is_in" }}
{{ $isincore := index ($_.Get $cpPath) "is_in" | append $gp}}
{{ $_.SetInMap $cpPath "is_in" (uniq $isincore) }}
{{ else }}
{{ $_.SetInMap $cpPath "is_in" (slice $gp) }}
{{ end }}
{{ end }}
{{ range index $cp.Params $kcp }}
{{ $gcp := $.GetPage (printf "/%s/%s" $sincp .) }}
{{ $gcpPath := printf "/%s" $gcp.File }}
{{ with $_.Get $cpPath }}
{{ if .has_children }}
{{ $hasGChildren := index . "has_children" | append $gcp }}
{{ $_.SetInMap $cpPath "has_children" (uniq $hasGChildren) }}
{{ else }}
{{ $_.SetInMap $cpPath "has_children" (slice $gcp) }}
{{ end }}
{{ end }}
{{ $_.SetInMap $gcpPath "depth" "crust" }}
{{ $_.SetInMap $gcpPath "plural" $plurcp }}
{{ $_.SetInMap $gcpPath "in" (slice $sin $plur) }}
{{ with $gp.File }}
{{ $core := substr .Dir 0 -1 }}
{{ with index ($_.Get $gcpPath) "core" }}
{{ $_.SetInMap $gcpPath "core" (uniq ((index ($_.Get $gcpPath) "core") | append $core)) }}
{{ else }}
{{ $_.SetInMap $gcpPath "core" (slice $core) }}
{{ end }}
{{ end }}
{{ with $cp.File }}
{{ $mantle := substr .Dir 0 -1 }}
{{ with index ($_.Get $gcpPath) "mantle" }}
{{ $_.SetInMap $gcpPath "mantle" (uniq ((index ($_.Get $gcpPath) "mantle") | append $mantle)) }}
{{ else }}
{{ $_.SetInMap $gcpPath "mantle" (slice $mantle) }}
{{ end }}
{{ end }}
{{ with $gcp.File }}
{{ $crust := substr .Dir 0 -1 }}
{{ with index ($_.Get $gpPath) "crust" }}
{{ $_.SetInMap $gpPath "crust" (uniq ((index ($_.Get $gpPath) "crust") | append $crust)) }}
{{ else }}
{{ $_.SetInMap $gpPath "crust" (slice $crust) }}
{{ end }}
{{ with index ($_.Get $cpPath) "crust" }}
{{ $_.SetInMap $cpPath "crust" (uniq ((index ($_.Get $cpPath) "crust") | append $crust)) }}
{{ else }}
{{ $_.SetInMap $cpPath "crust" (slice $crust) }}
{{ end }}
{{ with index ($_.Get $gcpPath) "crust" }}
{{ $_.SetInMap $gcpPath "crust" (uniq ((index ($_.Get $gcpPath) "crust") | append $crust)) }}
{{ else }}
{{ $_.SetInMap $gcpPath "crust" (slice $crust) }}
{{ end }}
{{ end }}
{{ with $_.Get $gcpPath }}
{{ if .is_in }}
{{ $isinmantle := index . "is_in" | append $cp}}
{{ $_.SetInMap $gcpPath "is_in" (uniq $isinmantle) }}
{{ else }}
{{ $_.SetInMap $gcpPath "is_in" (slice $cp) }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ $_.SetInMap $pPath "debug" (printf "%#v" $debug) }}
{{ end }} {{ end }}
{{ return $_ }} {{ return $_ }}

View file

@ -12,9 +12,9 @@
<div class="grid"> <div class="grid">
<div class="leftcolumn"> <div class="leftcolumn">
{{ if ne (trim .Page.TableOfContents "\n") "<nav id=\"TableOfContents\"></nav>" }} {{ if ne (trim .Page.TableOfContents "\n") "<nav id=\"TableOfContents\"></nav>" }}
{{ .Page.TableOfContents }} {{ .Page.TableOfContents }}
{{ end }} {{ end }}
</div> </div>
<div class="rightcolumn"> <div class="rightcolumn">
{{- range $k, $v := .Page.Params.authors -}} {{- range $k, $v := .Page.Params.authors -}}
@ -22,7 +22,7 @@
{{- with not $k -}} {{- with not $k -}}
<div class="has hasauthors"> <div class="has hasauthors">
<div class="hassup">author{{ with $.Page.Params.authors }}{{ if gt (len .) 1 }}s{{ end }}{{ end }}</div> <div class="hassup">author{{ with $.Page.Params.authors }}{{ if gt (len .) 1 }}s{{ end }}{{ end }}</div>
<div class="afterhas"> <div class="afterhas">
{{- end -}} {{- end -}}
<div class="crust"> <div class="crust">
<a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a> <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
@ -36,39 +36,39 @@
{{ with $scratch.backlinks }} {{ with $scratch.backlinks }}
<div class="hassup">mentioned in</div> <div class="hassup">mentioned in</div>
{{ end }} {{ end }}
<div class="afterhas"> <div class="afterhas">
{{ range $scratch.backlinks }} {{ range $scratch.backlinks }}
<div class="{{ $scratch.child_depth }}"> <div class="{{ $scratch.child_depth }}">
<a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a> <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
</div> </div>
{{ end }} {{ end }}
</div></div> </div></div>
{{ end }} {{ end }}
{{ if and (not (eq $scratch.depth "crust")) $scratch.has_children }} {{ if and (not (eq $scratch.depth "crust")) $scratch.has_children }}
<div class="has"> <div class="has">
{{ with $scratch.has }} {{ with $scratch.has }}
<div class="hassup">has {{ $scratch.has }}</div> <div class="hassup">has {{ $scratch.has }}</div>
{{ end }}
<div class="afterhas">
{{ range $scratch.has_children }}
<div class="{{ $scratch.child_depth }}">
<a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
</div>
{{ end }} {{ end }}
</div></div> <div class="afterhas">
{{ range $scratch.has_children }}
<div class="{{ $scratch.child_depth }}">
<a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
</div>
{{ end }}
</div></div>
{{ end }} {{ end }}
{{ if eq $scratch.depth "crust" }} {{ if eq $scratch.depth "crust" }}
<div class="has"> <div class="has">
<div class="hassup">in {{ index $scratch.in 1 }}</div> <div class="hassup">in {{ index $scratch.in 1 }}</div>
<div class="afterhas"> <div class="afterhas">
{{ range $scratch.is_in }} {{ range $scratch.is_in }}
<div class="{{ substr $currentDir 0 -1 }}"> <div class="{{ substr $currentDir 0 -1 }}">
<a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a> <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
</div> </div>
{{ end }} {{ end }}
</div></div> </div></div>
{{ end }} {{ end }}
</div> </div>
</div> </div>
@ -77,5 +77,5 @@
{{ with .Page.Params.abstract }}<div class="journal"></div><div class="abstract"><span class="supt">abstract</span>{{ . | markdownify }}</div>{{ end }} {{ with .Page.Params.abstract }}<div class="journal"></div><div class="abstract"><span class="supt">abstract</span>{{ . | markdownify }}</div>{{ end }}
{{- $vld := false -}}{{- range $k, $v := .Page.Params.keywords -}}{{- if eq $k 0 -}}{{- $vld = true -}}<div {{- $vld := false -}}{{- range $k, $v := .Page.Params.keywords -}}{{- if eq $k 0 -}}{{- $vld = true -}}<div
class="keywords"><span class="sup">keywords</span>{{- $v -}}{{- else -}},&nbsp;{{- $v -}}{{- end -}}{{- end -}}{{- with $vld -}}</div>{{- end -}} class="keywords"><span class="sup">keywords</span>{{- $v -}}{{- else -}},&nbsp;{{- $v -}}{{- end -}}{{- end -}}{{- with $vld -}}</div>{{- end -}}
{{ with .Page.Params.abstract }}</div>{{ end }} {{ with .Page.Params.abstract }}</div>{{ end }}

View file

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{- else -}}en-us{{- end -}}">
<head>
{{- partialCached "head.html" . -}}
{{- partial "pagedjs.html" . -}}
</head>
<body>
<article>
{{- block "singlebody" . -}}{{- end -}}
</article>
</body>
</html>

View file

@ -0,0 +1,24 @@
{{- define "singlebody" -}}
{{ $s := partialCached "scratch.html" . }}
{{ $p := $.GetPage .Params.print }}
{{ $scratch := $s.Get (printf "/%s" $p.File) }}
{{ $currentDir := "" }}
{{ with .File }}
{{ $currentDir = .Dir }}
{{ end }}
<div class="print0">{{ partial "singlebody.html" $p }}</div>
<div class="content">{{ $p.Content }}
{{ range $printPage := $scratch.has_cildren }}
<div class="print1">{{ partial "singlebody.html" $printPage }}</div>
<div class="content">{{ $printPage.Content }}
{{ $printPageScratch := $s.Get (printf "/%s" $printPage.File) }}
{{ range $printPageKid := $printPageScratch.has_children }}
<div class="print2">{{ partial "singlebody.html" $printPageKid }}</div>
<div class="content">{{ $printPageKid.Content }}
{{ . }}
{{ end }}
</div>
{{ end }}
{{- end -}}

View file

@ -1,25 +1,25 @@
{{ $inn := .Inner | $.Page.RenderString }} {{ $inn := .Inner | $.Page.RenderString }}
<div class="glosscontainer"> <div class="glosscontainer">
<div class="gloss"> <div class="gloss">
{{- range $g := (split $inn "\n") -}} {{- range $g := (split $inn "\n") -}}
{{- if hasPrefix $g "{r}" -}} {{- if hasPrefix $g "{r}" -}}
<div class="glossregular"> <div class="glossregular">
{{- substr $g 3 | htmlUnescape | safeHTML -}} {{- substr $g 3 | htmlUnescape | safeHTML -}}
</div> </div>
{{- else if hasPrefix $g "{g}" -}} {{- else if hasPrefix $g "{g}" -}}
<div class="glossline"> <div class="glossline">
{{- range (split (substr $g 3) "|") -}} {{- range (split (substr $g 3) "|") -}}
{{- with . -}} {{- with . -}}
<div class="glosswords"> <div class="glosswords">
{{- range (split . "," ) -}} {{- range (split . "," ) -}}
<div class="glossword">{{- . | htmlUnescape | safeHTML -}}</div> <div class="glossword">{{- . | htmlUnescape | safeHTML -}}</div>
{{- end -}} {{- end -}}
</div> </div>
{{- end -}}
{{- end -}}
</div>
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
</div> </div>
<div class="glossnumber {{ with $.Page.Params.glossnumberAuto }}glossnumberAuto{{ end }}">{{ with .Get 0 }}{{ . }}{{ end}}</div> {{- end -}}
</div> {{- end -}}
</div>
<div class="glossnumber {{ with $.Page.Params.glossnumberAuto }}glossnumberAuto{{ end }}">{{ with .Get 0 }}{{ . }}{{ end}}</div>
</div>

View file

@ -1,10 +1,10 @@
{{ $id := index .Params 0 }} {{ $id := index .Params 0 }}
{{ $type := index .Params 1 | default "track" }} {{ $type := index .Params 1 | default "track" }}
<iframe <iframe
width="100%" width="100%"
height="300" height="300"
scrolling="no" scrolling="no"
frameborder="no" frameborder="no"
allow="autoplay" allow="autoplay"
src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/{{ $type }}s/{{ $id }}&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true"> src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/{{ $type }}s/{{ $id }}&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true">
</iframe> </iframe>

View file

@ -1,12 +1,12 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-us{{ end }}"> <html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-us{{ end }}">
<head> <head>
{{- partialCached "head.html" . -}} {{- partialCached "head.html" . -}}
<title>{{- .Title }} - {{ .Site.Title -}}</title> <title>{{- .Title }} - {{ .Site.Title -}}</title>
{{- partialCached "sandpointjs.html" . .RelPermalink -}} {{- partialCached "sandpointjs.html" . .RelPermalink -}}
</head> </head>
<body> <body>
{{ block "urls" . }}{{ end }} {{ block "urls" . }}{{ end }}
{{- partialCached "footer.html" . -}} {{- partialCached "footer.html" . -}}
</body> </body>
</html> </html>

View file

@ -1,106 +1,106 @@
{{ define "urls" }} {{ define "urls" }}
<h2>Backlinks, outgoing URLs, bibliographic references and internal links:</h2> <h2>Backlinks, outgoing URLs, bibliographic references and internal links:</h2>
{{ $s := partialCached "scratch.html" . }} {{ $s := partialCached "scratch.html" . }}
<div id="toggleAllLinks" onclick="toggleAllLinks()">[toggle expand/collapse]</div> <div id="toggleAllLinks" onclick="toggleAllLinks()">[toggle expand/collapse]</div>
<p></p> <p></p>
{{ range $p := .Site.RegularPages }} {{ range $p := .Site.RegularPages }}
{{ with or ($p.Scratch.Get "urls") ($p.Scratch.Get "bibs") ($p.Scratch.Get "links") ($p.Scratch.Get "backlinks" )}} {{ with or ($p.Scratch.Get "urls") ($p.Scratch.Get "bibs") ($p.Scratch.Get "links") ($p.Scratch.Get "backlinks" )}}
<details><summary>{{ with $p.File }}<span class="sup">{{- substr .Dir 0 -1 -}}</span>{{ end }}<a href="{{ $p.RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ $p.Title }}</a></summary> <details><summary>{{ with $p.File }}<span class="sup">{{- substr .Dir 0 -1 -}}</span>{{ end }}<a href="{{ $p.RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ $p.Title }}</a></summary>
{{ $pPath := printf "/%s" $p.File }}
{{ with $ss := $s.Get $pPath }}
{{ with $ss.backlinks }}
{{ range $i, $_ := $ss.backlinks }}
{{ if eq $i 0 }}
<details><summary>Mentioned in other Sandpoints pages ({{ len $ss.backlinks }}):</summary><ul>
{{ end }}
<li>{{ with $_.File }}<span class="sup">{{ substr .Dir 0 -1 }}</span>{{ end }}<a href="{{ $_.RelPermalink }}">{{ $_.Title }}</a></li>
{{ end }}
</ul></details>
{{ end }}
{{ end }}
{{ with ($p.Scratch.Get "links") }}
{{ range $i, $_ := ($p.Scratch.Get "links") }}
{{ if eq $i 0 }}
<details><summary>Internal links to other Sandpoint pages ({{ len ($p.Scratch.Get "links") }}):</summary><ul>
{{ end }}
<li>{{ with $_.File }}<span class="sup">{{ substr .Dir 0 -1 }}</span>{{ end }}<a href="{{ $_.RelPermalink }}">{{ $_.Title }}</a></li>
{{ end }}
</ul></details>
{{ end }}
{{ $http_links := (slice) }}
{{ $library_links := (slice) }}
{{ $anchor_links := (slice) }}
{{ $other_links := (slice) }}
{{ with ($p.Scratch.Get "urls") }}
{{- $c_prefix := $p.Site.Params.sandpointsCatalogPrefix | default "/library/" -}}
{{ range $i, $_ := ($p.Scratch.Get "urls") }}
{{ if strings.HasPrefix $_ "http" }}
{{ $http_links = $http_links | append $_ }}
{{ else if strings.HasPrefix $_ $c_prefix }}
{{ $library_links = $library_links | append $_ }}
{{ else}}
{{ $other_links = $other_links | append $_ }}
{{ end }}
{{ end }}
{{ end }}
{{ with $http_links }}
{{ range $i, $_ := $http_links }}
{{ if eq $i 0 }}
<details><summary>Outgoing links to other pages on Internet ({{ len $http_links }}):</summary><ul>
{{ end }}
<li><span class="sup">www</span><a href="{{ $_ }}" target="_blank">{{ $_ }}</a></li>
{{ end }}
</ul></details>
{{ end }}
{{ with $library_links }}
{{ range $i, $_ := $library_links }}
{{ if eq $i 0 }}
<details><summary>Links to Sandpoint's library ({{ len $library_links }}):</summary><ul>
{{ end }}
<li><span class="sup">lib</span><a href="{{ $_ }}" target="_blank">{{ $_ }}</a></li>
{{ end }}
</ul></details>
{{ end }}
{{ with ($p.Scratch.Get "bibs") }}
{{ range $i, $_ := ($p.Scratch.Get "bibs") }}
{{ if eq $i 0 }}
<details><summary>Bibliographic references ({{ len ($p.Scratch.Get "bibs") }}):</summary><ul>
{{ end }}
<li><span class="sup">bib</span><a href="{{ index $_ 0 }}" target="_blank">{{ index $_ 1 }}</a></li>
{{ end }}
</ul></details>
{{ end }}
{{ with $other_links }}
{{ $formattingN := 0 }}
{{ $anchorN := 0 }}
{{ range $i, $_ := $other_links }}
{{ if eq $i 0 }}
<details><summary>Anchor, formatting and other links ({{ len $other_links }}):</summary><ul>
{{ end }}
{{ if strings.HasPrefix $_ "#" }}
{{ $anchorN = add $anchorN 1 }}
{{ else if strings.HasPrefix $_ "{"}}
{{ $formattingN = add $formattingN 1 }}
{{ else }}
<li><span class="sup">other</span><a href="{{ $_ }}" target="_blank">{{ $_ }}</a></li>
{{ end }}
{{ end }}
{{ with $formattingN }}<li>{{ $formattingN }} formatting links.</a></li>{{ end }}
{{ with $anchorN }}<li>{{ $anchorN }} anchor links.</a></li>{{ end }}
</ul></details>
{{ end }}
</details>
{{ $pPath := printf "/%s" $p.File }}
{{ with $ss := $s.Get $pPath }}
{{ with $ss.backlinks }}
{{ range $i, $_ := $ss.backlinks }}
{{ if eq $i 0 }}
<details><summary>Mentioned in other Sandpoints pages ({{ len $ss.backlinks }}):</summary><ul>
{{ end }}
<li>{{ with $_.File }}<span class="sup">{{ substr .Dir 0 -1 }}</span>{{ end }}<a href="{{ $_.RelPermalink }}">{{ $_.Title }}</a></li>
{{ end }}
</ul></details>
{{ end }} {{ end }}
{{ end }}
{{ with ($p.Scratch.Get "links") }}
{{ range $i, $_ := ($p.Scratch.Get "links") }}
{{ if eq $i 0 }}
<details><summary>Internal links to other Sandpoint pages ({{ len ($p.Scratch.Get "links") }}):</summary><ul>
{{ end }}
<li>{{ with $_.File }}<span class="sup">{{ substr .Dir 0 -1 }}</span>{{ end }}<a href="{{ $_.RelPermalink }}">{{ $_.Title }}</a></li>
{{ end }}
</ul></details>
{{ end }}
{{ $http_links := (slice) }}
{{ $library_links := (slice) }}
{{ $anchor_links := (slice) }}
{{ $other_links := (slice) }}
{{ with ($p.Scratch.Get "urls") }}
{{- $c_prefix := $p.Site.Params.sandpointsCatalogPrefix | default "/library/" -}}
{{ range $i, $_ := ($p.Scratch.Get "urls") }}
{{ if strings.HasPrefix $_ "http" }}
{{ $http_links = $http_links | append $_ }}
{{ else if strings.HasPrefix $_ $c_prefix }}
{{ $library_links = $library_links | append $_ }}
{{ else}}
{{ $other_links = $other_links | append $_ }}
{{ end }}
{{ end }}
{{ end }}
{{ with $http_links }}
{{ range $i, $_ := $http_links }}
{{ if eq $i 0 }}
<details><summary>Outgoing links to other pages on Internet ({{ len $http_links }}):</summary><ul>
{{ end }}
<li><span class="sup">www</span><a href="{{ $_ }}" target="_blank">{{ $_ }}</a></li>
{{ end }}
</ul></details>
{{ end }}
{{ with $library_links }}
{{ range $i, $_ := $library_links }}
{{ if eq $i 0 }}
<details><summary>Links to Sandpoint's library ({{ len $library_links }}):</summary><ul>
{{ end }}
<li><span class="sup">lib</span><a href="{{ $_ }}" target="_blank">{{ $_ }}</a></li>
{{ end }}
</ul></details>
{{ end }}
{{ with ($p.Scratch.Get "bibs") }}
{{ range $i, $_ := ($p.Scratch.Get "bibs") }}
{{ if eq $i 0 }}
<details><summary>Bibliographic references ({{ len ($p.Scratch.Get "bibs") }}):</summary><ul>
{{ end }}
<li><span class="sup">bib</span><a href="{{ index $_ 0 }}" target="_blank">{{ index $_ 1 }}</a></li>
{{ end }}
</ul></details>
{{ end }}
{{ with $other_links }}
{{ $formattingN := 0 }}
{{ $anchorN := 0 }}
{{ range $i, $_ := $other_links }}
{{ if eq $i 0 }}
<details><summary>Anchor, formatting and other links ({{ len $other_links }}):</summary><ul>
{{ end }}
{{ if strings.HasPrefix $_ "#" }}
{{ $anchorN = add $anchorN 1 }}
{{ else if strings.HasPrefix $_ "{"}}
{{ $formattingN = add $formattingN 1 }}
{{ else }}
<li><span class="sup">other</span><a href="{{ $_ }}" target="_blank">{{ $_ }}</a></li>
{{ end }}
{{ end }}
{{ with $formattingN }}<li>{{ $formattingN }} formatting links.</a></li>{{ end }}
{{ with $anchorN }}<li>{{ $anchorN }} anchor links.</a></li>{{ end }}
</ul></details>
{{ end }}
</details>
{{ end }} {{ end }}
{{ end }}
{{ end }} {{ end }}

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
# git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20201214030348-c507484d5529 # git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20201218222521-33a423ebe113