mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-24 21:34:06 -06:00
Merge branch 'hugo' into holy-grail
This commit is contained in:
commit
1e5d18f71a
@ -33,6 +33,5 @@ const addCopyButtons = () => {
|
|||||||
// find chroma inside els[i]
|
// find chroma inside els[i]
|
||||||
let chroma = els[i].getElementsByClassName("chroma")[0];
|
let chroma = els[i].getElementsByClassName("chroma")[0];
|
||||||
els[i].insertBefore(button, chroma);
|
els[i].insertBefore(button, chroma);
|
||||||
console.log(els[i].lastChild)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,7 +46,18 @@ function initPopover(baseURL, useContextualBacklinks, renderLatex) {
|
|||||||
throwOnError: false
|
throwOnError: false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
li.addEventListener("mouseover", () => {
|
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")
|
el.classList.add("visible")
|
||||||
})
|
})
|
||||||
li.addEventListener("mouseout", () => {
|
li.addEventListener("mouseout", () => {
|
||||||
|
|||||||
@ -24,7 +24,6 @@ h1, h2, h3, h4, h5, h6, ol, ul, thead {
|
|||||||
opacity: 0.3;
|
opacity: 0.3;
|
||||||
transition: opacity 0.3s ease;
|
transition: opacity 0.3s ease;
|
||||||
color: var(--secondary);
|
color: var(--secondary);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
p, ul, text {
|
p, ul, text {
|
||||||
@ -421,11 +420,24 @@ header {
|
|||||||
flex: 1 1 auto;
|
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;
|
cursor: pointer;
|
||||||
width: 18px;
|
width: 18px;
|
||||||
min-width: 18px;
|
min-width: 18px;
|
||||||
margin: 0 1em;
|
margin: 0 0.5em;
|
||||||
|
|
||||||
&:hover .search-path {
|
&:hover .search-path {
|
||||||
stroke: var(--tertiary);
|
stroke: var(--tertiary);
|
||||||
@ -562,12 +574,10 @@ header {
|
|||||||
1% {
|
1% {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: translate(-50%, 40%);
|
|
||||||
}
|
}
|
||||||
100% {
|
100% {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
transform: translate(-50%, 20%);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -578,9 +588,9 @@ header {
|
|||||||
display: none;
|
display: none;
|
||||||
background-color: var(--light);
|
background-color: var(--light);
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
|
margin: 1em;
|
||||||
border: 1px solid var(--outlinegray);
|
border: 1px solid var(--outlinegray);
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
transform: translate(-50%, 40%);
|
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
transition: opacity 0.2s ease, transform 0.2s ease;
|
transition: opacity 0.2s ease, transform 0.2s ease;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
@ -594,7 +604,6 @@ header {
|
|||||||
&.visible {
|
&.visible {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
transform: translate(-50%, 20%);
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
animation: dropin 0.2s ease;
|
animation: dropin 0.2s ease;
|
||||||
}
|
}
|
||||||
@ -618,8 +627,6 @@ header {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#contact_buttons ul {
|
#contact_buttons ul {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
|
|
||||||
|
|||||||
@ -56,3 +56,7 @@
|
|||||||
border-radius: 3px !important;
|
border-radius: 3px !important;
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pre.chroma {
|
||||||
|
-moz-tab-size:4;-o-tab-size:4;tab-size:4;
|
||||||
|
}
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
baseURL = "https://www.dhammacharts.org/quartz/"
|
baseURL = "https://www.dhammacharts.org/quartz/"
|
||||||
languageCode = "en-us"
|
languageCode = "en-us"
|
||||||
googleAnalytics = "G-XYFD95KB4J"
|
googleAnalytics = "G-XYFD95KB4J"
|
||||||
pygmentsUseClasses = true
|
|
||||||
relativeURLs = false
|
relativeURLs = false
|
||||||
disablePathToLower = true
|
disablePathToLower = true
|
||||||
ignoreFiles = [
|
ignoreFiles = [
|
||||||
@ -18,6 +17,7 @@ enableGitInfo = true
|
|||||||
ordered = true
|
ordered = true
|
||||||
startLevel = 2
|
startLevel = 2
|
||||||
[markup.highlight]
|
[markup.highlight]
|
||||||
|
noClasses = false
|
||||||
anchorLineNos = false
|
anchorLineNos = false
|
||||||
codeFences = true
|
codeFences = true
|
||||||
guessSyntax = true
|
guessSyntax = true
|
||||||
@ -27,7 +27,6 @@ enableGitInfo = true
|
|||||||
lineNos = true
|
lineNos = true
|
||||||
lineNumbersInTable = true
|
lineNumbersInTable = true
|
||||||
style = "dracula"
|
style = "dracula"
|
||||||
tabWidth = 4
|
|
||||||
[frontmatter]
|
[frontmatter]
|
||||||
lastmod = ["lastmod", ":git", "date", "publishDate"]
|
lastmod = ["lastmod", ":git", "date", "publishDate"]
|
||||||
publishDate = ["publishDate", "date"]
|
publishDate = ["publishDate", "date"]
|
||||||
|
|||||||
@ -6,12 +6,7 @@
|
|||||||
{{partial "search.html" .}}
|
{{partial "search.html" .}}
|
||||||
<div class="singlePage">
|
<div class="singlePage">
|
||||||
<!-- Begin actual content -->
|
<!-- Begin actual content -->
|
||||||
<header>
|
{{partial "header.html" .}}
|
||||||
<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>
|
|
||||||
<article>
|
<article>
|
||||||
<h1>All {{.Title}}</h1>
|
<h1>All {{.Title}}</h1>
|
||||||
{{partial "page-list.html" .Paginator.Pages.ByLastmod.Reverse }}
|
{{partial "page-list.html" .Paginator.Pages.ByLastmod.Reverse }}
|
||||||
|
|||||||
@ -13,22 +13,9 @@
|
|||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
<!-- Begin actual content -->
|
<!-- Begin actual content -->
|
||||||
<header>
|
{{partial "header.html" .}}
|
||||||
<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>
|
|
||||||
<article>
|
<article>
|
||||||
{{if .Title}}
|
{{if .Title}}<h1>{{ .Title }}</h1>{{end}}
|
||||||
<h1>{{ .Title }}</h1>{{end}}
|
|
||||||
<p class="meta">
|
<p class="meta">
|
||||||
Last updated {{if ne .Date .Lastmod}}{{ .Lastmod.Format "January 2, 2006" }}
|
Last updated {{if ne .Date .Lastmod}}{{ .Lastmod.Format "January 2, 2006" }}
|
||||||
{{else}}Unknown{{end}}.
|
{{else}}Unknown{{end}}.
|
||||||
|
|||||||
@ -6,12 +6,7 @@
|
|||||||
{{partial "search.html" .}}
|
{{partial "search.html" .}}
|
||||||
<div class="singlePage">
|
<div class="singlePage">
|
||||||
<!-- Begin actual content -->
|
<!-- Begin actual content -->
|
||||||
<header>
|
{{partial "header.html" .}}
|
||||||
<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>
|
|
||||||
<article>
|
<article>
|
||||||
<h1>All {{.Title}}</h1>
|
<h1>All {{.Title}}</h1>
|
||||||
<div class="tags">
|
<div class="tags">
|
||||||
|
|||||||
@ -6,12 +6,7 @@
|
|||||||
{{partial "search.html" .}}
|
{{partial "search.html" .}}
|
||||||
<div class="singlePage">
|
<div class="singlePage">
|
||||||
<!-- Begin actual content -->
|
<!-- Begin actual content -->
|
||||||
<header>
|
{{partial "header.html" .}}
|
||||||
<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>
|
|
||||||
<article>
|
<article>
|
||||||
<h1>Tag: {{.Title | humanize}}</h1>
|
<h1>Tag: {{.Title | humanize}}</h1>
|
||||||
{{partial "page-list.html" .Paginator.Pages}}
|
{{partial "page-list.html" .Paginator.Pages}}
|
||||||
|
|||||||
@ -13,21 +13,7 @@
|
|||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
<!-- Begin actual content -->
|
<!-- Begin actual content -->
|
||||||
<header>
|
{{partial "header.html" .}}
|
||||||
<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>
|
|
||||||
|
|
||||||
<article>
|
<article>
|
||||||
{{partial "toc.html" .}}
|
{{partial "toc.html" .}}
|
||||||
@ -77,7 +63,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -44,6 +44,9 @@
|
|||||||
<script src="{{$darkMode.Permalink}}"></script>
|
<script src="{{$darkMode.Permalink}}"></script>
|
||||||
{{partial "katex.html" .}}
|
{{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" |
|
{{ $popover := resources.Get "js/popover.js" | resources.Fingerprint "md5" |
|
||||||
resources.Minify }}
|
resources.Minify }}
|
||||||
<script src="{{$popover.Permalink}}"></script>
|
<script src="{{$popover.Permalink}}"></script>
|
||||||
|
|||||||
10
layouts/partials/header.html
Normal file
10
layouts/partials/header.html
Normal 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>
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user