Browse Source

non-italic css for links

master
Marcell Mars 2 years ago
parent
commit
bdf2150dfd
  1. 4
      _vendor/git.sandpoints.org/Drawwell/SandpointsTheme/assets/css/site.css
  2. 176
      _vendor/git.sandpoints.org/Drawwell/SandpointsTheme/assets/js/sandpoints.js
  3. 60
      _vendor/git.sandpoints.org/Drawwell/SandpointsTheme/customizations/Dotawo/assets/css/site.css
  4. 50
      _vendor/git.sandpoints.org/Drawwell/SandpointsTheme/customizations/Dotawo/layouts/_default/_markup/render-image.html
  5. 1
      _vendor/git.sandpoints.org/Drawwell/SandpointsTheme/customizations/Dotawo/layouts/_default/_markup/render-link.html
  6. 2
      _vendor/git.sandpoints.org/Drawwell/SandpointsTheme/customizations/Dotawo/static/css/site.min.css
  7. 4
      _vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/partials/header.html
  8. 2
      _vendor/git.sandpoints.org/Drawwell/SandpointsTheme/static/css/site.min.css
  9. 2
      _vendor/modules.txt
  10. 6
      config.toml

4
_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/assets/css/site.css generated vendored

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

176
_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/assets/js/sandpoints.js generated vendored

@ -1,83 +1,115 @@
window.addEventListener('scroll', function(e) {
if (document.querySelector('body').clientWidth > 767) {
let rightcolumn = document.querySelector('.rightcolumn');
let mantletitle = document.querySelector('.mantletitle') || document.querySelector('.crusttitle') || false;
if (!mantletitle) {
return
}
let mantlebar = document.querySelector('.mantlebar')
let grid = document.querySelector('.grid')
let gridrect = mantletitle.getBoundingClientRect();
window.addEventListener("scroll", function (e) {
if (document.querySelector("body").clientWidth > 767) {
let rightcolumn = document.querySelector(".rightcolumn");
let mantletitle =
document.querySelector(".mantletitle") ||
document.querySelector(".crusttitle") ||
false;
if (!mantletitle) {
return;
}
let mantlebar = document.querySelector(".mantlebar");
let grid = document.querySelector(".grid");
let gridrect = mantletitle.getBoundingClientRect();
if ((document.querySelector('body').clientHeight - (grid.clientHeight + mantletitle.clientHeight + 32)) < window.innerHeight) {
return
}
if (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 (
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";
}
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();
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 (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";
}
}
});
if (document.querySelector(".soundcite")) {
let relPath ="../".repeat(relPathDepth - 1);
window.addEventListener("DOMContentLoaded", (e) => {
let preview = document.querySelector("#preview");
if (
location.pathname.split("/").includes("_preview") ||
location.hash.startsWith("#/_edit")
) {
preview.style.display = "flex";
}
var popcorn = document.createElement('script');
popcorn.src = `${relPath}js/popcorn.min.js`;
document.body.appendChild(popcorn);
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
);
var soundcite = document.createElement('script');
soundcite.src = `${relPath}js/soundcite.min.js`;
document.body.appendChild(soundcite);
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);
})
})
})
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 () {
document.querySelectorAll('details').forEach(i => {
if (i.open) {
i.removeAttribute('open');
} else {
i.setAttribute('open', true);
}
})
}
document.querySelectorAll("details").forEach((i) => {
if (i.open) {
i.removeAttribute("open");
} else {
i.setAttribute("open", true);
}
});
};

60
_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/customizations/Dotawo/assets/css/site.css generated vendored

@ -735,3 +735,63 @@ details {
display: none;
}
}
@media print {
@page {
size: 156mm 234mm;
marks: crop cross;
}
h2 {
break-before: page;
}
html {
font-size: 0.9rem;
box-sizing: border-box;
margin: 0 auto;
padding: 0;
}
.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;
}
}

50
_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/customizations/Dotawo/layouts/_default/_markup/render-image.html generated vendored

