Merge branch 'hugo' into holy-grail

This commit is contained in:
DhammaCharts 2022-07-14 13:42:19 +01:00 committed by GitHub
commit 1e5d18f71a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 51 additions and 61 deletions

View File

@ -33,6 +33,5 @@ const addCopyButtons = () => {
// find chroma inside els[i]
let chroma = els[i].getElementsByClassName("chroma")[0];
els[i].insertBefore(button, chroma);
console.log(els[i].lastChild)
}
}

View File

@ -46,7 +46,18 @@ function initPopover(baseURL, useContextualBacklinks, renderLatex) {
throwOnError: false
})
}
li.addEventListener("mouseover", () => {
// fix tooltip positioning
window.FloatingUIDOM.computePosition(li, el, {
middleware: [window.FloatingUIDOM.offset(15), window.FloatingUIDOM.inline(), window.FloatingUIDOM.shift()],
}).then(({ x, y }) => {
Object.assign(el.style, {
left: `${x}px`,
top: `${y}px`,
})
})
el.classList.add("visible")
})
li.addEventListener("mouseout", () => {

View File

@ -24,7 +24,6 @@ h1, h2, h3, h4, h5, h6, ol, ul, thead {
opacity: 0.3;
transition: opacity 0.3s ease;
color: var(--secondary);
}
p, ul, text {
@ -421,11 +420,24 @@ header {
flex: 1 1 auto;
}
& > svg {
#search-icon {
background-color: var(--lightgray);
border-radius: 4px;
height: 2em;
display: flex;
align-items: center;
cursor: pointer;
& > p {
display: inline;
padding: 0 0.5em 0 1em;
}
}
& svg {
cursor: pointer;
width: 18px;
min-width: 18px;
margin: 0 1em;
margin: 0 0.5em;
&:hover .search-path {
stroke: var(--tertiary);
@ -562,12 +574,10 @@ header {
1% {
display: inline-block;
opacity: 0;
transform: translate(-50%, 40%);
}
100% {
opacity: 1;
visibility: visible;
transform: translate(-50%, 20%);
}
}
@ -578,9 +588,9 @@ header {
display: none;
background-color: var(--light);
padding: 1em;
margin: 1em;
border: 1px solid var(--outlinegray);
border-radius: 5px;
transform: translate(-50%, 40%);
pointer-events: none;
transition: opacity 0.2s ease, transform 0.2s ease;
user-select: none;
@ -594,7 +604,6 @@ header {
&.visible {
opacity: 1;
visibility: visible;
transform: translate(-50%, 20%);
display: inline-block;
animation: dropin 0.2s ease;
}
@ -618,8 +627,6 @@ header {
}
}
#contact_buttons ul {
list-style-type: none;

View File

@ -56,3 +56,7 @@
border-radius: 3px !important;
margin: 0 !important;
}
pre.chroma {
-moz-tab-size:4;-o-tab-size:4;tab-size:4;
}

View File

@ -1,7 +1,6 @@
baseURL = "https://www.dhammacharts.org/quartz/"
languageCode = "en-us"
googleAnalytics = "G-XYFD95KB4J"
pygmentsUseClasses = true
relativeURLs = false
disablePathToLower = true
ignoreFiles = [
@ -18,6 +17,7 @@ enableGitInfo = true
ordered = true
startLevel = 2
[markup.highlight]
noClasses = false
anchorLineNos = false
codeFences = true
guessSyntax = true
@ -27,7 +27,6 @@ enableGitInfo = true
lineNos = true
lineNumbersInTable = true
style = "dracula"
tabWidth = 4
[frontmatter]
lastmod = ["lastmod", ":git", "date", "publishDate"]
publishDate = ["publishDate", "date"]

View File

@ -6,12 +6,7 @@
{{partial "search.html" .}}
<div class="singlePage">
<!-- Begin actual content -->
<header>
<h1 id="page-title"><a href="{{ .Site.BaseURL }}">{{ .Site.Data.config.page_title }}</a></h1>
<svg tabindex="0" id="search-icon" aria-labelledby="title desc" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.9 19.7"><title id="title">Search Icon</title><desc id="desc">Icon to open search</desc><g class="search-path" fill="none"><path stroke-linecap="square" d="M18.5 18.3l-5.4-5.4"/><circle cx="8" cy="8" r="7"/></g></svg>
<div class="spacer"></div>
{{partial "darkmode.html" .}}
</header>
{{partial "header.html" .}}
<article>
<h1>All {{.Title}}</h1>
{{partial "page-list.html" .Paginator.Pages.ByLastmod.Reverse }}

View File

@ -13,22 +13,9 @@
{{end}}
<!-- Begin actual content -->
<header>
<h1 id="page-title"><a href="{{ .Site.BaseURL }}">{{ .Site.Data.config.page_title }}</a></h1>
<svg tabindex="0" id="search-icon" aria-labelledby="title desc" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.9 19.7">
<title id="title">Search Icon</title>
<desc id="desc">Icon to open search</desc>
<g class="search-path" fill="none">
<path stroke-linecap="square" d="M18.5 18.3l-5.4-5.4" />
<circle cx="8" cy="8" r="7" />
</g>
</svg>
<div class="spacer"></div>
{{partial "darkmode.html" .}}
</header>
{{partial "header.html" .}}
<article>
{{if .Title}}
<h1>{{ .Title }}</h1>{{end}}
{{if .Title}}<h1>{{ .Title }}</h1>{{end}}
<p class="meta">
Last updated {{if ne .Date .Lastmod}}{{ .Lastmod.Format "January 2, 2006" }}
{{else}}Unknown{{end}}.

View File

@ -6,12 +6,7 @@
{{partial "search.html" .}}
<div class="singlePage">
<!-- Begin actual content -->
<header>
<h1 id="page-title"><a href="{{ .Site.BaseURL }}">{{ .Site.Data.config.page_title }}</a></h1>
<svg tabindex="0" id="search-icon" aria-labelledby="title desc" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.9 19.7"><title id="title">Search Icon</title><desc id="desc">Icon to open search</desc><g class="search-path" fill="none"><path stroke-linecap="square" d="M18.5 18.3l-5.4-5.4"/><circle cx="8" cy="8" r="7"/></g></svg>
<div class="spacer"></div>
{{partial "darkmode.html" .}}
</header>
{{partial "header.html" .}}
<article>
<h1>All {{.Title}}</h1>
<div class="tags">

View File

@ -6,12 +6,7 @@
{{partial "search.html" .}}
<div class="singlePage">
<!-- Begin actual content -->
<header>
<h1 id="page-title"><a href="{{ .Site.BaseURL }}">{{ .Site.Data.config.page_title }}</a></h1>
<svg tabindex="0" id="search-icon" aria-labelledby="title desc" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.9 19.7"><title id="title">Search Icon</title><desc id="desc">Icon to open search</desc><g class="search-path" fill="none"><path stroke-linecap="square" d="M18.5 18.3l-5.4-5.4"/><circle cx="8" cy="8" r="7"/></g></svg>
<div class="spacer"></div>
{{partial "darkmode.html" .}}
</header>
{{partial "header.html" .}}
<article>
<h1>Tag: {{.Title | humanize}}</h1>
{{partial "page-list.html" .Paginator.Pages}}

View File

@ -13,21 +13,7 @@
{{end}}
<!-- Begin actual content -->
<header>
<h1>{{if .Title}}{{ .Title }}
{{else}}Untitled{{end}}
</h1>
<svg tabindex="0" id="search-icon" aria-labelledby="title desc" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.9 19.7">
<title id="title">Search Icon</title>
<desc id="desc">Icon to open search</desc>
<g class="search-path" fill="none">
<path stroke-linecap="square" d="M18.5 18.3l-5.4-5.4" />
<circle cx="8" cy="8" r="7" />
</g>
</svg>
<div class="spacer"></div>
{{partial "darkmode.html" .}}
</header>
{{partial "header.html" .}}
<article>
{{partial "toc.html" .}}
@ -77,7 +63,6 @@
</div>
</footer>
{{end}}
</body>
</html>

View File

@ -44,6 +44,9 @@
<script src="{{$darkMode.Permalink}}"></script>
{{partial "katex.html" .}}
<script src="https://unpkg.com/@floating-ui/core@0.7.3"></script>
<script src="https://unpkg.com/@floating-ui/dom@0.5.4"></script>
{{ $popover := resources.Get "js/popover.js" | resources.Fingerprint "md5" |
resources.Minify }}
<script src="{{$popover.Permalink}}"></script>

View File

@ -0,0 +1,10 @@
<header>
<h1 id="page-title"><a href="{{ .Site.BaseURL }}">{{ .Site.Data.config.page_title }}</a></h1>
<div class="spacer"></div>
<div id="search-icon">
<p>Search</p>
<svg tabindex="0" aria-labelledby="title desc" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.9 19.7"><title id="title">Search Icon</title><desc id="desc">Icon to open search</desc><g class="search-path" fill="none"><path stroke-linecap="square" d="M18.5 18.3l-5.4-5.4"/><circle cx="8" cy="8" r="7"/></g></svg>
</div>
{{partial "darkmode.html" .}}
</header>