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;
|
||||
}
|
||||
|
||||
#preview {
|
||||
display: none;
|
||||
}
|
||||
|
||||
sup,
|
||||
sub {
|
||||
vertical-align: baseline;
|
||||
|
|
|
@ -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();
|
||||
|
||||
if ((document.querySelector('body').clientHeight - (grid.clientHeight + mantletitle.clientHeight + 32)) < window.innerHeight) {
|
||||
return
|
||||
}
|
||||
|
||||
if (gridrect.top < 20 && !grid.classList.contains('moved')) {
|
||||
grid.classList.add('moved');
|
||||
mantlebar.style.display = "inline";
|
||||
mantletitle.style.visibility = "hidden";
|
||||
} else if (gridrect.top > 21 && grid.classList.contains('moved')) {
|
||||
grid.classList.remove('moved');
|
||||
mantletitle.style.visibility = "visible";
|
||||
mantlebar.style.display = "none";
|
||||
}
|
||||
} else {
|
||||
let rightcolumn = document.querySelector('.rightcolumn');
|
||||
let mantletitle = document.querySelector('.mantletitle') || document.querySelector('.crusttitle') || false;
|
||||
if (!mantletitle) {
|
||||
return
|
||||
}
|
||||
let mantlebar = document.querySelector('.mantlebar')
|
||||
let grid = document.querySelector('.grid')
|
||||
let gridrect = mantletitle.getBoundingClientRect();
|
||||
|
||||
if (gridrect.top < 20 && !grid.classList.contains('moved')) {
|
||||
grid.classList.add('moved');
|
||||
mantlebar.style.display = "inline";
|
||||
mantletitle.style.visibility = "hidden";
|
||||
} else if (gridrect.top > 21 && grid.classList.contains('moved')) {
|
||||
grid.classList.remove('moved');
|
||||
mantletitle.style.visibility = "visible";
|
||||
mantlebar.style.display = "none";
|
||||
}
|
||||
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;
|
||||
}
|
||||
})
|
||||
|
||||
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 (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);
|
||||
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;
|
||||
}
|
||||
|
||||
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);
|
||||
})
|
||||
})
|
||||
})
|
||||
if (gridrect.top < 20 && !grid.classList.contains("moved")) {
|
||||
grid.classList.add("moved");
|
||||
mantlebar.style.display = "inline";
|
||||
mantletitle.style.visibility = "hidden";
|
||||
} else if (gridrect.top > 21 && grid.classList.contains("moved")) {
|
||||
grid.classList.remove("moved");
|
||||
mantletitle.style.visibility = "visible";
|
||||
mantlebar.style.display = "none";
|
||||
}
|
||||
} else {
|
||||
let rightcolumn = document.querySelector(".rightcolumn");
|
||||
let mantletitle =
|
||||
document.querySelector(".mantletitle") ||
|
||||
document.querySelector(".crusttitle") ||
|
||||
false;
|
||||
if (!mantletitle) {
|
||||
return;
|
||||
}
|
||||
let mantlebar = document.querySelector(".mantlebar");
|
||||
let grid = document.querySelector(".grid");
|
||||
let gridrect = mantletitle.getBoundingClientRect();
|
||||
|
||||
if (gridrect.top < 20 && !grid.classList.contains("moved")) {
|
||||
grid.classList.add("moved");
|
||||
mantlebar.style.display = "inline";
|
||||
mantletitle.style.visibility = "hidden";
|
||||
} else if (gridrect.top > 21 && grid.classList.contains("moved")) {
|
||||
grid.classList.remove("moved");
|
||||
mantletitle.style.visibility = "visible";
|
||||
mantlebar.style.display = "none";
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
window.addEventListener("DOMContentLoaded", (e) => {
|
||||
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");
|
||||
s.appendChild(par.cloneNode(true));
|
||||
par.remove();
|
||||
document
|
||||
.querySelector("#TableOfContents > ol:first-child")
|
||||
.insertBefore(
|
||||
s,
|
||||
document.querySelector("#TableOfContents > ol:first-child").firstChild
|
||||
);
|
||||
|
||||
if (document.querySelector(".soundcite")) {
|
||||
let relPath = "../".repeat(relPathDepth - 1);
|
||||
|
||||
var popcorn = document.createElement("script");
|
||||
popcorn.src = `${relPath}js/popcorn.min.js`;
|
||||
document.body.appendChild(popcorn);
|
||||
|
||||
var soundcite = document.createElement("script");
|
||||
soundcite.src = `${relPath}js/soundcite.min.js`;
|
||||
document.body.appendChild(soundcite);
|
||||
}
|
||||
|
||||
document
|
||||
.querySelectorAll(
|
||||
"#TableOfContents a, .anchorz, .footnote-backref, .footnote-ref"
|
||||
)
|
||||
.forEach((i) => {
|
||||
i.addEventListener("click", (e) => {
|
||||
setTimeout(() => {
|
||||
window.scrollBy({
|
||||
top: document.querySelector(".header").clientHeight * -1.25,
|
||||
behavior: "smooth",
|
||||
});
|
||||
}, 50);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
toggleAllLinks = function () {
|
||||
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);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 .) }}
|
||||
{{ 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
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]]
|
||||
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…
Add table
Reference in a new issue