@ -0,0 +1,50 @@
{{- $text_link := .Text -}}
{{ $_ := newScratch }}
{{- range $k, $v := .Page.Site.Data.sandpointsnamegraph -}}
{{ $_.Add "triads" $k }}
{{- end -}}
{{- 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 -}}
{{- $b := index $.Page.Site.Data.books.catalog $destination -}}
{{- $bibhref := printf "%sBROWSE_LIBRARY.html#/book/%s" (safeURL ($c_prefix)) $destination }}
{{ $bibtitle := "" }}
{{ with $b.title }}
{{- $bibtitle = printf "%s" $b.title }}
{{ 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>‘{{- $b.title -}}’</a>. {{- with $b.publisher -}}{{- . -}}.{{- end -}}</span>
{{- else -}}
<a href="{{- $c_prefix | safeURL -}}BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with $b.title}} title="{{- . -}}"{{- end -}} target="_blank">{{- $text_link -}}</a>
{{- end -}}
{{- else -}}
<a href="{{- $c_prefix | safeURL -}}BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with .Title}} title="{{- . -}}"{{- end -}}>{{- $text_link -}}⦚<span class="text-xs font-bold p-1 bg-AuChico text-CoconutCream">bib:{{- $destination -}} not found</span></a>
{{- end -}}
{{- else if in ($_.Get "triads") (index (split .Destination ":") 0) -}}
{{- 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>
{{- else -}}
<a href="{{- $session.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with .Title}} title="{{- . -}}"{{- end -}}><span class="sup">{{- index (split .Destination ":") 0 -}}⁄</span>{{- $text_link -}}</a>
{{- end -}}
{{- else -}}
<a href="{{- .Destination -}}/{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}">{{- $text_link -}}⦚<span>{{- .Destination -}} not found</span></a>
{{- end -}}
{{- else if strings.HasPrefix .Destination "audio:" -}}
{{- $a_destination := (substr .Destination 6) -}}
{{- if findRE "^.*static" $a_destination -}}
<span class="soundcite" data-url="{{- (replaceRE "^.*static" "" $a_destination ) | safeURL -}}">{{ .Text }}</span>
{{- else -}}
<span class="soundcite" data-url="{{- $a_destination | safeURL -}}">{{ .Text }}</span>
{{- end -}}
{{- else if findRE "^.*static" .Destination -}}
<img src="{{- (replaceRE "^.*static" "" .Destination ) | safeURL -}}" alt="{{- .Text -}}" {{- with .Title}} title="{{- . -}}"{{- end -}} />
{{- else -}}
<img src="{{- .Destination | safeURL -}}" alt="{{- .Text -}}" {{- with .Title}} title="{{- . -}}"{{- end -}} />
{{- end -}}

1
_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/customizations/Dotawo/layouts/_default/_markup/render-link.html generated vendored

@ -0,0 +1 @@
{{- .Page.Scratch.Add "urls" (slice .Destination) -}}{{- $t := .Text -}}{{- $sup := "" -}}{{- if and (strings.HasPrefix .Destination "{") (.Destination | strings.Count "}") -}}{{- range first 1 (split .Destination "}") -}}{{- range $frmt := (split (substr . 1) ",") -}}{{- if eq $frmt "sc" -}}<span class="smallcaps">{{- $t -}}</span>{{- end -}}{{- end -}}{{- end -}}{{- else }}{{- if strings.HasPrefix .Destination "http" -}}{{- $sup = "www" -}}{{- end -}}{{- if strings.HasPrefix .Destination "#" -}}{{- $sup = "§" -}}{{- end -}}<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener"{{ else if strings.HasPrefix .Destination "#"}}class="anchorz"{{ end }}><span class="sup" style="font-size:0.7em">{{- $sup -}}⁄</span>{{ .Text | safeHTML }}</a>{{- end -}}

2
_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/customizations/Dotawo/static/css/site.min.css generated vendored

File diff suppressed because one or more lines are too long

4
_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/partials/header.html generated vendored

@ -26,8 +26,8 @@
{{ $is_in_is_in = $is_in_is_in | append ($.GetPage .) }}
{{ end }}
{{ if eq hugo.Environment "preview" }}
<div class="headiter">
{{ if eq hugo.Environment "gitea" }}
<div class="headiter" id="preview">
<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_edit/master/content/{{ .File }}">EDIT_THIS</a>
{{ with $scratch.core }}<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_new/master/content/{{ index . 0 }}/">ADD_{{ index . 0 | upper }}</a>{{ end }}
{{ with $scratch.mantle }}<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_new/master/content/{{ index . 0 }}/">ADD_{{ index . 0 | upper }}</a>{{ end }}

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

2
_vendor/modules.txt vendored

@ -1 +1 @@
# git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20201218140110-4732c15fd7b6
# git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20201223111022-78f8dbb9b607

6
config.toml

@ -75,3 +75,9 @@ disableKinds = ["RSS", "sitemap"]
[[module.imports.mounts]]
source = "customizations/Dotawo/layouts/partials/singlebody.html"
target = "layouts/partials/singlebody.html"
[[module.imports.mounts]]
source = "customizations/Dotawo/layouts/_default/_markup/render-image.html"
target = "layouts/_default/_markup/render-image.html"
[[module.imports.mounts]]
source = "customizations/Dotawo/layouts/_default/_markup/render-link.html"
target = "layouts/_default/_markup/render-link.html"

Loading…
Cancel
Save