let's try !publish!
This commit is contained in:
parent
676f232539
commit
ee16267b90
19 changed files with 642 additions and 574 deletions
|
@ -307,6 +307,10 @@ body {
|
|||
color: black;
|
||||
}
|
||||
|
||||
#preview {
|
||||
display: none;
|
||||
}
|
||||
|
||||
sup,
|
||||
sub {
|
||||
vertical-align: baseline;
|
||||
|
|
|
@ -1,83 +1,115 @@
|
|||
window.addEventListener('scroll', function(e) {
|
||||
if (document.querySelector('body').clientWidth > 767) {
|
||||
let rightcolumn = document.querySelector('.rightcolumn');
|
||||
let mantletitle = document.querySelector('.mantletitle') || document.querySelector('.crusttitle') || false;
|
||||
window.addEventListener("scroll", function (e) {
|
||||
if (document.querySelector("body").clientWidth > 767) {
|
||||
let rightcolumn = document.querySelector(".rightcolumn");
|
||||
let mantletitle =
|
||||
document.querySelector(".mantletitle") ||
|
||||
document.querySelector(".crusttitle") ||
|
||||
false;
|
||||
if (!mantletitle) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
let mantlebar = document.querySelector('.mantlebar')
|
||||
let grid = document.querySelector('.grid')
|
||||
let mantlebar = document.querySelector(".mantlebar");
|
||||
let grid = document.querySelector(".grid");
|
||||
let gridrect = mantletitle.getBoundingClientRect();
|
||||
|
||||
if ((document.querySelector('body').clientHeight - (grid.clientHeight + mantletitle.clientHeight + 32)) < window.innerHeight) {
|
||||
return
|
||||
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');
|
||||
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');
|
||||
} 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;
|
||||
let rightcolumn = document.querySelector(".rightcolumn");
|
||||
let mantletitle =
|
||||
document.querySelector(".mantletitle") ||
|
||||
document.querySelector(".crusttitle") ||
|
||||
false;
|
||||
if (!mantletitle) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
let mantlebar = document.querySelector('.mantlebar')
|
||||
let grid = document.querySelector('.grid')
|
||||
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');
|
||||
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');
|
||||
} 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 par = document.querySelector("#TableOfContents > ol:first-child > li:first-child");
|
||||
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)
|
||||
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);
|
||||
let relPath = "../".repeat(relPathDepth - 1);
|
||||
|
||||
var popcorn = document.createElement('script');
|
||||
var popcorn = document.createElement("script");
|
||||
popcorn.src = `${relPath}js/popcorn.min.js`;
|
||||
document.body.appendChild(popcorn);
|
||||
|
||||
var soundcite = document.createElement('script');
|
||||
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 => {
|
||||
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);
|
||||
})
|
||||
})
|
||||
})
|
||||
window.scrollBy({
|
||||
top: document.querySelector(".header").clientHeight * -1.25,
|
||||
behavior: "smooth",
|
||||
});
|
||||
}, 50);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
toggleAllLinks = function () {
|
||||
document.querySelectorAll('details').forEach(i => {
|
||||
document.querySelectorAll("details").forEach((i) => {
|
||||
if (i.open) {
|
||||
i.removeAttribute('open');
|
||||
i.removeAttribute("open");
|
||||
} else {
|
||||
i.setAttribute('open', true);
|
||||
i.setAttribute("open", true);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
@ -1,21 +1,20 @@
|
|||
{{ define "singlebody" }}
|
||||
|
||||
{{ $currentNode := . }}
|
||||
{{ $currentDir := "" }}
|
||||
{{ with .File }}
|
||||
{{ $currentDir = .Dir }}
|
||||
{{ end }}
|
||||
{{ $currentFile := (printf "/%s" .File) }}
|
||||
|
||||
{{ $currentNode := . }}
|
||||
{{ $currentDir := "" }}
|
||||
{{ with .File }}
|
||||
{{ $currentDir = .Dir }}
|
||||
{{ end }}
|
||||
{{ $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" . }}
|
||||
{{ $noTriad := (slice) }}
|
||||
{{ range $p := .Site.RegularPages }}
|
||||
{{ $scratch := $s.Get (printf "/%s" $p.File) }}
|
||||
{{ 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>
|
||||
{{ $s := partialCached "scratch.html" . }}
|
||||
{{ $noTriad := (slice) }}
|
||||
{{ range $p := .Site.RegularPages }}
|
||||
{{ $scratch := $s.Get (printf "/%s" $p.File) }}
|
||||
{{ 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>
|
||||
{{ 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>
|
||||
{{ $scratchCKid := $s.Get (printf "/%s" $coreKid.File) }}
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
{{- define "singlebody" -}}
|
||||
|
||||
{{- partialCached "header.html" . .RelPermalink -}}
|
||||
|
||||
<h1>{{ .Title }}</h1>
|
||||
|
||||
{{- partialCached "singlebody.html" . .RelPermalink -}}
|
||||
|
||||
<div class="content">{{ .Content }}</div>
|
||||
|
||||
{{- partialCached "header.html" . .RelPermalink -}}
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{- partialCached "singlebody.html" . .RelPermalink -}}
|
||||
<div class="content">{{ .Content }}</div>
|
||||
{{- end -}}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
{{ .Scratch }}
|
|
@ -4,13 +4,15 @@
|
|||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
{{ if .Description }}
|
||||
<meta name="description" content="{{ .Description }}" />
|
||||
<meta name="description" content="{{ .Description }}" />
|
||||
{{ end }}
|
||||
|
||||
{{ if .Keywords }}
|
||||
<meta name="keywords" content="{{ delimit .Keywords "," }}" />
|
||||
<meta name="keywords" content="{{ delimit .Keywords "," }}" />
|
||||
{{ end }}
|
||||
|
||||
{{ if .Params.Author }}
|
||||
<meta name="author" content="{{ .Params.Author}}" />
|
||||
<meta name="author" content="{{ .Params.Author}}" />
|
||||
{{ end }}
|
||||
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
{{ $is_in_is_in = $is_in_is_in | append ($.GetPage .) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if eq hugo.Environment "preview" }}
|
||||
<div class="headiter">
|
||||
{{ if eq hugo.Environment "gitea" }}
|
||||
<div class="headiter" id="preview">
|
||||
<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.mantle }}<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_new/master/content/{{ index . 0 }}/">ADD_{{ index . 0 | upper }}</a>{{ end }}
|
||||
|
|
|
@ -180,7 +180,7 @@
|
|||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $_.SetInMap $pPath "debug" (printf "%#v" $debug) }}
|
||||
{{ $_.SetInMap $pPath "debug" (printf "%#v" $debug) }}
|
||||
{{ end }}
|
||||
|
||||
{{ return $_ }}
|
||||
|
|
13
_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/print/baseof.html
generated
Normal file
13
_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/print/baseof.html
generated
Normal 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>
|
24
_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/print/single.html
generated
Normal file
24
_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/print/single.html
generated
Normal 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 -}}
|
2
_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/static/css/site.min.css
generated
vendored
2
_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/static/css/site.min.css
generated
vendored
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
# git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20201214030348-c507484d5529
|
||||
# git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20201218222521-33a423ebe113
|
||||
|
|
Loading…
Add table
Reference in a new issue