!publish!
This commit is contained in:
parent
697a90510f
commit
2cbfa60358
5 changed files with 116 additions and 80 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 =
|
||||||
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 = "block";
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if eq hugo.Environment "gitea" }}
|
{{ 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 }}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
# git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20201218214106-9738d858fd47
|
# git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20201218221740-acab84a3b225
|
||||||
|
|
|
@ -5,7 +5,7 @@ has_topics: ["firsttopic.md", "secondtopic.md"]
|
||||||
|
|
||||||
# Race Critical Theories, a curriculum
|
# Race Critical Theories, a curriculum
|
||||||
|
|
||||||
here i will make stupid dots..
|
here i will make stupid dots....
|
||||||
|
|
||||||
<table style="border: 4px solid red" class="tg">
|
<table style="border: 4px solid red" class="tg">
|
||||||
<thead style="border: 1px solid blue">
|
<thead style="border: 1px solid blue">
|
||||||
|
|
Loading…
Add table
Reference in a new issue