latest version in _vendor

This commit is contained in:
Marcell Mars 2022-04-18 15:58:41 +02:00
parent 6c85db3313
commit d0f2a42cd3
37 changed files with 2851 additions and 719 deletions

View file

@ -0,0 +1,22 @@
{
"name": "svelte-app",
"version": "1.0.0",
"scripts": {
"build": "rollup -c",
"dev": "rollup -c -w",
"start": "sirv public"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^17.0.0",
"@rollup/plugin-node-resolve": "^11.0.0",
"rollup": "^2.3.4",
"rollup-plugin-css-only": "^3.1.0",
"rollup-plugin-livereload": "^2.0.0",
"rollup-plugin-svelte": "^7.0.0",
"rollup-plugin-terser": "^7.0.0",
"svelte": "^3.0.0"
},
"dependencies": {
"sirv-cli": "^1.0.0"
}
}

View file

@ -0,0 +1,260 @@
html, body {
position: relative;
width: 100%;
height: 100%;
}
body {
color: #333;
margin: 0;
padding: 8px;
box-sizing: border-box;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}
a {
color: rgb(0,100,200);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a:visited {
color: rgb(0,80,160);
}
input, button, select, textarea {
font-family: inherit;
font-size: inherit;
-webkit-padding: 0.4em 0;
padding: 0.4em;
margin: 0 0 0.5em 0;
box-sizing: border-box;
border: 1px solid #ccc;
border-radius: 2px;
}
input:disabled {
color: #ccc;
}
button {
color: #333;
background-color: #f4f4f463;
outline: none;
padding: 0.1rem 0.1rem;
margin-left: 0.3rem;
}
button:disabled {
color: #999;
}
button:disabled:hover {
cursor: default;
}
button:not(:disabled):active {
background-color: #ddd;
}
button:focus {
border-color: #666;
}
button:hover, .newtierbutton:hover {
cursor: pointer;
}
/* custom part */
.newtierbutton {
color: #000;
background-color: #dddddd;
padding: 0.2em 0.4em;
grid-column: 2/3;
margin-right: 0.2rem;
}
.formgrid {
display: grid;
grid-template-columns: auto 1fr;
grid-gap: 1rem;
margin-top: 1rem;
}
#sandpoints {
width: 80%;
margin-left: 1rem;
margin-top: 1rem;
}
label, .filepath {
grid-column: 1/2;
text-transform: capitalize;
align-self: center
}
.labelcontent {
align-self: auto;
}
.labeloffline {
margin-top: -0.4rem;
}
input[readonly] {
color: #000000b3;
background: #00000012;
border: 0px;
}
input, button, textarea, .selecttier, .relpath {
grid-column: 2/3;
}
textarea {
height: 10rem;
}
.hasinput {
line-height: 0.2rem;
border: 0px;
padding: 0px;
margin: 0px;
font-weight: bold;
}
.hasinput:focus {
outline: none;
}
.tierline {
display: flex;
align-items: baseline;
}
.tiertitle {
font-style: italic;
}
.buttons {
display: flex;
margin-left: auto;
padding-left: 0.2rem;
}
select {
align-self: start;
border: 0;
padding: 0.1rem;
}
.selecttier {
margin-top: 0.5rem;
}
.buttons button {
border: solid #999 1px;
padding: 0;
padding-left: 0.1rem;
padding-right: 0.1rem;
margin: 1px;
}
.filepath {
font-size: large;
font-style: italic;
margin-bottom: 1rem;
}
.relpath {
font-size: large;
font-weight: bold;
}
.tierbox, #selecthas {
margin-top: 0.5rem;
}
.fmHidden {
display: none;
}
.fmShown {
display: block;
}
.fmMetaTitle {
margin-bottom: 0.3rem;
text-transform: capitalize;
display: block;
text-align: right;
font-size: smaller;
padding-top: 0.2rem;
}
.fmMeta {
border-bottom: 2px #0000001a solid;
border-right: 1px #0000001a solid;
padding-bottom: 1rem;
margin-bottom: 0.5rem;
background: #ffffff1c;
padding-right: 0.2rem;
}
.fmItem {
display: grid;
grid-template-columns: auto 1fr;
grid-gap: 1rem;
}
.fmCollapse, .fmExpand {
padding-top: 0.2rem;
margin-top: 0.5rem;
padding-bottom: 0.5rem;
}
.fmExpand:hover, .fmCollapse:hover {
cursor: pointer;
}
.fmCollapse::before {
margin-right: 0.3rem;
content: "⇲";
}
.fmExpand::before {
margin-right: 0.3rem;
content: "⇱";
}
#fmicon, #frontmatter, input.hasinput {
background-color: #ffccbc;
padding-right: 0.3rem;
padding-left: 0.3rem;
padding-bottom: 0.3rem;
}
.newtiers {
display: none;
}
#newtierstitle {
margin-right: 0.4rem;
display: block;
}
.newtiersbar {
padding-bottom: 0.4rem;
padding-top: 0.4rem;
margin-left: auto;
display: flex;
border-bottom: 2px #0000001a solid;
border-right: 1px #0000001a solid;
justify-content: flex-end;
align-items: center;
background: #00000008;
}

View file

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width,initial-scale=1'>
<title>Sandpoints Edit Page</title>
<link rel='stylesheet' href='global.css'>
<script defer src='../metadata/index.js'></script>
<script defer src='build/bundle.js'></script>
</head>
<body>
</body>
</html>

View file

@ -5,9 +5,9 @@ module.exports = {
require('postcss-import')({
path: [themeDir]
}),
require('autoprefixer')({
grid: true
}),
require('postcss-reporter'),
/* require('autoprefixer')({
* grid: true
* }),
* require('postcss-reporter'), */
]
}

View file

