non-italic css for links
This commit is contained in:
parent
dc32052517
commit
bdf2150dfd
10 changed files with 235 additions and 82 deletions
|
@ -307,6 +307,10 @@ body {
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#preview {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
sup,
|
sup,
|
||||||
sub {
|
sub {
|
||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
|
|
|
@ -1,83 +1,115 @@
|
||||||
window.addEventListener('scroll', function(e) {
|
window.addEventListener("scroll", function (e) {
|
||||||
if (document.querySelector('body').clientWidth > 767) {
|
if (document.querySelector("body").clientWidth > 767) {
|
||||||
let rightcolumn = document.querySelector('.rightcolumn');
|
let rightcolumn = document.querySelector(".rightcolumn");
|
||||||
let mantletitle = document.querySelector('.mantletitle') || document.querySelector('.crusttitle') || false;
|
let mantletitle =
|
||||||
|
document.querySelector(".mantletitle") ||
|
||||||
|
document.querySelector(".crusttitle") ||
|
||||||
|
false;
|
||||||
if (!mantletitle) {
|
if (!mantletitle) {
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
let mantlebar = document.querySelector('.mantlebar')
|
let mantlebar = document.querySelector(".mantlebar");
|
||||||
let grid = document.querySelector('.grid')
|
let grid = document.querySelector(".grid");
|
||||||
let gridrect = mantletitle.getBoundingClientRect();
|
let gridrect = mantletitle.getBoundingClientRect();
|
||||||
|
|
||||||
if ((document.querySelector('body').clientHeight - (grid.clientHeight + mantletitle.clientHeight + 32)) < window.innerHeight) {
|
if (
|
||||||
return
|
document.querySelector("body").clientHeight -
|
||||||
|
(grid.clientHeight + mantletitle.clientHeight + 32) <
|
||||||
|
window.innerHeight
|
||||||
|
) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gridrect.top < 20 && !grid.classList.contains('moved')) {
|
if (gridrect.top < 20 && !grid.classList.contains("moved")) {
|
||||||
grid.classList.add('moved');
|
grid.classList.add("moved");
|
||||||
mantlebar.style.display = "inline";
|
mantlebar.style.display = "inline";
|
||||||
mantletitle.style.visibility = "hidden";
|
mantletitle.style.visibility = "hidden";
|
||||||
} else if (gridrect.top > 21 && grid.classList.contains('moved')) {
|
} else if (gridrect.top > 21 && grid.classList.contains("moved")) {
|
||||||
grid.classList.remove('moved');
|
grid.classList.remove("moved");
|
||||||
mantletitle.style.visibility = "visible";
|
mantletitle.style.visibility = "visible";
|
||||||
mantlebar.style.display = "none";
|
mantlebar.style.display = "none";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let rightcolumn = document.querySelector('.rightcolumn');
|
let rightcolumn = document.querySelector(".rightcolumn");
|
||||||
let mantletitle = document.querySelector('.mantletitle') || document.querySelector('.crusttitle') || false;
|
let mantletitle =
|
||||||
|
document.querySelector(".mantletitle") ||
|
||||||
|
document.querySelector(".crusttitle") ||
|
||||||
|
false;
|
||||||
if (!mantletitle) {
|
if (!mantletitle) {
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
let mantlebar = document.querySelector('.mantlebar')
|
let mantlebar = document.querySelector(".mantlebar");
|
||||||
let grid = document.querySelector('.grid')
|
let grid = document.querySelector(".grid");
|
||||||
let gridrect = mantletitle.getBoundingClientRect();
|
let gridrect = mantletitle.getBoundingClientRect();
|
||||||
|
|
||||||
if (gridrect.top < 20 && !grid.classList.contains('moved')) {
|
if (gridrect.top < 20 && !grid.classList.contains("moved")) {
|
||||||
grid.classList.add('moved');
|
grid.classList.add("moved");
|
||||||
mantlebar.style.display = "inline";
|
mantlebar.style.display = "inline";
|
||||||
mantletitle.style.visibility = "hidden";
|
mantletitle.style.visibility = "hidden";
|
||||||
} else if (gridrect.top > 21 && grid.classList.contains('moved')) {
|
} else if (gridrect.top > 21 && grid.classList.contains("moved")) {
|
||||||
grid.classList.remove('moved');
|
grid.classList.remove("moved");
|
||||||
mantletitle.style.visibility = "visible";
|
mantletitle.style.visibility = "visible";
|
||||||
mantlebar.style.display = "none";
|
mantlebar.style.display = "none";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
window.addEventListener('DOMContentLoaded', (e) => {
|
window.addEventListener("DOMContentLoaded", (e) => {
|
||||||
let par = document.querySelector("#TableOfContents > ol:first-child > li:first-child");
|
let preview = document.querySelector("#preview");
|
||||||
|
if (
|
||||||
|
location.pathname.split("/").includes("_preview") ||
|
||||||
|
location.hash.startsWith("#/_edit")
|
||||||
|
) {
|
||||||
|
preview.style.display = "flex";
|
||||||
|
}
|
||||||
|
|
||||||
|
let par = document.querySelector(
|
||||||
|
"#TableOfContents > ol:first-child > li:first-child"
|
||||||
|
);
|
||||||
let s = document.createElement("span");
|
let s = document.createElement("span");
|
||||||
s.appendChild(par.cloneNode(true))
|
s.appendChild(par.cloneNode(true));
|
||||||
par.remove()
|
par.remove();
|
||||||
document.querySelector("#TableOfContents > ol:first-child").insertBefore(s, document.querySelector("#TableOfContents > ol:first-child").firstChild)
|
document
|
||||||
|
.querySelector("#TableOfContents > ol:first-child")
|
||||||
|
.insertBefore(
|
||||||
|
s,
|
||||||
|
document.querySelector("#TableOfContents > ol:first-child").firstChild
|
||||||
|
);
|
||||||
|
|
||||||
if (document.querySelector(".soundcite")) {
|
if (document.querySelector(".soundcite")) {
|
||||||
let relPath = "../".repeat(relPathDepth - 1);
|
let relPath = "../".repeat(relPathDepth - 1);
|
||||||
|
|
||||||
var popcorn = document.createElement('script');
|
var popcorn = document.createElement("script");
|
||||||
popcorn.src = `${relPath}js/popcorn.min.js`;
|
popcorn.src = `${relPath}js/popcorn.min.js`;
|
||||||
document.body.appendChild(popcorn);
|
document.body.appendChild(popcorn);
|
||||||
|
|
||||||
var soundcite = document.createElement('script');
|
var soundcite = document.createElement("script");
|
||||||
soundcite.src = `${relPath}js/soundcite.min.js`;
|
soundcite.src = `${relPath}js/soundcite.min.js`;
|
||||||
document.body.appendChild(soundcite);
|
document.body.appendChild(soundcite);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
document.querySelectorAll('#TableOfContents a, .anchorz, .footnote-backref, .footnote-ref').forEach(i => {
|
document
|
||||||
i.addEventListener('click', e => {
|
.querySelectorAll(
|
||||||
|
"#TableOfContents a, .anchorz, .footnote-backref, .footnote-ref"
|
||||||
|
)
|
||||||
|
.forEach((i) => {
|
||||||
|
i.addEventListener("click", (e) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.scrollBy({top: document.querySelector('.header').clientHeight * -1.25, behavior: 'smooth'})}, 50);
|
window.scrollBy({
|
||||||
})
|
top: document.querySelector(".header").clientHeight * -1.25,
|
||||||
})
|
behavior: "smooth",
|
||||||
})
|
});
|
||||||
|
}, 50);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
toggleAllLinks = function () {
|
toggleAllLinks = function () {
|
||||||
document.querySelectorAll('details').forEach(i => {
|
document.querySelectorAll("details").forEach((i) => {
|
||||||
if (i.open) {
|
if (i.open) {
|
||||||
i.removeAttribute('open');
|
i.removeAttribute("open");
|
||||||
} else {
|
} else {
|
||||||
i.setAttribute('open', true);
|
i.setAttribute("open", true);
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
|
@ -735,3 +735,63 @@ details {
|
||||||
display: none;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -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 -}}
|
|
@ -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 -}}
|
File diff suppressed because one or more lines are too long
|
@ -26,8 +26,8 @@
|
||||||
{{ $is_in_is_in = $is_in_is_in | append ($.GetPage .) }}
|
{{ $is_in_is_in = $is_in_is_in | append ($.GetPage .) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if eq hugo.Environment "preview" }}
|
{{ if eq hugo.Environment "gitea" }}
|
||||||
<div class="headiter">
|
<div class="headiter" id="preview">
|
||||||
<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_edit/master/content/{{ .File }}">EDIT_THIS</a>
|
<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_edit/master/content/{{ .File }}">EDIT_THIS</a>
|
||||||
{{ with $scratch.core }}<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_new/master/content/{{ index . 0 }}/">ADD_{{ index . 0 | upper }}</a>{{ end }}
|
{{ with $scratch.core }}<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_new/master/content/{{ index . 0 }}/">ADD_{{ index . 0 | upper }}</a>{{ end }}
|
||||||
{{ with $scratch.mantle }}<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_new/master/content/{{ index . 0 }}/">ADD_{{ index . 0 | upper }}</a>{{ end }}
|
{{ with $scratch.mantle }}<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_new/master/content/{{ index . 0 }}/">ADD_{{ index . 0 | upper }}</a>{{ end }}
|
||||||
|
|
2
_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/static/css/site.min.css
generated
vendored
2
_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/static/css/site.min.css
generated
vendored
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
||||||
# git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20201218140110-4732c15fd7b6
|
# git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20201223111022-78f8dbb9b607
|
||||||
|
|
|
@ -75,3 +75,9 @@ disableKinds = ["RSS", "sitemap"]
|
||||||
[[module.imports.mounts]]
|
[[module.imports.mounts]]
|
||||||
source = "customizations/Dotawo/layouts/partials/singlebody.html"
|
source = "customizations/Dotawo/layouts/partials/singlebody.html"
|
||||||
target = "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…
Add table
Reference in a new issue