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;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#preview {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
sup,
|
sup,
|
||||||
sub {
|
sub {
|
||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
|
|
|
@ -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 =
|
||||||
|
document.querySelector(".mantletitle") ||
|
||||||
|
document.querySelector(".crusttitle") ||
|
||||||
|
false;
|
||||||
if (!mantletitle) {
|
if (!mantletitle) {
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
let mantlebar = document.querySelector('.mantlebar')
|
let mantlebar = document.querySelector(".mantlebar");
|
||||||
let grid = document.querySelector('.grid')
|
let grid = document.querySelector(".grid");
|
||||||
let gridrect = mantletitle.getBoundingClientRect();
|
let gridrect = mantletitle.getBoundingClientRect();
|
||||||
|
|
||||||
if ((document.querySelector('body').clientHeight - (grid.clientHeight + mantletitle.clientHeight + 32)) < window.innerHeight) {
|
if (
|
||||||
return
|
document.querySelector("body").clientHeight -
|
||||||
|
(grid.clientHeight + mantletitle.clientHeight + 32) <
|
||||||
|
window.innerHeight
|
||||||
|
) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gridrect.top < 20 && !grid.classList.contains('moved')) {
|
if (gridrect.top < 20 && !grid.classList.contains("moved")) {
|
||||||
grid.classList.add('moved');
|
grid.classList.add("moved");
|
||||||
mantlebar.style.display = "inline";
|
mantlebar.style.display = "inline";
|
||||||
mantletitle.style.visibility = "hidden";
|
mantletitle.style.visibility = "hidden";
|
||||||
} else if (gridrect.top > 21 && grid.classList.contains('moved')) {
|
} else if (gridrect.top > 21 && grid.classList.contains("moved")) {
|
||||||
grid.classList.remove('moved');
|
grid.classList.remove("moved");
|
||||||
mantletitle.style.visibility = "visible";
|
mantletitle.style.visibility = "visible";
|
||||||
mantlebar.style.display = "none";
|
mantlebar.style.display = "none";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let rightcolumn = document.querySelector('.rightcolumn');
|
let rightcolumn = document.querySelector(".rightcolumn");
|
||||||
let mantletitle = document.querySelector('.mantletitle') || document.querySelector('.crusttitle') || false;
|
let mantletitle =
|
||||||
|
document.querySelector(".mantletitle") ||
|
||||||
|
document.querySelector(".crusttitle") ||
|
||||||
|
false;
|
||||||
if (!mantletitle) {
|
if (!mantletitle) {
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
let mantlebar = document.querySelector('.mantlebar')
|
let mantlebar = document.querySelector(".mantlebar");
|
||||||
let grid = document.querySelector('.grid')
|
let grid = document.querySelector(".grid");
|
||||||
let gridrect = mantletitle.getBoundingClientRect();
|
let gridrect = mantletitle.getBoundingClientRect();
|
||||||
|
|
||||||
if (gridrect.top < 20 && !grid.classList.contains('moved')) {
|
if (gridrect.top < 20 && !grid.classList.contains("moved")) {
|
||||||
grid.classList.add('moved');
|
grid.classList.add("moved");
|
||||||
mantlebar.style.display = "inline";
|
mantlebar.style.display = "inline";
|
||||||
mantletitle.style.visibility = "hidden";
|
mantletitle.style.visibility = "hidden";
|
||||||
} else if (gridrect.top > 21 && grid.classList.contains('moved')) {
|
} else if (gridrect.top > 21 && grid.classList.contains("moved")) {
|
||||||
grid.classList.remove('moved');
|
grid.classList.remove("moved");
|
||||||
mantletitle.style.visibility = "visible";
|
mantletitle.style.visibility = "visible";
|
||||||
mantlebar.style.display = "none";
|
mantlebar.style.display = "none";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
window.addEventListener('DOMContentLoaded', (e) => {
|
window.addEventListener("DOMContentLoaded", (e) => {
|
||||||
let par = document.querySelector("#TableOfContents > ol:first-child > li:first-child");
|
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");
|
let s = document.createElement("span");
|
||||||
s.appendChild(par.cloneNode(true))
|
s.appendChild(par.cloneNode(true));
|
||||||
par.remove()
|
par.remove();
|
||||||
document.querySelector("#TableOfContents > ol:first-child").insertBefore(s, document.querySelector("#TableOfContents > ol:first-child").firstChild)
|
document
|
||||||
|
.querySelector("#TableOfContents > ol:first-child")
|
||||||
|
.insertBefore(
|
||||||
|
s,
|
||||||
|
document.querySelector("#TableOfContents > ol:first-child").firstChild
|
||||||
|
);
|
||||||
|
|
||||||
if (document.querySelector(".soundcite")) {
|
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`;
|
popcorn.src = `${relPath}js/popcorn.min.js`;
|
||||||
document.body.appendChild(popcorn);
|
document.body.appendChild(popcorn);
|
||||||
|
|
||||||
var soundcite = document.createElement('script');
|
var soundcite = document.createElement("script");
|
||||||
soundcite.src = `${relPath}js/soundcite.min.js`;
|
soundcite.src = `${relPath}js/soundcite.min.js`;
|
||||||
document.body.appendChild(soundcite);
|
document.body.appendChild(soundcite);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
document.querySelectorAll('#TableOfContents a, .anchorz, .footnote-backref, .footnote-ref').forEach(i => {
|
document
|
||||||
i.addEventListener('click', e => {
|
.querySelectorAll(
|
||||||
|
"#TableOfContents a, .anchorz, .footnote-backref, .footnote-ref"
|
||||||
|
)
|
||||||
|
.forEach((i) => {
|
||||||
|
i.addEventListener("click", (e) => {
|
||||||
setTimeout(() => {
|
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 () {
|
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);
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
{{ define "singlebody" }}
|
{{ define "singlebody" }}
|
||||||
|
|
||||||
|
|
||||||
{{ $currentNode := . }}
|
{{ $currentNode := . }}
|
||||||
{{ $currentDir := "" }}
|
{{ $currentDir := "" }}
|
||||||
{{ with .File }}
|
{{ with .File }}
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
{{- define "singlebody" -}}
|
{{- define "singlebody" -}}
|
||||||
|
|
||||||
{{- partialCached "header.html" . .RelPermalink -}}
|
{{- partialCached "header.html" . .RelPermalink -}}
|
||||||
|
|
||||||
<h1>{{ .Title }}</h1>
|
<h1>{{ .Title }}</h1>
|
||||||
|
|
||||||
{{- partialCached "singlebody.html" . .RelPermalink -}}
|
{{- partialCached "singlebody.html" . .RelPermalink -}}
|
||||||
|
|
||||||
<div class="content">{{ .Content }}</div>
|
<div class="content">{{ .Content }}</div>
|
||||||
|
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
{{ .Scratch }}
|
|
|
@ -6,9 +6,11 @@
|
||||||
{{ 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 }}
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
{{ $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 }}
|
||||||
|
|
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