@ -90,18 +90,18 @@ th:not([align]) {
src: url("../fonts/vollkorn-sc-v4-latin-ext_latin-regular.eot");
/* IE9 Compat Modes */
src: local(""),
url("../fonts/vollkorn-sc-v4-latin-ext_latin-regular.eot?#iefix")
format("embedded-opentype"),
/* IE6-IE8 */ url("../fonts/vollkorn-sc-v4-latin-ext_latin-regular.woff2")
format("woff2"),
/* Super Modern Browsers */
url("../fonts/vollkorn-sc-v4-latin-ext_latin-regular.woff") format("woff"),
/* Modern Browsers */
url("../fonts/vollkorn-sc-v4-latin-ext_latin-regular.ttf")
format("truetype"),
/* Safari, Android, iOS */
url("../fonts/vollkorn-sc-v4-latin-ext_latin-regular.svg#VollkornSC")
format("svg");
url("../fonts/vollkorn-sc-v4-latin-ext_latin-regular.eot?#iefix")
format("embedded-opentype"),
/* IE6-IE8 */ url("../fonts/vollkorn-sc-v4-latin-ext_latin-regular.woff2")
format("woff2"),
/* Super Modern Browsers */
url("../fonts/vollkorn-sc-v4-latin-ext_latin-regular.woff") format("woff"),
/* Modern Browsers */
url("../fonts/vollkorn-sc-v4-latin-ext_latin-regular.ttf")
format("truetype"),
/* Safari, Android, iOS */
url("../fonts/vollkorn-sc-v4-latin-ext_latin-regular.svg#VollkornSC")
format("svg");
/* Legacy iOS */
}
@ -114,17 +114,17 @@ th:not([align]) {
src: url("../fonts/vollkorn-sc-v4-latin-ext_latin-600.eot");
/* IE9 Compat Modes */
src: local(""),
url("../fonts/vollkorn-sc-v4-latin-ext_latin-600.eot?#iefix")
format("embedded-opentype"),
/* IE6-IE8 */ url("../fonts/vollkorn-sc-v4-latin-ext_latin-600.woff2")
format("woff2"),
/* Super Modern Browsers */
url("../fonts/vollkorn-sc-v4-latin-ext_latin-600.woff") format("woff"),
/* Modern Browsers */ url("../fonts/vollkorn-sc-v4-latin-ext_latin-600.ttf")
format("truetype"),
/* Safari, Android, iOS */
url("../fonts/vollkorn-sc-v4-latin-ext_latin-600.svg#VollkornSC")
format("svg");
url("../fonts/vollkorn-sc-v4-latin-ext_latin-600.eot?#iefix")
format("embedded-opentype"),
/* IE6-IE8 */ url("../fonts/vollkorn-sc-v4-latin-ext_latin-600.woff2")
format("woff2"),
/* Super Modern Browsers */
url("../fonts/vollkorn-sc-v4-latin-ext_latin-600.woff") format("woff"),
/* Modern Browsers */ url("../fonts/vollkorn-sc-v4-latin-ext_latin-600.ttf")
format("truetype"),
/* Safari, Android, iOS */
url("../fonts/vollkorn-sc-v4-latin-ext_latin-600.svg#VollkornSC")
format("svg");
/* Legacy iOS */
}
@ -137,17 +137,17 @@ th:not([align]) {
src: url("../fonts/vollkorn-sc-v4-latin-ext_latin-700.eot");
/* IE9 Compat Modes */
src: local(""),
url("../fonts/vollkorn-sc-v4-latin-ext_latin-700.eot?#iefix")
format("embedded-opentype"),
/* IE6-IE8 */ url("../fonts/vollkorn-sc-v4-latin-ext_latin-700.woff2")
format("woff2"),
/* Super Modern Browsers */
url("../fonts/vollkorn-sc-v4-latin-ext_latin-700.woff") format("woff"),
/* Modern Browsers */ url("../fonts/vollkorn-sc-v4-latin-ext_latin-700.ttf")
format("truetype"),
/* Safari, Android, iOS */
url("../fonts/vollkorn-sc-v4-latin-ext_latin-700.svg#VollkornSC")
format("svg");
url("../fonts/vollkorn-sc-v4-latin-ext_latin-700.eot?#iefix")
format("embedded-opentype"),
/* IE6-IE8 */ url("../fonts/vollkorn-sc-v4-latin-ext_latin-700.woff2")
format("woff2"),
/* Super Modern Browsers */
url("../fonts/vollkorn-sc-v4-latin-ext_latin-700.woff") format("woff"),
/* Modern Browsers */ url("../fonts/vollkorn-sc-v4-latin-ext_latin-700.ttf")
format("truetype"),
/* Safari, Android, iOS */
url("../fonts/vollkorn-sc-v4-latin-ext_latin-700.svg#VollkornSC")
format("svg");
/* Legacy iOS */
}
@ -160,17 +160,17 @@ th:not([align]) {
src: url("../fonts/vollkorn-sc-v4-latin-ext_latin-900.eot");
/* IE9 Compat Modes */
src: local(""),
url("../fonts/vollkorn-sc-v4-latin-ext_latin-900.eot?#iefix")
format("embedded-opentype"),
/* IE6-IE8 */ url("../fonts/vollkorn-sc-v4-latin-ext_latin-900.woff2")
format("woff2"),
/* Super Modern Browsers */
url("../fonts/vollkorn-sc-v4-latin-ext_latin-900.woff") format("woff"),
/* Modern Browsers */ url("../fonts/vollkorn-sc-v4-latin-ext_latin-900.ttf")
format("truetype"),
/* Safari, Android, iOS */
url("../fonts/vollkorn-sc-v4-latin-ext_latin-900.svg#VollkornSC")
format("svg");
url("../fonts/vollkorn-sc-v4-latin-ext_latin-900.eot?#iefix")
format("embedded-opentype"),
/* IE6-IE8 */ url("../fonts/vollkorn-sc-v4-latin-ext_latin-900.woff2")
format("woff2"),
/* Super Modern Browsers */
url("../fonts/vollkorn-sc-v4-latin-ext_latin-900.woff") format("woff"),
/* Modern Browsers */ url("../fonts/vollkorn-sc-v4-latin-ext_latin-900.ttf")
format("truetype"),
/* Safari, Android, iOS */
url("../fonts/vollkorn-sc-v4-latin-ext_latin-900.svg#VollkornSC")
format("svg");
/* Legacy iOS */
}
@ -183,18 +183,18 @@ th:not([align]) {
src: url("../fonts/vollkorn-v12-latin-ext_latin-500italic.eot");
/* IE9 Compat Modes */
src: local(""),
url("../fonts/vollkorn-v12-latin-ext_latin-500italic.eot?#iefix")
format("embedded-opentype"),
/* IE6-IE8 */ url("../fonts/vollkorn-v12-latin-ext_latin-500italic.woff2")
format("woff2"),
/* Super Modern Browsers */
url("../fonts/vollkorn-v12-latin-ext_latin-500italic.woff") format("woff"),
/* Modern Browsers */
url("../fonts/vollkorn-v12-latin-ext_latin-500italic.ttf")
format("truetype"),
/* Safari, Android, iOS */
url("../fonts/vollkorn-v12-latin-ext_latin-500italic.svg#Vollkorn")
format("svg");
url("../fonts/vollkorn-v12-latin-ext_latin-500italic.eot?#iefix")
format("embedded-opentype"),
/* IE6-IE8 */ url("../fonts/vollkorn-v12-latin-ext_latin-500italic.woff2")
format("woff2"),
/* Super Modern Browsers */
url("../fonts/vollkorn-v12-latin-ext_latin-500italic.woff") format("woff"),
/* Modern Browsers */
url("../fonts/vollkorn-v12-latin-ext_latin-500italic.ttf")
format("truetype"),
/* Safari, Android, iOS */
url("../fonts/vollkorn-v12-latin-ext_latin-500italic.svg#Vollkorn")
format("svg");
/* Legacy iOS */
}
@ -207,18 +207,18 @@ th:not([align]) {
src: url("../fonts/vollkorn-v12-latin-ext_latin-regular.eot");
/* IE9 Compat Modes */
src: local(""),
url("../fonts/vollkorn-v12-latin-ext_latin-regular.eot?#iefix")
format("embedded-opentype"),
/* IE6-IE8 */ url("../fonts/vollkorn-v12-latin-ext_latin-regular.woff2")
format("woff2"),
/* Super Modern Browsers */
url("../fonts/vollkorn-v12-latin-ext_latin-regular.woff") format("woff"),
/* Modern Browsers */
url("../fonts/vollkorn-v12-latin-ext_latin-regular.ttf")
format("truetype"),
/* Safari, Android, iOS */
url("../fonts/vollkorn-v12-latin-ext_latin-regular.svg#Vollkorn")
format("svg");
url("../fonts/vollkorn-v12-latin-ext_latin-regular.eot?#iefix")
format("embedded-opentype"),
/* IE6-IE8 */ url("../fonts/vollkorn-v12-latin-ext_latin-regular.woff2")
format("woff2"),
/* Super Modern Browsers */
url("../fonts/vollkorn-v12-latin-ext_latin-regular.woff") format("woff"),
/* Modern Browsers */
url("../fonts/vollkorn-v12-latin-ext_latin-regular.ttf")
format("truetype"),
/* Safari, Android, iOS */
url("../fonts/vollkorn-v12-latin-ext_latin-regular.svg#Vollkorn")
format("svg");
/* Legacy iOS */
}
@ -231,17 +231,17 @@ th:not([align]) {
src: url("../fonts/vollkorn-v12-latin-ext_latin-500.eot");
/* IE9 Compat Modes */
src: local(""),
url("../fonts/vollkorn-v12-latin-ext_latin-500.eot?#iefix")
format("embedded-opentype"),
/* IE6-IE8 */ url("../fonts/vollkorn-v12-latin-ext_latin-500.woff2")
format("woff2"),
/* Super Modern Browsers */
url("../fonts/vollkorn-v12-latin-ext_latin-500.woff") format("woff"),
/* Modern Browsers */ url("../fonts/vollkorn-v12-latin-ext_latin-500.ttf")
format("truetype"),
/* Safari, Android, iOS */
url("../fonts/vollkorn-v12-latin-ext_latin-500.svg#Vollkorn")
format("svg");
url("../fonts/vollkorn-v12-latin-ext_latin-500.eot?#iefix")
format("embedded-opentype"),
/* IE6-IE8 */ url("../fonts/vollkorn-v12-latin-ext_latin-500.woff2")
format("woff2"),
/* Super Modern Browsers */
url("../fonts/vollkorn-v12-latin-ext_latin-500.woff") format("woff"),
/* Modern Browsers */ url("../fonts/vollkorn-v12-latin-ext_latin-500.ttf")
format("truetype"),
/* Safari, Android, iOS */
url("../fonts/vollkorn-v12-latin-ext_latin-500.svg#Vollkorn")
format("svg");
/* Legacy iOS */
}
@ -254,17 +254,17 @@ th:not([align]) {
src: url("../fonts/vollkorn-v12-latin-ext_latin-italic.eot");
/* IE9 Compat Modes */
src: local(""),
url("../fonts/vollkorn-v12-latin-ext_latin-italic.eot?#iefix")
format("embedded-opentype"),
/* IE6-IE8 */ url("../fonts/vollkorn-v12-latin-ext_latin-italic.woff2")
format("woff2"),
/* Super Modern Browsers */
url("../fonts/vollkorn-v12-latin-ext_latin-italic.woff") format("woff"),
/* Modern Browsers */
url("../fonts/vollkorn-v12-latin-ext_latin-italic.ttf") format("truetype"),
/* Safari, Android, iOS */
url("../fonts/vollkorn-v12-latin-ext_latin-italic.svg#Vollkorn")
format("svg");
url("../fonts/vollkorn-v12-latin-ext_latin-italic.eot?#iefix")
format("embedded-opentype"),
/* IE6-IE8 */ url("../fonts/vollkorn-v12-latin-ext_latin-italic.woff2")
format("woff2"),
/* Super Modern Browsers */
url("../fonts/vollkorn-v12-latin-ext_latin-italic.woff") format("woff"),
/* Modern Browsers */
url("../fonts/vollkorn-v12-latin-ext_latin-italic.ttf") format("truetype"),
/* Safari, Android, iOS */
url("../fonts/vollkorn-v12-latin-ext_latin-italic.svg#Vollkorn")
format("svg");
/* Legacy iOS */
}
@ -277,18 +277,18 @@ th:not([align]) {
src: url("../fonts/great-vibes-v7-latin-ext_latin-regular.eot");
/* IE9 Compat Modes */
src: local("Great Vibes"), local("GreatVibes-Regular"),
url("../fonts/great-vibes-v7-latin-ext_latin-regular.eot?#iefix")
format("embedded-opentype"),
/* IE6-IE8 */ url("../fonts/great-vibes-v7-latin-ext_latin-regular.woff2")
format("woff2"),
/* Super Modern Browsers */
url("../fonts/great-vibes-v7-latin-ext_latin-regular.woff") format("woff"),
/* Modern Browsers */
url("../fonts/great-vibes-v7-latin-ext_latin-regular.ttf")
format("truetype"),
/* Safari, Android, iOS */
url("../fonts/great-vibes-v7-latin-ext_latin-regular.svg#GreatVibes")
format("svg");
url("../fonts/great-vibes-v7-latin-ext_latin-regular.eot?#iefix")
format("embedded-opentype"),
/* IE6-IE8 */ url("../fonts/great-vibes-v7-latin-ext_latin-regular.woff2")
format("woff2"),
/* Super Modern Browsers */
url("../fonts/great-vibes-v7-latin-ext_latin-regular.woff") format("woff"),
/* Modern Browsers */
url("../fonts/great-vibes-v7-latin-ext_latin-regular.ttf")
format("truetype"),
/* Safari, Android, iOS */
url("../fonts/great-vibes-v7-latin-ext_latin-regular.svg#GreatVibes")
format("svg");
/* Legacy iOS */
}
@ -477,8 +477,11 @@ ol li {
list-style-type: decimal;
}
img {
width: 100%;
img, video {
max-width: 100%;
display: block;
margin-left: auto;
margin-right: auto;
}
.supt {
@ -575,9 +578,9 @@ img {
.rightcolumn {
/* display: grid;
grid-column: 2;
grid-template-columns: auto 1fr;
grid-auto-rows: max-content; */
grid-column: 2;
grid-template-columns: auto 1fr;
grid-auto-rows: max-content; */
padding-left: 0.5rem;
}
@ -592,6 +595,7 @@ img {
.hasauthors {
font-size: 1.6rem !important;
display: flex;
}
.hassup {
@ -669,7 +673,7 @@ h6 {
padding-top: 1.2rem;
padding-bottom: 1.2rem;
background-color: rgba(0, 0, 0, 0.05);
max-width: 70ch;
max-width: 45ch;
}
.authors {
@ -775,7 +779,7 @@ h6:before {
color: rgba(0, 0, 0, 0.4);
counter-increment: h6;
content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "."
counter(h6) ". ";
counter(h6) ". ";
}
h2.nocount:before,
@ -834,9 +838,9 @@ details {
}
/* .glossline {
border-bottom: lightgray solid 1px;
border-top: lightgray solid 1px;
} */
border-bottom: lightgray solid 1px;
border-top: lightgray solid 1px;
} */
.glosswords {
display: inline-block;
@ -876,6 +880,11 @@ details {
background-color: #fff9f9;
}
.svedit {
display: none;
margin-left: 0.5rem;
}
@media (max-width: 767px) {
html {
box-sizing: border-box;

View file

@ -54,7 +54,48 @@ window.addEventListener("scroll", function (e) {
}
});
function editPage(repoJsId) {
let relPath = "../".repeat(relPathDepth - 1);
var el = document.createElement('script');
el.onload = ()=> {
console.log("loading...")
console.log(repo)
}
el.src = `${relPath}js/repo/${repoJsId}.js`
document.body.appendChild(el)
document.location.href = `${relPath}edit/index.html?edit=${repoJsId}`
ev}
window.addEventListener("keyup", (e)=> {
if (e.key == "e" && location.protocol == "file:") {
editPage(sandpointsPageId)
} else if (e.key == "E" && location.protocol == "file:") {
let preview = document.querySelector("#preview");
if (preview.style.display == "flex") {
preview.style.display = "none";
} else {
preview.style.display = "flex";
}
console.log("preview: ", preview);
}
})
window.addEventListener("DOMContentLoaded", (e) => {
if (location.protocol == "file:") {
document.querySelectorAll(".svedit").forEach((i) => {
i.style.display = "inline";
})
}
document.querySelectorAll('.triadlink').forEach((i) => {
i.addEventListener("click", (ev) => {
if (ev.ctrlKey) {
ev.preventDefault()
editPage(ev.target.getAttribute("repoid"))
}
})
})
let preview = document.querySelector("#preview");
if (
location.pathname.split("/").includes("_preview") ||
@ -66,15 +107,17 @@ window.addEventListener("DOMContentLoaded", (e) => {
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 (par) {
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);

View file

@ -1,15 +1,45 @@
{
"syllabus": "syllabi",
"curriculum": "curriculums",
"book": "books",
"journal": "journals",
"topic": "topics",
"part": "parts",
"issue": "issues",
"experiment": "experiments",
"session": "sessions",
"chapter": "chapters",
"article": "articles",
"annex": "annexes",
"author": "authors"
"annex": "annexes",
"article": "articles",
"atlas": "atlases",
"author": "authors",
"book": "books",
"cabin": "cabins",
"chapter": "chapters",
"compartment": "compartments",
"contributor": "contributors",
"curriculum": "curriculums",
"deck": "decks",
"document": "documents",
"editor": "editors",
"entry": "entries",
"experiment": "experiments",
"floor": "floors",
"fragment": "fragments",
"glossary": "glossaries",
"highlight": "highlights",
"house": "houses",
"issue": "issues",
"journal": "journals",
"logbook": "logbooks",
"map": "maps",
"note": "notes",
"notebook": "notebooks",
"part": "parts",
"pin": "pins",
"record": "records",
"reflection": "reflections",
"room": "rooms",
"scribe": "scribes",
"section": "sections",
"series": "series",
"session": "sessions",
"ship": "ships",
"spectre": "spectres",
"syllabus": "syllabi",
"tab": "tabs",
"term":"terms",
"topic": "topics",
"toponym": "toponyms",
"voice": "voices"
}

View file

@ -1 +1 @@
<h{{ add 1 .Level }} id="{{ .Anchor | safeURL }}" class="hx">{{ .Text | safeHTML }}<a class="hpar" href="#{{ .Anchor | safeURL }}"></a></h{{ add 1 .Level }}>
<h{{ add 1 .Level }} id="{{ .Anchor | safeURL }}" class="hx css-{{ .Page.File.UniqueID }}-h{{ add 1 .Level }}">{{ .Text | safeHTML }}<a class="hpar" href="#{{ .Anchor | safeURL }}"></a></h{{ add 1 .Level }}>

View file

@ -5,7 +5,17 @@
{{ $_.Add "triads" $k }}
{{- end -}}
{{- if strings.HasPrefix .Destination "bib:" -}}
{{- if strings.HasPrefix .Destination "img:" -}}
{{- $img_params := (substr .Destination 4) -}}
{{- $img_src := index (split $img_params " ") 0 -}}
{{- $img_attr := index (split $img_params $img_src) 1 -}}
<img class="sandpoints-img" src="{{ $img_src }}" {{ $img_attr | safeHTMLAttr }} />
{{- else if strings.HasPrefix .Destination "vid:" -}}
{{- $vid_params := (substr .Destination 4) -}}
{{- $vid_src := index (split $vid_params " ") 0 -}}
{{- $vid_attr := index (split $vid_params $vid_src) 1 -}}
<video class="sandpoints-vid" controls src="{{ $vid_src }}" {{ $vid_attr | safeHTMLAttr }}></video>
{{- else if strings.HasPrefix .Destination "bib:" -}}
{{- $destination := (substr .Destination 4) -}}
{{- $c_prefix := .Page.Site.Params.sandpointsCatalogPrefix | default "/library/" -}}
{{- if index $.Page.Site.Data.books.catalog $destination -}}
@ -17,21 +27,21 @@
{{ end }}
{{ .Page.Scratch.Add "bibs" (slice (slice $bibhref $bibtitle)) }}
{{- 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>
{{- else -}}
<a href="{{- $c_prefix | safeURL -}}BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with $b.title}} title="{{- . -}}"{{- end -}} target="_blank">{{- $text_link -}}</a>
<span>{{- delimit $b.authors ", " " & " -}}{{- with $b.pubdate -}},&nbsp;{{- substr . 0 4}}{{- end -}}.&nbsp;<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>.&nbsp;{{- with $b.publisher -}}{{- . -}}.{{- end -}}</span>
{{- else -}}
<span class="sup">bib</span><a href="{{- $c_prefix | safeURL -}}BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with $b.title}} title="{{- . -}}"{{- end -}} target="_blank">{{- $text_link -}}</a>
{{- 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>
<a href="{{- $c_prefix | safeURL -}}BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with .Title}} title="{{- . -}}"{{- end -}}>{{- $text_link -}}⦚<span>bib:{{- $destination -}} not found</span></a>
{{- end -}}
{{- else if in ($_.Get "triads") (index (split .Destination ":") 0) -}}
{{- if $.Page.Site.GetPage (printf "/%s" (replace .Destination ":" "/")) -}}
{{- $session := $.Page.Site.GetPage (printf "/%s" (replace .Destination ":" "/")) -}}
{{ .Page.Scratch.Add "links" (slice $session) }}
{{- 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 class="triadlink" repoid="{{- $session.File.UniqueID -}}" printhref="#ph-{{- $session.File.UniqueID -}}" 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>
<a class="triadlink" repoid="{{- $session.File.UniqueID -}}" printhref="#ph-{{- $session.File.UniqueID -}}" 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 -}}
<a href="{{- .Destination -}}/{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}">{{- $text_link -}}⦚<span>{{- .Destination -}} not found</span></a>

View file

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

View file

@ -6,30 +6,33 @@
{{ $currentDir = .Dir }}
{{ end }}
{{ $currentFile := (printf "/%s" .File) }}
{{ $editFile := $.Site.GetPage "/edit" }}
{{ $editFilePath := $editFile.RelPermalink }}
<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 }} {{with $currentDir}}({{ . }}){{ end }}</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>
<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><a class="svedit" href="{{- printf "%sindex.html#%s" $editFilePath $p.File.UniqueID -}}">[EDIT]</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>
<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><a class="svedit" href="{{- printf "%sindex.html#%s" $editFilePath $coreKid.File.UniqueID -}}">[EDIT]</a></div>
{{ $scratchCKid := $s.Get (printf "/%s" $coreKid.File) }}
{{ 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><a class="svedit" href="{{- printf "%sindex.html#%s" $editFilePath $mantleKid.File.UniqueID -}}">[EDIT]</a></div></div>
{{ end }}
</div>
{{ end }}
{{ else if not (in (slice "core" "mantle" "crust") $scratch.depth)}}
{{ $noTriad = $noTriad | append $p }}
{{ $noTriad = $noTriad | append $p }}
{{ else }}
</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>
<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>{{ if not (or (hasPrefix .File.Dir "edit") (hasPrefix .File.Dir "print")) }}<a class="svedit" href="{{- printf "%sindex.html#%s" $editFilePath .File.UniqueID -}}">[EDIT]</a>{{ end }}</div>
{{ end }}
{{ end }}

View file

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-us{{ end }}">
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width,initial-scale=1'>
<link rel='stylesheet' href='build/global.css'>
<!-- <link rel='stylesheet' href='build/bundle.css'> -->
<script defer src='../metadata/index.js'></script>
<script defer src='build/bundle.js'></script>
<title>edit{{- .Site.Title -}}</title>
</head>
<body>{{- block "main" . -}}{{- end -}}</body>
</html>

View file

@ -0,0 +1,2 @@
{{ define "main" }}
{{ end }}

View file

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

View file

@ -1 +1,20 @@
{{ define "main" }}SECTIONS=[{{ range .Site.Sections }}{"section": "{{ with .File }}{{ trim .Dir "/" }}{{ end }}", "items": [{{ range .Pages }}"{{ .File.BaseFileName }}", {{ end }}]}, {{ end }}];{{ end }}
{{- define "main" -}}
{{ $sections := (slice) }}
{{ $tiers := (slice) }}
{{ range $.Site.Sections }}
{{ with .File }}
{{ $sections = $sections | append (strings.TrimSuffix "/" .Dir) }}
{{ end }}
{{ end }}
{{ $metasp := (dict) }}
{{ range $k, $v := $.Site.Data.sandpointsnamegraph }}
{{ if in $sections $k }}
{{ $tiers = (slice) }}
{{ range where $.Site.RegularPages "Section" $k }}
{{ $tiers = $tiers | append (merge (dict "file" .File.LogicalName) (dict "title" .Title)) }}
{{ end }}
{{ $metasp = merge $metasp (dict $v (merge (dict "singular" $k) (dict "tiers" $tiers))) }}
{{ end }}
{{ end }}
{{ printf "METASP=%s;" (jsonify $metasp) }}
{{ end }}

View file

@ -11,10 +11,21 @@
<meta name="keywords" content="{{ delimit .Keywords "," }}" />
{{ end }}
{{ if .Params.Author }}
<meta name="author" content="{{ .Params.Author}}" />
{{ if .Params.editors }}
{{ range .Params.editors }}
{{ $e := $.GetPage (printf "editor/%s" .) }}
<meta name="editor" content="{{ $e.Title }}" />
{{ end }}
{{ end }}
{{ if .Params.authors }}
{{ range .Params.authors }}
{{ $e := $.GetPage (printf "author/%s" .) }}
<meta name="author" content="{{ $e.Title }}" />
{{ end }}
{{ end }}
{{ template "_internal/opengraph.html" . }}
{{ template "_internal/twitter_cards.html" . }}
@ -27,9 +38,9 @@
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#996561">
{{ if eq hugo.Environment "dev" }}
{{ $style := resources.Get "css/site.css" | postCSS (dict "config" "assets/css/postcss.config.js") | minify }}
{{ $style := resources.Get "css/site.css" | resources.PostCSS (dict "config" "assets/css/postcss.config.js") | minify }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}" />
{{ $style := resources.Get "css/player.css" | postCSS (dict "config" "assets/css/postcss.config.js") | minify }}
{{ $style := resources.Get "css/player.css" | resources.PostCSS (dict "config" "assets/css/postcss.config.js") | minify }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}" />
{{ else }}
<link rel="stylesheet" href="/css/site.min.css" />

View file

@ -36,6 +36,16 @@
<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>
</div>
{{ else }}
{{ $editPage := $.Site.GetPage "/edit" }}
<div class="headiter" id="preview">
<a class="edit-button" href="{{ $editPage.RelPermalink }}index.html?edit={{ .File.UniqueID }}">EDIT_THIS</a>
{{ with $scratch.core }}<a class="edit-button" href="{{ $editPage.RelPermalink }}index.html?new={{ index . 0 }}">ADD_{{ index . 0 | upper }}</a>{{ end }}
{{ with $scratch.mantle }}<a class="edit-button" href="{{ $editPage.RelPermalink }}index.html?new={{ index . 0 }}">ADD_{{ index . 0 | upper }}</a>{{ end }}
{{ with $scratch.crust }}<a class="edit-button" href="{{ $editPage.RelPermalink }}index.html?new={{ index . 0 }}">ADD_{{ index . 0 | upper }}</a>{{ end }}
{{ if not $scratch.core }}<a class="edit-button" href="{{ $editPage.RelPermalink }}index.html?new={{ $currentDir }}">ADD_{{ substr $currentDir 0 -1 | upper }}</a>{{ end }}
</div>
</div>
{{ end }}
<div class="header">

View file

@ -1,2 +1,5 @@
<link href="/css/paged_interface.css" rel="stylesheet" type="text/css">
<link href="/css/dyn.css" rel="stylesheet" type="text/css">
<link href="/css/print.css" rel="stylesheet" type="text/css">
<script src="/js/paged.polyfill.js"></script>
<script src="/js/pagedjsCustomizations.js"></script>

View file

@ -0,0 +1,96 @@
{{ $s := partialCached "scratch.html" . }}
{{ $currentNode := . }}
{{ $currentDir := "" }}
{{ with .File }}
{{ $currentDir = .Dir }}
{{ end }}
{{ $currentFile := (printf "/%s" .File) }}
{{ $scratch := $s.Get $currentFile }}
{{ $longestTitle := "" }}
<div id="ph-{{ .File.UniqueID }}" class="{{ $scratch.depth | default "crust" }}title"><span class="supt">{{ substr $currentDir 0 -1 }}</span>{{ .Title }}</div>
<div class="grid">
<div class="leftcolumn">
{{ if ne (trim .Page.TableOfContents "\n") "<nav id=\"TableOfContents\"></nav>" }}
{{ .Page.TableOfContents }}
{{ end }}
</div>
<div class="rightcolumn">
{{ $closeDivs := false }}
{{ $sandnamePlural := (slice) }}
{{ range $k, $v := $.Site.Data.sandpointsnamegraph }}
{{ $sandnamePlural = $sandnamePlural | append $v }}
{{ end }}
{{ $paramsKeys := (slice) }}
{{ range $k, $v := $currentNode.Params }}
{{ $paramsKeys = $paramsKeys | append $k }}
{{ end }}
{{ $mentions := intersect $paramsKeys $sandnamePlural }}
{{ range $mention := $mentions }}
{{ range $k, $m := index $currentNode.Params $mention }}
{{ $mentionLink := printf "/%s/%s" (substr $mention 0 -1) $m }}
{{- with $.GetPage $mentionLink -}}
{{ with not $k }}
{{ $closeDivs = true }}
<div class="has hasauthors">
<div class="hassup">{{ with (index $currentNode.Params $mention) }}{{ if gt (len (index $currentNode.Params $mention)) 1 }}{{ $mention }}{{ else }}{{ substr $mention 0 -1 }}{{ end }}{{ end }}</div>
<div class="afterhas">
{{ end }}
<div class="crust">
<a href="#ph-{{ .File.UniqueID }}">{{ .Title }}</a>
</div>
{{ end }}
{{ end }}
{{ end }}
{{- with $closeDivs -}}</div></div>{{ end }}
{{ if and (not (eq $scratch.depth "crust")) $scratch.has_children }}
<div class="has hashas">
{{ with $scratch.has }}
<div class="hassup">has {{ $scratch.has }}</div>
{{ end }}
<div class="afterhas">
{{ range $scratch.has_children }}
{{ $authors := "" }}
{{ range $k, $authorLink := .Params.authors }}
{{ $authorPage := $.GetPage (printf "/author/%s" $authorLink) }}
{{ $prefix := ", " }}
{{ with not $k }}
{{ $prefix = "" }}
{{ end }}
{{ $authors = printf "%s%s" $prefix $authorPage.Title }}
{{ end }}
<div class="{{ $scratch.child_depth }} crustoc">
<a class="toc" href="#ph-{{ .File.UniqueID }}"><span><span class="back">{{ .Title }} {{with $authors}}({{ $authors }}){{ end }}</span></span></a>
</div>
{{ if gt (len .Title) (len $longestTitle) }}
{{ $longestTitle = .Title }}
{{ end }}
{{ end }}
<div class="{{ $scratch.child_depth }} crustoc longesttitle">
<a class="toc" href="javascript:;"><span><span class="back">{{ $longestTitle }}.....</span></span></a>
</div>
</div></div>
{{ end }}
{{ if eq $scratch.depth "crust" }}
<div class="has hasin">
<div class="hassup">in {{ index $scratch.in 1 }}</div>
<div class="afterhas">
{{ range $scratch.is_in }}
<div class="{{ substr $currentDir 0 -1 }}">
<a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
</div>
{{ end }}
</div></div>
{{ end }}
</div>
</div>
{{ with .Page.Params.abstract }}<div class="abstract"><span class="supt">abstract</span>{{ . | $.Page.RenderString | htmlUnescape | safeHTML }}</div>{{ end }}
{{- $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 -}}

View file

@ -0,0 +1,13 @@
{{ $parentName := . }}
{{ range (readDir .) }}
{{ $currentName := printf "%s/%s" $parentName .Name }}
{{ if .IsDir }}
<p>_Dir: {{ $currentName }}</p>
{{ partial "readdir.html" $currentName }}
{{ else }}
{{ if eq (path.Ext .Name) ".md" }}
{{ $f := readFile $currentName }}
<textarea wrap="off" col="108" row="48 ">{{ $f }}</textarea>
{{ end }}
{{ end }}
{{ end }}

View file

@ -1,4 +1,4 @@
<script type="text/javascript">var relPathDepth = {{- .RelPermalink | strings.Count "/" -}};</script>
<script type="text/javascript">var relPathDepth = {{- .RelPermalink | strings.Count "/" -}};var sandpointsPageId = "{{- with .File -}}{{- .UniqueID -}}{{- end -}}";</script>
{{ $sjsopts := dict "targetPath" "js/sandpoints.js" "minify" "true"}}
{{ $sjs := resources.Get "js/sandpoints.js" | js.Build $sjsopts }}
<script defer src='{{ $sjs.RelPermalink }}' type="application/javascript"></script>

View file

@ -3,6 +3,14 @@
{{ $_ := newScratch }}
{{ $debug := (slice) }}
{{ $sandnameSingular := (slice) }}
{{ $sandnamePlural := (slice) }}
{{ range $k, $v := $.Site.Data.sandpointsnamegraph }}
{{ $sandnameSingular = $sandnameSingular | append $k }}
{{ $sandnamePlural = $sandnamePlural | append $v }}
{{ end }}
{{ $pPath := "" }}
{{ range $p := .Site.RegularPages }}
{{ $pPath = printf "/%s" $p.File }}
@ -23,16 +31,24 @@
{{ end }}
{{ end }}
{{ 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)) }}
{{ $paramsKeys := (slice) }}
{{ range $k, $v := $p.Params }}
{{ $paramsKeys = $paramsKeys | append $k }}
{{ end }}
{{ $mentions := intersect $paramsKeys $sandnamePlural }}
{{ range $mention := $mentions }}
{{ range $m := index $p.Params $mention }}
{{ $mentionLink := printf "/%s/%s" (substr $mention 0 -1) $m }}
{{ with ($_.Get $mentionLink) }}
{{ $p.Scratch.Add "links" (uniq (($p.Scratch.Get "links")| append ($.GetPage $mentionLink))) }}
{{ $_.SetInMap $mentionLink "backlinks" (uniq ((index ($_.Get $mentionLink) "backlinks") | append $p)) }}
{{ else }}
{{ $_.SetInMap $authorLink "backlinks" (slice $p) }}
{{ end }}
{{ end }}
{{ end }}
{{ $p.Scratch.Add "links" (uniq (($p.Scratch.Get "links")| append ($.GetPage $mentionLink))) }}
{{ $_.SetInMap $mentionLink "backlinks" (slice $p) }}
{{ end }}
{{ end }}
{{ end }}
{{ $gp := $.GetPage $pPath }}
{{ $gpPath := printf "/%s" $gp.File }}

View file

@ -8,6 +8,10 @@
{{ $currentFile := (printf "/%s" .File) }}
{{ $scratch := $s.Get $currentFile }}
{{ $sandnamePlural := (slice) }}
{{ $sandnameSingular := "" }}
{{ $mentionLink := "" }}
<div class="{{ $scratch.depth | default "crust" }}title"><span class="supt">{{ substr $currentDir 0 -1 }}{{ substr .Title 0 1 }}</span>{{ substr .Title 1 }}</div></div>
<div class="grid">
@ -17,22 +21,41 @@
{{ end }}
</div>
<div class="rightcolumn">
{{- range $k, $v := .Page.Params.authors -}}
{{- with $.GetPage (printf "/author/%s" $v) -}}
{{- with not $k -}}
<div class="has hasauthors">
<div class="hassup">author{{ with $.Page.Params.authors }}{{ if gt (len .) 1 }}s{{ end }}{{ end }}</div>
<div class="afterhas">
{{- end -}}
<div class="crust">
<a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
</div>
{{- end -}}
{{- end -}}
{{- with .Page.Params.authors -}}</div></div>{{- end -}}
{{ $closeDivs := false }}
{{ range $k, $v := $.Site.Data.sandpointsnamegraph }}
{{ $sandnamePlural = $sandnamePlural | append $v }}
{{ end }}
{{ $paramsKeys := (slice) }}
{{ range $k, $v := $currentNode.Params }}
{{ $paramsKeys = $paramsKeys | append $k }}
{{ end }}
{{ $mentions := intersect $paramsKeys $sandnamePlural }}
{{ range $mention := $mentions }}
{{ range $k, $m := index $currentNode.Params $mention }}
{{ range $k, $v := $.Site.Data.sandpointsnamegraph }}
{{ if eq $v $mention }}
{{ $mentionLink = printf "/%s/%s" $k $m }}
{{ $sandnameSingular = $k }}
{{ end }}
{{ end }}
{{- with $.GetPage $mentionLink -}}
{{- with not $k -}}
{{ $closeDivs = true }}
<div class="has hasauthors">
<div class="hassup">{{ with (index $currentNode.Params $mention) }}{{ if gt (len (index $currentNode.Params $mention)) 1 }}{{ $mention }}{{ else }}{{ $sandnameSingular }}{{ end }}{{ end }}</div>
<div class="afterhas">
{{- end -}}
<div class="crust">
<a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
</div>
{{- end -}}
{{ end }}
{{- with $closeDivs -}}</div></div>{{ end }}
{{ end }}
{{ if in .Page.Site.Params.sandpointsMentionedIn (substr $currentDir 0 -1) }}
<div class="has">
<div class="has hasmentionedin">
{{ with $scratch.backlinks }}
<div class="hassup">mentioned in</div>
{{ end }}
@ -46,7 +69,7 @@
{{ end }}
{{ if and (not (eq $scratch.depth "crust")) $scratch.has_children }}
<div class="has">
<div class="has hashas">
{{ with $scratch.has }}
<div class="hassup">has {{ $scratch.has }}</div>
{{ end }}
@ -60,7 +83,7 @@
{{ end }}
{{ if eq $scratch.depth "crust" }}
<div class="has">
<div class="has hasin">
<div class="hassup">in {{ index $scratch.in 1 }}</div>
<div class="afterhas">
{{ range $scratch.is_in }}
@ -74,8 +97,9 @@
</div>
{{ 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="abstract"><span class="supt">abstract</span>{{ . | $.Page.RenderString | htmlUnescape | safeHTML }}</div>{{ end }}
{{- $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 -}}
{{ with .Page.Params.abstract }}</div>{{ end }}
{{- $vld := false -}}{{- range $k, $v := .Page.Params.keywords -}}{{- if eq $k 0 -}}{{- $vld = true -}}<div class="keywords"><span class="sup">keywords</span><a href="/keywords/{{ urlize $v }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{- $v -}}</a>{{- else -}},&nbsp;<a href="/keywords/{{ urlize $v }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{- $v -}}</a>{{- end -}}{{- end -}}{{- with $vld -}}</div>{{- end -}}
{{ $var := printf "repo={\"frontmatter\": %s, \"content\": %s, \"path\": \"%s\", \"relpermalink\": \"%s\" }" (jsonify .Params) (jsonify .RawContent) .File.Path .RelPermalink | resources.FromString (printf "js/repo/%s.js" .File.UniqueID) }}
{{ $dummy := $var.Permalink }}

View file

@ -2,12 +2,10 @@
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{- else -}}en-us{{- end -}}">
<head>
{{- partialCached "head.html" . -}}
{{- partial "head.html" . -}}
{{- partial "pagedjs.html" . -}}
</head>
<body>
<article>
{{- block "singlebody" . -}}{{- end -}}
</article>
</body>
</html>

View file

@ -1,4 +1,63 @@
{{- define "singlebody" -}}
{{ $cssTemplate := `.css-_rplc_-h2 {
counter-reset: css-_rplc_-h3;
}
.css-_rplc_-h3 {
counter-reset: css-_rplc_-h4;
}
.css-_rplc_-h4 {
counter-reset: css-_rplc_-h5;
}
.css-_rplc_-h5 {
counter-reset: css-_rplc_-h6;
}
.css-_rplc_-h2:before {
color: rgba(0, 0, 0, 0.4);
counter-increment: css-_rplc_-h2 1;
content: counter(css-_rplc_-h2) ". ";
}
.css-_rplc_-h3:before {
color: rgba(0, 0, 0, 0.4);
counter-increment: css-_rplc_-h3 1;
content: counter(css-_rplc_-h2) "." counter(css-_rplc_-h3) ". ";
}
.css-_rplc_-h4:before {
color: rgba(0, 0, 0, 0.4);
counter-increment: css-_rplc_-h4 1;
content: counter(css-_rplc_-h2) "." counter(css-_rplc_-h3) "." counter(css-_rplc_-h4) ". ";
}
.css-_rplc_-h5:before {
color: rgba(0, 0, 0, 0.4);
counter-increment: css-_rplc_-h5 1;
content: counter(css-_rplc_-h2) "." counter(css-_rplc_-h3) "." counter(css-_rplc_-h4) "." counter(css-_rplc_-h5) ". ";
}
.css-_rplc_-h6:before {
color: rgba(0, 0, 0, 0.4);
counter-increment: css-_rplc_-h6 1;
content: counter(css-_rplc_-h2) "." counter(css-_rplc_-h3) "." counter(css-_rplc_-h4) "." counter(css-_rplc_-h5) "."
counter(css-_rplc_-h6) ". ";
}
.css-_rplc_-h2.nocount:before,
.css-_rplc_-h3.nocount:before,
.css-_rplc_-h4.nocount:before,
.css-_rplc_-h5.nocount:before,
.css-_rplc_-h6.nocount:before {
content: "";
counter-increment: none;
}` }}
{{ $cssOutput := "" }}
{{ $cssHashes := "" }}
{{ $s := partialCached "scratch.html" . }}
{{ $p := $.GetPage .Params.print }}
{{ $scratch := $s.Get (printf "/%s" $p.File) }}
@ -8,17 +67,87 @@
{{ $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 }}
{{ . }}
<div class="print0">{{ partial "printsinglebody.html" $p }}</div>
<div class="content">{{ $p.Content }}</div>
{{ $cssOutput = printf "%s\n%s" $cssOutput (replace $cssTemplate "_rplc_" $p.File.UniqueID) }}
{{ $cssHashes = printf "%s css-%s-h2" $cssHashes $p.File.UniqueID }}
{{ range $scratch.has_children }}
<div class="crustpage">
{{ $addS := 0 }}
{{ with .Params.authors }}
{{ $addS = len . }}
{{ end }}
{{ range $n, $authorFile := .Params.authors }}
{{ $author := $.GetPage (printf "/author/%s" $authorFile) }}
{{ if eq $n 0 }}
<div class="runningAuthors"><span class="sup">author{{ with (gt $addS 1) }}s{{ end }}</span><a href="#ph-{{ $author.File.UniqueID }}">{{ $author.Title }}</a>
{{ else }}
, <a href="#ph-{{ $author.File.UniqueID }}">{{ $author.Title }}</a>
{{ end }}
</div>
{{ end }}
{{ end }}
{{ with .Params.authors }}</div>{{ end }}
{{ $tit := .Title }}
{{ if gt (len .Title) 54 }}
{{ $tit = printf "%s…" (substr .Title 0 50) }}
{{ end }}
<div class="runningTitle"><span class="sup">{{ index $scratch.crust 0 }}</span><a href="#ph-{{ .File.UniqueID }}">{{ $tit }}</a></div>
{{ partial "printsinglebody.html" . }}
{{ .Content }}
{{ $cssOutput = printf "%s\n%s" $cssOutput (replace $cssTemplate "_rplc_" .File.UniqueID) }}
{{ $cssHashes = printf "%s css-%s-h2" $cssHashes .File.UniqueID }}
{{ $kid := $s.Get (printf "/%s" .File) }}
{{ range $kid.has_children }}
<div class="crustpage">
{{ $addS := 0 }}
{{ with .Params.authors }}
{{ $addS = len . }}
{{ end }}
{{ range $n, $authorFile := .Params.authors }}
{{ $author := $.GetPage (printf "/author/%s" $authorFile) }}
{{ if eq $n 0 }}
<div class="runningAuthors"><span class="sup">author{{ with (gt $addS 1) }}s{{ end }}</span><a href="#ph-{{ $author.File.UniqueID }}">{{ $author.Title }}</a>
{{ else }}
, <a href="#ph-{{ $author.File.UniqueID }}">{{ $author.Title }}</a>
{{ end }}
{{ end }}
{{ with .Params.authors }}</div>{{ end }}
{{ $tit := .Title }}
{{ if gt (len .Title) 54 }}
{{ $tit = printf "%s…" (substr .Title 0 50) }}
{{ end }}
<div class="runningTitle"><span class="sup">{{ index $scratch.crust 0 }}</span><a href="#ph-{{ .File.UniqueID }}">{{ $tit }}</a></div>
{{ partial "printsinglebody.html" . }}
{{ .Content }}
{{ $cssOutput = printf "%s\n%s" $cssOutput (replace $cssTemplate "_rplc_" .File.UniqueID) }}
{{ $cssHashes = printf "%s css-%s-h2" $cssHashes .File.UniqueID }}
{{ end }}
{{ end }}
{{ range where $.Site.RegularPages "Section" "in" (slice "author" "editor") }}
<div class="authorpage">
<div class="runningTitle runningAuthors"><span class="sup">{{ index $scratch.mantle 0 }}</span><a href="#ph-{{ $p.File.UniqueID }}">{{ $p.Title }}</a></div>
<div id="ph-{{ .File.UniqueID }}" class="{{ $scratch.depth | default "crust" }}title"><span class="supt">{{ substr .File.Dir 0 -1 }}</span>{{ .Title }}</div>
{{ .Content }}
{{ if in .Page.Site.Params.sandpointsMentionedIn (substr .File.Dir 0 -1) }}
{{ $ss := $s.Get (printf "/%s" .File) }}
<div class="has hasmentionedin">
{{ with $ss }}
<div class="hassup">mentioned in</div>
{{ end }}
<div class="afterhas">
{{ range $ss.backlinks }}
<div class="{{ $ss.child_depth }}">
<a href="#ph-{{ .File.UniqueID }}">{{ .Title }}</a>
</div>
{{ end }}
</div></div>
{{ end }}
{{ end }}
{{ $cssOutput = printf "body {counter-reset: %s;}\n%s" $cssHashes $cssOutput }}
{{ $var := $cssOutput | resources.FromString "css/dyn.css" }}
{{ $dummy := $var.Permalink }}
{{- end -}}

View file

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

View file

@ -0,0 +1,23 @@
{{ define "keywords" }}
{{ $p := split (trim .RelPermalink "/") "/" }}
{{ if eq (len $p) 1 }}
<div class="coretitle"><span class="supt">{{ index $p 0 }}</span>All</div>
{{ range $taxonomyname, $taxonomy := .Site.Taxonomies }}
{{ if eq (index $p 0) $taxonomyname }}
{{ range $key, $value := $taxonomy }}
<span> <a href="/{{ index $p 0 }}/{{ $key }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ $key }}</a>({{ len (index (index $.Site.Taxonomies $taxonomyname) $key) }})</span>
{{ end }}
{{ end }}
{{ end }}
{{ else }}
<div class="coretitle"><span class="supt">{{ index $p 0 }}</span>{{ index $p 1 }}</div>
{{ range .Pages.ByDate.Reverse }}
<div class="blog-date">{{ .Date.Format "Jan 2, 2006" }}</div>
<div class="blog-title"><a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a></div>
{{ range $n, $authorFile := .Params.authors }}
{{ $author := $.GetPage (printf "/author/%s" $authorFile) }}
<span class="blog-author"><a href="{{ $author.RelPermalink }}">{{ $author.Title }}</a></span>
{{ end }}
{{ end }}
{{ end }}
{{ end }}

View file

@ -5,102 +5,100 @@
<div id="toggleAllLinks" onclick="toggleAllLinks()">[toggle expand/collapse]</div>
<p></p>
{{ range $p := .Site.RegularPages }}
{{ 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") }}
{{ $pPath := printf "/%s" $p.File }}
{{ with $ss := $s.Get $pPath }}
{{ with $ss.backlinks }}
{{ range $i, $_ := $ss.backlinks }}
{{ if eq $i 0 }}
<details><summary>Internal links to other Sandpoint pages ({{ len ($p.Scratch.Get "links") }}):</summary><ul>
<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 }}
{{ $http_links := (slice) }}
{{ $library_links := (slice) }}
{{ $anchor_links := (slice) }}
{{ $other_links := (slice) }}
{{ with ($p.Scratch.Get "links") }}
{{ range $i, $_ := uniq ($p.Scratch.Get "links") }}
{{ if eq $i 0 }}
<details><summary>Internal links to other Sandpoint pages ({{ len (uniq ($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 }}
{{ 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 }}
{{ $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>
{{ 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 }}
</ul></details>
<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>
{{ with $library_links }}
{{ range $i, $_ := $library_links }}
{{ if eq $i 0 }}
<details><summary>Links to Sandpoint's library ({{ len $library_links }}):</summary><ul>
{{ end }}
</ul></details>
<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>
{{ 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 }}
</ul></details>
<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 }}
{{ 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 }}
{{ with $formattingN }}<li>{{ $formattingN }} formatting links.</a></li>{{ end }}
{{ with $anchorN }}<li>{{ $anchorN }} anchor links.</a></li>{{ end }}
</ul></details>
{{ end }}
{{ with $formattingN }}<li>{{ $formattingN }} formatting links.</a></li>{{ end }}
{{ with $anchorN }}<li>{{ $anchorN }} anchor links.</a></li>{{ end }}
</ul></details>
{{ end }}
</details>
</details>
{{ end }}
{{ end }}
{{ end }}

View file

@ -0,0 +1,242 @@
@page {
size: 6.14in 9.21in;
margin-bottom: 0.8in;
padding-bottom: 0.2in;
margin-top: 0.7in;
}
@page:left {
margin-right: 0.8in;
margin-left: 0.9in;
@bottom-left-corner {
content: counter(page);
font-size: 1rem;
vertical-align: text-top;
}
@bottom {
content: element(runningTitle);
position: relative;
}
}
@page:right {
margin-left: 0.8in;
margin-right: 0.9in;
@bottom-right-corner {
content: counter(page);
font-size: 1rem;
vertical-align: text-top;
}
@bottom {
content: element(runningAuthors);
position: relative;
}
}
@page crustpage :first {
@bottom-right-corner {
content: none;
}
@bottom {
content: none;
}
}
@media print {
html {
font-size: 0.8em;
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-size: 1rem;
padding: 0;
margin: 0;
}
.sup,
.hassup {
color: black;
}
.grid {
display: inline;
}
.coretitle {
margin-top: 3rem;
margin-bottom: 2rem;
font-size: 2.2rem;
}
.leftcolumn {
display: none;
}
.has,
.afterhas {
font-size: 1.1rem;
}
.mantle,
.crust {
margin-bottom: 0.2em;
}
.content {
padding: 0px;
margin: 0 auto;
margin-top: 4rem;
}
.hpar {
display: none;
}
.mantletitle {
font-size: 1.7rem;
}
.sessiongrid {
display: none;
}
#bibliography {
break-before: page;
}
.footnotes ol {
margin-top: 3rem;
padding-left: 0.9rem;
}
.footnotes hr {
border: none;
border-top: 0px;
text-align: left;
margin-top: 2rem;
margin-bottom: -2rem;
}
.footnotes hr::after {
content: "Endnotes";
font-size: 1.2rem;
font-weight: bold;
}
.runningTitle {
position: running(runningTitle);
}
.runningAuthors {
position: running(runningAuthors);
}
.hasauthors .afterhas {
font-size: 1.5rem;
}
.crustpage {
break-before: page;
page: crustpage;
}
.hasin {
display: none;
}
.abstract {
margin-left: 0;
margin-right: 0;
max-width: inherit;
}
.keywords {
margin-left: 0;
margin-right: 0;
max-width: inherit;
padding-left: 0;
padding-right: 0;
font-size: 0.9rem;
}
/*
h2:before,
h3:before,
h4:before,
h5:before {
content: none;
}
*/
h2, h3, h4, h5, hr {
break-after: avoid;
}
.glosscontainer,
table,
table + p,
tr,
blockquote,
li {
break-inside: avoid;
}
.authorpage {
break-before: page;
}
img {
display: block;
max-height: 150mm;
width: auto;
break-after: avoid;
margin-bottom: 0.5rem;
margin-left: 1rem;
}
.crustoc {
position: relative;
bottom: 0
}
a.toc::before {
direction: rtl;
content: " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ";
line-height: 0;
height: 1px;
position: absolute;
bottom: 10px;
z-index: -1;
}
a.toc {
display: grid;
grid-template-columns: 1fr auto;
align-items: flex-end;
}
a.toc span {
}
a.toc .back {
background: white;
}
a.toc::after {
text-align: right;
float: right;
content: target-counter(attr(href url), page, decimal-leading-zero);
background: white;
padding-left: 0.1rem;
}
ol[data-split-from] {
padding-left: 0.5rem;
}
.longesttitle {
visibility: hidden;
cursor: default;
}
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,100 @@
var UID = {
_current: 0,
getNew: function(){
this._current++;
return this._current;
}
};
HTMLElement.prototype.pseudoStyle = function(element,prop,value){
var _this = this;
var _sheetId = "pseudoStyles";
var _head = document.head || document.getElementsByTagName('head')[0];
var _sheet = document.getElementById(_sheetId) || document.createElement('style');
_sheet.id = _sheetId;
var className = "pseudoStyle" + UID.getNew();
_this.className += " "+className;
_sheet.innerHTML += " ."+className+":"+element+"{"+prop+":"+value+"}";
_head.appendChild(_sheet);
return this;
};
class Sandpoints extends Paged.Handler {
constructor(chunker, polisher, caller) {
super(chunker, polisher, caller);
}
beforeParsed(content) {
var d = {};
content.querySelectorAll('*').forEach((n, i)=> {
if (n.hasAttribute("printhref")) {
n.setAttribute("href", n.getAttribute("printhref"))
}
if (n.classList.length > 0 ) {
n.classList.forEach((c, i)=>{
if (c.startsWith("css-")) {
(c in d) ? d[c]++ : d[c] = 1
let s = ""
Object.keys(d).filter(ks => ks.startsWith(c.slice(0, -1))).forEach((t, i)=> {if (c >= t) {s += `${d[t]}.`}})
n.pseudoStyle('before','content', `"${s} "`)
}
})
}
})
}
afterPageLayout(pageElement, page, breakToken, chunker) {
// Find all split table elements
let tables = pageElement.querySelectorAll("table[data-split-from]");
tables.forEach((table) => {
// There is an edge case where the previous page table
// has zero height (isn't visible).
// To avoid double header we will only add header if there is none.
let tableHeader = table.querySelector("thead");
if (tableHeader) {
return;
}
// Get the reference UUID of the node
let ref = table.dataset.ref;
// Find the node in the original source
let sourceTable = chunker.source.querySelector("[data-ref='" + ref + "']");
// Find if there is a header
let sourceHeader = sourceTable.querySelector("thead");
if (sourceHeader) {
// Clone the header element
let clonedHeader = sourceHeader.cloneNode(true);
// Insert the header at the start of the split table
table.insertBefore(clonedHeader, table.firstChild);
}
});
// Find all tables
tables = pageElement.querySelectorAll("table");
// special case which might not fit for everyone
tables.forEach((table) => {
// if the table has no rows in body, hide it.
// This happens because my render engine creates empty tables.
let sourceBody = table.querySelector("tbody > tr");
if (!sourceBody) {
console.log("Table was hidden, because it has no rows in tbody.");
table.style.visibility = "hidden";
table.style.position = "absolute";
var lineSpacer = table.nextSibling;
if (lineSpacer) {
lineSpacer.style.visibility = "hidden";
lineSpacer.style.position = "absolute";
}
}
});
}
}
Paged.registerHandlers(Sandpoints);

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View file

@ -0,0 +1,145 @@
<!doctype html>
<html lang="en-us">
<head><meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
<html class="no-js" lang="">
<style>
@font-face {
font-family: "Great Vibes";
font-style: normal;
font-weight: 400;
src: url("../fonts/great-vibes-v7-latin-ext_latin-regular.eot");
/* IE9 Compat Modes */
src: local("Great Vibes"), local("GreatVibes-Regular"),
url("../fonts/great-vibes-v7-latin-ext_latin-regular.eot?#iefix")
format("embedded-opentype"),
/* IE6-IE8 */ url("great-vibes-v7-latin-ext_latin-regular.woff2")
format("woff2"),
/* Super Modern Browsers */
url("../fonts/great-vibes-v7-latin-ext_latin-regular.woff") format("woff"),
/* Modern Browsers */
url("../fonts/great-vibes-v7-latin-ext_latin-regular.ttf")
format("truetype"),
/* Safari, Android, iOS */
url("../fonts/great-vibes-v7-latin-ext_latin-regular.svg#GreatVibes")
format("svg");
/* Legacy iOS */
}
.content {
display: flex;
justify-content: center;
margin-top: 3rem;
}
.sandpointslogosize {
font-size: 15rem;
}
.sandpointlogo {
border-radius: 50%;
border: 0.3em solid red;
display: inline-flex;
font-family: "Great Vibes", cursive;
font-size: 1.2em;
font-weight: bold;
color: white;
background-color: red;
position: relative;
padding-left: 1em;
padding-right: 0.2em;
padding-bottom: 1.2em;
max-width: 0em;
max-height: 0em;
}
.sandpointF {
position: absolute;
font-size: 1.2em;
margin-top: -0.2em;
margin-left: -0.44em;
}
.sandpointN {
position: absolute;
font-size: 0.9em;
margin-top: 0.2em;
color: red;
margin-left: -0.45em;
}
.sandpointC {
position: absolute;
font-size: 1em;
margin-left: -0.4em;
margin-top: -0.04em;
padding-bottom: 2;
}
@media print {
.sandpointlogo {
border-radius: 50%;
border: 0.3em solid red;
display: inline-flex;
font-family: "Great Vibes", cursive;
font-size: 1.2em;
font-weight: bold;
color: white;
background-color: red;
position: relative;
padding-left: 1em;
padding-right: 0.2em;
padding-bottom: 1.2em;
max-width: 0em;
max-height: 0em;
}
.sandpointF {
position: absolute;
font-size: 1.2em;
margin-top: -0.2em;
margin-left: -0.44em;
}
.sandpointN {
position: absolute;
font-size: 0.9em;
margin-top: 0.2em;
color: red;
margin-left: -0.45em;
}
.sandpointC {
position: absolute;
font-size: 1em;
margin-left: -0.4em;
margin-top: -0.04em;
padding-bottom: 2;
}
.content {
display: flex;
justify-content: center;
align-items: center;
}
.sandpointslogosize {
font-size: 15rem;
}
}
</style>
</head>
<body>
<div class="content">
<div class="sandpointslogosize">
<div class="sandpointlogo">
<span class="sandpointF">ß</span>
<span class="sandpointN"></span>
<span class="sandpointC">:</span>
</div>
</div>
</div>
</body>
</html>

View file

@ -1 +1,2 @@
# git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20201218222521-33a423ebe113
# git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20220418135300-b3e229aeea27
# git.sandpoints.org/Drawwell/SandpointsEditPage v0.0.0-20210825011616-e019d8a4d186

View file

@ -4,70 +4,76 @@ title = "Simple Sandpoints"
relativeurls = true
disableKinds = ["RSS", "sitemap"]
[params]
description = "Simple Sandpoints project to test and develop...."
# sandpointsGiteaUrl = "https://git.sandpoints.org/Drawwell/SimpleSandpoints"
sandpointsGiteaUrl = "http://localhost:3333/Sandpoints/SimpleSandpoints"
sandpointsCatalogPrefix = "/library/"
[taxonomies]
keyword = "keywords"
tag = "tags"
sandpointsMentionedIn = ["annex"]
[params]
description = "Simple Sandpoints project to test and develop...."
# sandpointsGiteaUrl = "https://git.sandpoints.org/Drawwell/SimpleSandpoints"
sandpointsGiteaUrl = "http://localhost:3333/Sandpoints/SimpleSandpoints"
sandpointsCatalogPrefix = "/library/"
sandpointsMentionedIn = ["annex"]
[outputFormats]
[outputFormats.js]
isPlainText = true
mediaType = "application/javascript"
[outputFormats.js]
isPlainText = true
mediaType = "application/javascript"
[outputs]
list = ["html", "js"]
list = ["html", "js"]
[markup.tableOfContents]
endLevel=4
ordered = true
startLevel = 1
endLevel=4
ordered = true
startLevel = 1
[markup.goldmark.renderer]
unsafe = true
unsafe = true
# [markup.goldmark.parser.attribute]
# block = true
[module]
# replacement allow for easier local development
replacements = ["git.sandpoints.org/Drawwell/SandpointsTheme -> /home/m/devel/SandpointsTheme", "git.sandpoints.org/Drawwell/SandpointsEditPage -> /home/m/devel/SandpointsEditPage"]
[[module.imports]]
path = "git.sandpoints.org/Drawwell/SandpointsTheme"
# replacement allow for easier local development
# replacements = ["git.sandpoints.org/Drawwell/SandpointsTheme -> /home/m/devel/SandpointsTheme", "git.sandpoints.org/Drawwell/SandpointsEditPage -> /home/m/devel/SandpointsEditPage"]
[[module.imports]]
path = "git.sandpoints.org/Drawwell/SandpointsEditPage"
[[module.imports]]
path = "git.sandpoints.org/Drawwell/SandpointsTheme"
[[module.imports.mounts]]
source = "public/index.html"
target = "static/svedit/index.html"
[[module.imports.mounts]]
source = "public/global.css"
target = "static/svedit/global.css"
[[module.imports.mounts]]
source = "public/build"
target = "static/svedit/build"
[[module.imports.mounts]]
source = "archetypes"
target = "archetypes"
[[module.imports.mounts]]
source = "assets"
target = "assets"
[[module.imports.mounts]]
source = "layouts"
target = "layouts"
[[module.imports.mounts]]
source = "static"
target = "static"
[[module.imports.mounts]]
source = "data"
target = "data"
# [[module.imports.mounts]]
# source = "customizations/Dotawo/assets/css/site.css"
# target = "assets/css/site.css"
# [[module.imports.mounts]]
# source = "customizations/Dotawo/static/css/site.min.css"
# target = "static/css/site.min.css"
[[module.imports]]
path = "git.sandpoints.org/Drawwell/SandpointsEditPage"
[[module.imports.mounts]]
source = "public/index.html"
target = "static/svedit/index.html"
[[module.imports.mounts]]
source = "public/global.css"
target = "static/svedit/global.css"
[[module.imports.mounts]]
source = "public/build"
target = "static/svedit/build"
[[module.imports.mounts]]
source = "archetypes"
target = "archetypes"
[[module.imports.mounts]]
source = "assets"
target = "assets"
[[module.imports.mounts]]
source = "layouts"
target = "layouts"
[[module.imports.mounts]]
source = "static"
target = "static"
[[module.imports.mounts]]
source = "data"
target = "data"
# [[module.imports.mounts]]
# source = "customizations/Dotawo/assets/css/site.css"
# target = "assets/css/site.css"
# [[module.imports.mounts]]
# source = "customizations/Dotawo/static/css/site.min.css"
# target = "static/css/site.min.css"