Skip to content

Commit 4d226b9

Browse files
MasssiveJuice08dependabot[bot]ndrooodannyvtolxy-241
authored
Update Quartz to commit d613a3d (#90)
* chore(deps-dev): bump typescript from 5.5.3 to 5.5.4 (#1343) Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.5.3 to 5.5.4. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml) - [Commits](microsoft/TypeScript@v5.5.3...v5.5.4) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump rehype-citation from 2.0.0 to 2.1.1 (#1341) Bumps [rehype-citation](https://github.com/timlrx/rehype-citation) from 2.0.0 to 2.1.1. - [Release notes](https://github.com/timlrx/rehype-citation/releases) - [Commits](timlrx/rehype-citation@v2.0.0...v2.1.1) --- updated-dependencies: - dependency-name: rehype-citation dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump tsx from 4.16.2 to 4.17.0 (#1340) Bumps [tsx](https://github.com/privatenumber/tsx) from 4.16.2 to 4.17.0. - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](privatenumber/tsx@v4.16.2...v4.17.0) --- updated-dependencies: - dependency-name: tsx dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump rehype-katex from 7.0.0 to 7.0.1 (#1356) Bumps [rehype-katex](https://github.com/remarkjs/remark-math) from 7.0.0 to 7.0.1. - [Release notes](https://github.com/remarkjs/remark-math/releases) - [Commits](https://github.com/remarkjs/remark-math/compare/[email protected]@7.0.1) --- updated-dependencies: - dependency-name: rehype-katex dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump @napi-rs/simple-git from 0.1.16 to 0.1.17 (#1357) Bumps [@napi-rs/simple-git](https://github.com/Brooooooklyn/simple-git) from 0.1.16 to 0.1.17. - [Release notes](https://github.com/Brooooooklyn/simple-git/releases) - [Commits](Brooooooklyn/simple-git@v0.1.16...v0.1.17) --- updated-dependencies: - dependency-name: "@napi-rs/simple-git" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump preact-render-to-string from 6.5.7 to 6.5.9 (#1360) Bumps [preact-render-to-string](https://github.com/preactjs/preact-render-to-string) from 6.5.7 to 6.5.9. - [Release notes](https://github.com/preactjs/preact-render-to-string/releases) - [Changelog](https://github.com/preactjs/preact-render-to-string/blob/main/CHANGELOG.md) - [Commits](preactjs/preact-render-to-string@v6.5.7...v6.5.9) --- updated-dependencies: - dependency-name: preact-render-to-string dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump lightningcss from 1.25.1 to 1.26.0 (#1359) Bumps [lightningcss](https://github.com/parcel-bundler/lightningcss) from 1.25.1 to 1.26.0. - [Release notes](https://github.com/parcel-bundler/lightningcss/releases) - [Commits](parcel-bundler/lightningcss@v1.25.1...v1.26.0) --- updated-dependencies: - dependency-name: lightningcss dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump @floating-ui/dom from 1.6.8 to 1.6.10 (#1358) Bumps [@floating-ui/dom](https://github.com/floating-ui/floating-ui/tree/HEAD/packages/dom) from 1.6.8 to 1.6.10. - [Release notes](https://github.com/floating-ui/floating-ui/releases) - [Changelog](https://github.com/floating-ui/floating-ui/blob/master/packages/dom/CHANGELOG.md) - [Commits](https://github.com/floating-ui/floating-ui/commits/@floating-ui/[email protected]/packages/dom) --- updated-dependencies: - dependency-name: "@floating-ui/dom" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: Add a wrapper element to dates in PageList. (#1345) * Add a wrapper span to dates in PageList. This means there is a placeholder when date is not specified, so the values in grid-template-columns always line up correctly. * Use a <div> instead -- better practice to stick to block elements. * fix: Link visibility in exampanded TOC while collapseByDefault is true (#1371) * a11y(darkmode): use a button for the theme toggle (#1335) * Use a `<button>` for theme toggle * docs: Adds back Xinyang's cs garden to showcase (#1323) adding back my garden which was deleted from the cleanup showcase * feat(toc,explorer): add accessibility for toggle (#1327) * Restore focus highlight on explorer toggle button. Remove `unset: all` declaration causing `outline` property to be unset. This allows the default browser focus highlight to be shown. * Fix semantics of expandable sections (explorer, toc). This adds the appropriate aria attributes for the [disclosure pattern](https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/examples/disclosure-image-description/#javascriptandcsssourcecode) and uses `visibility: hidden` to remove the hidden elements from the focus order without disrupting the animations. Further work is needed on the tree view nodes. * Run prettier for SCSS files. * feat: custom global latex macros (closes #1325) * chore: ts fixes * docs: recommend at least node 20 in gh * fix: unmemoize explorer on rebuild (closes #1077) * fix: pass buildId to worker * Fix theme button DOM hierarchy and styles * Restore functionality of theme button * `aria-label` on theme svgs so their accessible labels are included in button content --------- Co-authored-by: Xinyang Yu <[email protected]> Co-authored-by: Jacky Zhao <[email protected]> * perf(graph): canvas implementation (#1328) * perf(graph): initial canvas layout include nodes and links drawn Signed-off-by: Aaron Pham <[email protected]> * fix(graph): update persistent for nodeGfx Signed-off-by: Aaron Pham <[email protected]> * chore(graph): add canvas element to avoid rerendering glitch Signed-off-by: Aaron Pham <[email protected]> * fix(spa): only render graph once in global Signed-off-by: Aaron Pham <[email protected]> * fix(graph): change svg as button render global graph on toggle Signed-off-by: Aaron Pham <[email protected]> * fix(graph): fix anchor position and zIndex behaviour Signed-off-by: Aaron Pham <[email protected]> * chore(graph): increase linkDistance Signed-off-by: Aaron Pham <[email protected]> * refactor * fmt * pkg --------- Signed-off-by: Aaron Pham <[email protected]> Co-authored-by: Jacky Zhao <[email protected]> * fix: Popover z-index issue on left sidebar (#1230) * chore(deps-dev): bump tsx from 4.17.0 to 4.18.0 (#1377) Bumps [tsx](https://github.com/privatenumber/tsx) from 4.17.0 to 4.18.0. - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](privatenumber/tsx@v4.17.0...v4.18.0) --- updated-dependencies: - dependency-name: tsx dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump @napi-rs/simple-git from 0.1.17 to 0.1.19 (#1376) Bumps [@napi-rs/simple-git](https://github.com/Brooooooklyn/simple-git) from 0.1.17 to 0.1.19. - [Release notes](https://github.com/Brooooooklyn/simple-git/releases) - [Commits](Brooooooklyn/simple-git@v0.1.17...v0.1.19) --- updated-dependencies: - dependency-name: "@napi-rs/simple-git" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump @types/node from 22.1.0 to 22.5.0 (#1375) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.1.0 to 22.5.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump @types/yargs from 17.0.32 to 17.0.33 (#1374) Bumps [@types/yargs](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/yargs) from 17.0.32 to 17.0.33. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/yargs) --- updated-dependencies: - dependency-name: "@types/yargs" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump unified from 11.0.4 to 11.0.5 (#1373) Bumps [unified](https://github.com/unifiedjs/unified) from 11.0.4 to 11.0.5. - [Release notes](https://github.com/unifiedjs/unified/releases) - [Changelog](https://github.com/unifiedjs/unified/blob/main/changelog.md) - [Commits](unifiedjs/unified@11.0.4...11.0.5) --- updated-dependencies: - dependency-name: unified dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Aaron Pham <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Andrew <[email protected]> Co-authored-by: Danny van Tol <[email protected]> Co-authored-by: Xinyang Yu <[email protected]> Co-authored-by: Jacky Zhao <[email protected]> Co-authored-by: Aaron Pham <[email protected]> Co-authored-by: Iker Larrea <[email protected]>
1 parent 81f63cf commit 4d226b9

12 files changed

+975
-585
lines changed

package-lock.json

+437-270
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+14-12
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@jackyzha0/quartz",
33
"description": "🌱 publish your digital garden and notes as a website",
44
"private": true,
5-
"version": "4.3.0",
5+
"version": "4.3.1",
66
"type": "module",
77
"author": "jackyzha0 <[email protected]>",
88
"license": "MIT",
@@ -36,8 +36,9 @@
3636
},
3737
"dependencies": {
3838
"@clack/prompts": "^0.7.0",
39-
"@floating-ui/dom": "^1.6.8",
40-
"@napi-rs/simple-git": "0.1.16",
39+
"@floating-ui/dom": "^1.6.10",
40+
"@napi-rs/simple-git": "0.1.19",
41+
"@tweenjs/tween.js": "^25.0.0",
4142
"async-mutex": "^0.5.0",
4243
"chalk": "^5.3.0",
4344
"chokidar": "^3.6.0",
@@ -53,19 +54,20 @@
5354
"hast-util-to-string": "^3.0.0",
5455
"is-absolute-url": "^4.0.1",
5556
"js-yaml": "^4.1.0",
56-
"lightningcss": "^1.25.1",
57+
"lightningcss": "^1.26.0",
5758
"mdast-util-find-and-replace": "^3.0.1",
5859
"mdast-util-to-hast": "^13.2.0",
5960
"mdast-util-to-string": "^4.0.0",
6061
"micromorph": "^0.4.5",
62+
"pixi.js": "^8.3.3",
6163
"preact": "^10.23.2",
62-
"preact-render-to-string": "^6.5.7",
64+
"preact-render-to-string": "^6.5.9",
6365
"pretty-bytes": "^6.1.1",
6466
"pretty-time": "^1.1.0",
6567
"reading-time": "^1.5.0",
6668
"rehype-autolink-headings": "^7.1.0",
67-
"rehype-citation": "^2.0.0",
68-
"rehype-katex": "^7.0.0",
69+
"rehype-citation": "^2.1.1",
70+
"rehype-katex": "^7.0.1",
6971
"rehype-mathjax": "^6.0.0",
7072
"rehype-pretty-code": "^0.13.2",
7173
"rehype-raw": "^7.0.0",
@@ -85,7 +87,7 @@
8587
"source-map-support": "^0.5.21",
8688
"to-vfile": "^8.0.0",
8789
"toml": "^3.0.0",
88-
"unified": "^11.0.4",
90+
"unified": "^11.0.5",
8991
"unist-util-visit": "^5.0.0",
9092
"vfile": "^6.0.2",
9193
"workerpool": "^9.1.3",
@@ -97,14 +99,14 @@
9799
"@types/d3": "^7.4.3",
98100
"@types/hast": "^3.0.4",
99101
"@types/js-yaml": "^4.0.9",
100-
"@types/node": "^22.1.0",
102+
"@types/node": "^22.5.0",
101103
"@types/pretty-time": "^1.1.5",
102104
"@types/source-map-support": "^0.5.10",
103105
"@types/ws": "^8.5.12",
104-
"@types/yargs": "^17.0.32",
106+
"@types/yargs": "^17.0.33",
105107
"esbuild": "^0.19.9",
106108
"prettier": "^3.3.3",
107-
"tsx": "^4.16.2",
108-
"typescript": "^5.5.3"
109+
"tsx": "^4.18.0",
110+
"typescript": "^5.5.4"
109111
}
110112
}

quartz/components/Darkmode.tsx

+32-35
Original file line numberDiff line numberDiff line change
@@ -9,41 +9,38 @@ import { classNames } from "../util/lang"
99

1010
const Darkmode: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) => {
1111
return (
12-
<div class={classNames(displayClass, "darkmode")}>
13-
<input class="toggle" id="darkmode-toggle" type="checkbox" tabIndex={-1} />
14-
<label id="toggle-label-light" for="darkmode-toggle" tabIndex={-1}>
15-
<svg
16-
xmlns="http://www.w3.org/2000/svg"
17-
xmlnsXlink="http://www.w3.org/1999/xlink"
18-
version="1.1"
19-
id="dayIcon"
20-
x="0px"
21-
y="0px"
22-
viewBox="0 0 35 35"
23-
style="enable-background:new 0 0 35 35"
24-
xmlSpace="preserve"
25-
>
26-
<title>{i18n(cfg.locale).components.themeToggle.darkMode}</title>
27-
<path d="M6,17.5C6,16.672,5.328,16,4.5,16h-3C0.672,16,0,16.672,0,17.5 S0.672,19,1.5,19h3C5.328,19,6,18.328,6,17.5z M7.5,26c-0.414,0-0.789,0.168-1.061,0.439l-2,2C4.168,28.711,4,29.086,4,29.5 C4,30.328,4.671,31,5.5,31c0.414,0,0.789-0.168,1.06-0.44l2-2C8.832,28.289,9,27.914,9,27.5C9,26.672,8.329,26,7.5,26z M17.5,6 C18.329,6,19,5.328,19,4.5v-3C19,0.672,18.329,0,17.5,0S16,0.672,16,1.5v3C16,5.328,16.671,6,17.5,6z M27.5,9 c0.414,0,0.789-0.168,1.06-0.439l2-2C30.832,6.289,31,5.914,31,5.5C31,4.672,30.329,4,29.5,4c-0.414,0-0.789,0.168-1.061,0.44 l-2,2C26.168,6.711,26,7.086,26,7.5C26,8.328,26.671,9,27.5,9z M6.439,8.561C6.711,8.832,7.086,9,7.5,9C8.328,9,9,8.328,9,7.5 c0-0.414-0.168-0.789-0.439-1.061l-2-2C6.289,4.168,5.914,4,5.5,4C4.672,4,4,4.672,4,5.5c0,0.414,0.168,0.789,0.439,1.06 L6.439,8.561z M33.5,16h-3c-0.828,0-1.5,0.672-1.5,1.5s0.672,1.5,1.5,1.5h3c0.828,0,1.5-0.672,1.5-1.5S34.328,16,33.5,16z M28.561,26.439C28.289,26.168,27.914,26,27.5,26c-0.828,0-1.5,0.672-1.5,1.5c0,0.414,0.168,0.789,0.439,1.06l2,2 C28.711,30.832,29.086,31,29.5,31c0.828,0,1.5-0.672,1.5-1.5c0-0.414-0.168-0.789-0.439-1.061L28.561,26.439z M17.5,29 c-0.829,0-1.5,0.672-1.5,1.5v3c0,0.828,0.671,1.5,1.5,1.5s1.5-0.672,1.5-1.5v-3C19,29.672,18.329,29,17.5,29z M17.5,7 C11.71,7,7,11.71,7,17.5S11.71,28,17.5,28S28,23.29,28,17.5S23.29,7,17.5,7z M17.5,25c-4.136,0-7.5-3.364-7.5-7.5 c0-4.136,3.364-7.5,7.5-7.5c4.136,0,7.5,3.364,7.5,7.5C25,21.636,21.636,25,17.5,25z"></path>
28-
</svg>
29-
</label>
30-
<label id="toggle-label-dark" for="darkmode-toggle" tabIndex={-1}>
31-
<svg
32-
xmlns="http://www.w3.org/2000/svg"
33-
xmlnsXlink="http://www.w3.org/1999/xlink"
34-
version="1.1"
35-
id="nightIcon"
36-
x="0px"
37-
y="0px"
38-
viewBox="0 0 100 100"
39-
style="enable-background:new 0 0 100 100"
40-
xmlSpace="preserve"
41-
>
42-
<title>{i18n(cfg.locale).components.themeToggle.lightMode}</title>
43-
<path d="M96.76,66.458c-0.853-0.852-2.15-1.064-3.23-0.534c-6.063,2.991-12.858,4.571-19.655,4.571 C62.022,70.495,50.88,65.88,42.5,57.5C29.043,44.043,25.658,23.536,34.076,6.47c0.532-1.08,0.318-2.379-0.534-3.23 c-0.851-0.852-2.15-1.064-3.23-0.534c-4.918,2.427-9.375,5.619-13.246,9.491c-9.447,9.447-14.65,22.008-14.65,35.369 c0,13.36,5.203,25.921,14.65,35.368s22.008,14.65,35.368,14.65c13.361,0,25.921-5.203,35.369-14.65 c3.872-3.871,7.064-8.328,9.491-13.246C97.826,68.608,97.611,67.309,96.76,66.458z"></path>
44-
</svg>
45-
</label>
46-
</div>
12+
<button class={classNames(displayClass, "darkmode")} id="darkmode">
13+
<svg
14+
xmlns="http://www.w3.org/2000/svg"
15+
xmlnsXlink="http://www.w3.org/1999/xlink"
16+
version="1.1"
17+
id="dayIcon"
18+
x="0px"
19+
y="0px"
20+
viewBox="0 0 35 35"
21+
style="enable-background:new 0 0 35 35"
22+
xmlSpace="preserve"
23+
aria-label={i18n(cfg.locale).components.themeToggle.darkMode}
24+
>
25+
<title>{i18n(cfg.locale).components.themeToggle.darkMode}</title>
26+
<path d="M6,17.5C6,16.672,5.328,16,4.5,16h-3C0.672,16,0,16.672,0,17.5 S0.672,19,1.5,19h3C5.328,19,6,18.328,6,17.5z M7.5,26c-0.414,0-0.789,0.168-1.061,0.439l-2,2C4.168,28.711,4,29.086,4,29.5 C4,30.328,4.671,31,5.5,31c0.414,0,0.789-0.168,1.06-0.44l2-2C8.832,28.289,9,27.914,9,27.5C9,26.672,8.329,26,7.5,26z M17.5,6 C18.329,6,19,5.328,19,4.5v-3C19,0.672,18.329,0,17.5,0S16,0.672,16,1.5v3C16,5.328,16.671,6,17.5,6z M27.5,9 c0.414,0,0.789-0.168,1.06-0.439l2-2C30.832,6.289,31,5.914,31,5.5C31,4.672,30.329,4,29.5,4c-0.414,0-0.789,0.168-1.061,0.44 l-2,2C26.168,6.711,26,7.086,26,7.5C26,8.328,26.671,9,27.5,9z M6.439,8.561C6.711,8.832,7.086,9,7.5,9C8.328,9,9,8.328,9,7.5 c0-0.414-0.168-0.789-0.439-1.061l-2-2C6.289,4.168,5.914,4,5.5,4C4.672,4,4,4.672,4,5.5c0,0.414,0.168,0.789,0.439,1.06 L6.439,8.561z M33.5,16h-3c-0.828,0-1.5,0.672-1.5,1.5s0.672,1.5,1.5,1.5h3c0.828,0,1.5-0.672,1.5-1.5S34.328,16,33.5,16z M28.561,26.439C28.289,26.168,27.914,26,27.5,26c-0.828,0-1.5,0.672-1.5,1.5c0,0.414,0.168,0.789,0.439,1.06l2,2 C28.711,30.832,29.086,31,29.5,31c0.828,0,1.5-0.672,1.5-1.5c0-0.414-0.168-0.789-0.439-1.061L28.561,26.439z M17.5,29 c-0.829,0-1.5,0.672-1.5,1.5v3c0,0.828,0.671,1.5,1.5,1.5s1.5-0.672,1.5-1.5v-3C19,29.672,18.329,29,17.5,29z M17.5,7 C11.71,7,7,11.71,7,17.5S11.71,28,17.5,28S28,23.29,28,17.5S23.29,7,17.5,7z M17.5,25c-4.136,0-7.5-3.364-7.5-7.5 c0-4.136,3.364-7.5,7.5-7.5c4.136,0,7.5,3.364,7.5,7.5C25,21.636,21.636,25,17.5,25z"></path>
27+
</svg>
28+
<svg
29+
xmlns="http://www.w3.org/2000/svg"
30+
xmlnsXlink="http://www.w3.org/1999/xlink"
31+
version="1.1"
32+
id="nightIcon"
33+
x="0px"
34+
y="0px"
35+
viewBox="0 0 100 100"
36+
style="enable-background:new 0 0 100 100"
37+
xmlSpace="preserve"
38+
aria-label={i18n(cfg.locale).components.themeToggle.lightMode}
39+
>
40+
<title>{i18n(cfg.locale).components.themeToggle.lightMode}</title>
41+
<path d="M96.76,66.458c-0.853-0.852-2.15-1.064-3.23-0.534c-6.063,2.991-12.858,4.571-19.655,4.571 C62.022,70.495,50.88,65.88,42.5,57.5C29.043,44.043,25.658,23.536,34.076,6.47c0.532-1.08,0.318-2.379-0.534-3.23 c-0.851-0.852-2.15-1.064-3.23-0.534c-4.918,2.427-9.375,5.619-13.246,9.491c-9.447,9.447-14.65,22.008-14.65,35.369 c0,13.36,5.203,25.921,14.65,35.368s22.008,14.65,35.368,14.65c13.361,0,25.921-5.203,35.369-14.65 c3.872-3.871,7.064-8.328,9.491-13.246C97.826,68.608,97.611,67.309,96.76,66.458z"></path>
42+
</svg>
43+
</button>
4744
)
4845
}
4946

quartz/components/Graph.tsx

+26-25
Original file line numberDiff line numberDiff line change
@@ -65,31 +65,32 @@ export default ((opts?: GraphOptions) => {
6565
<h3>{i18n(cfg.locale).components.graph.title}</h3>
6666
<div class="graph-outer">
6767
<div id="graph-container" data-cfg={JSON.stringify(localGraph)}></div>
68-
<svg
69-
version="1.1"
70-
id="global-graph-icon"
71-
xmlns="http://www.w3.org/2000/svg"
72-
xmlnsXlink="http://www.w3.org/1999/xlink"
73-
x="0px"
74-
y="0px"
75-
viewBox="0 0 55 55"
76-
fill="currentColor"
77-
xmlSpace="preserve"
78-
>
79-
<path
80-
d="M49,0c-3.309,0-6,2.691-6,6c0,1.035,0.263,2.009,0.726,2.86l-9.829,9.829C32.542,17.634,30.846,17,29,17
81-
s-3.542,0.634-4.898,1.688l-7.669-7.669C16.785,10.424,17,9.74,17,9c0-2.206-1.794-4-4-4S9,6.794,9,9s1.794,4,4,4
82-
c0.74,0,1.424-0.215,2.019-0.567l7.669,7.669C21.634,21.458,21,23.154,21,25s0.634,3.542,1.688,4.897L10.024,42.562
83-
C8.958,41.595,7.549,41,6,41c-3.309,0-6,2.691-6,6s2.691,6,6,6s6-2.691,6-6c0-1.035-0.263-2.009-0.726-2.86l12.829-12.829
84-
c1.106,0.86,2.44,1.436,3.898,1.619v10.16c-2.833,0.478-5,2.942-5,5.91c0,3.309,2.691,6,6,6s6-2.691,6-6c0-2.967-2.167-5.431-5-5.91
85-
v-10.16c1.458-0.183,2.792-0.759,3.898-1.619l7.669,7.669C41.215,39.576,41,40.26,41,41c0,2.206,1.794,4,4,4s4-1.794,4-4
86-
s-1.794-4-4-4c-0.74,0-1.424,0.215-2.019,0.567l-7.669-7.669C36.366,28.542,37,26.846,37,25s-0.634-3.542-1.688-4.897l9.665-9.665
87-
C46.042,11.405,47.451,12,49,12c3.309,0,6-2.691,6-6S52.309,0,49,0z M11,9c0-1.103,0.897-2,2-2s2,0.897,2,2s-0.897,2-2,2
88-
S11,10.103,11,9z M6,51c-2.206,0-4-1.794-4-4s1.794-4,4-4s4,1.794,4,4S8.206,51,6,51z M33,49c0,2.206-1.794,4-4,4s-4-1.794-4-4
89-
s1.794-4,4-4S33,46.794,33,49z M29,31c-3.309,0-6-2.691-6-6s2.691-6,6-6s6,2.691,6,6S32.309,31,29,31z M47,41c0,1.103-0.897,2-2,2
90-
s-2-0.897-2-2s0.897-2,2-2S47,39.897,47,41z M49,10c-2.206,0-4-1.794-4-4s1.794-4,4-4s4,1.794,4,4S51.206,10,49,10z"
91-
/>
92-
</svg>
68+
<button id="global-graph-icon" aria-label="Global Graph">
69+
<svg
70+
version="1.1"
71+
xmlns="http://www.w3.org/2000/svg"
72+
xmlnsXlink="http://www.w3.org/1999/xlink"
73+
x="0px"
74+
y="0px"
75+
viewBox="0 0 55 55"
76+
fill="currentColor"
77+
xmlSpace="preserve"
78+
>
79+
<path
80+
d="M49,0c-3.309,0-6,2.691-6,6c0,1.035,0.263,2.009,0.726,2.86l-9.829,9.829C32.542,17.634,30.846,17,29,17
81+
s-3.542,0.634-4.898,1.688l-7.669-7.669C16.785,10.424,17,9.74,17,9c0-2.206-1.794-4-4-4S9,6.794,9,9s1.794,4,4,4
82+
c0.74,0,1.424-0.215,2.019-0.567l7.669,7.669C21.634,21.458,21,23.154,21,25s0.634,3.542,1.688,4.897L10.024,42.562
83+
C8.958,41.595,7.549,41,6,41c-3.309,0-6,2.691-6,6s2.691,6,6,6s6-2.691,6-6c0-1.035-0.263-2.009-0.726-2.86l12.829-12.829
84+
c1.106,0.86,2.44,1.436,3.898,1.619v10.16c-2.833,0.478-5,2.942-5,5.91c0,3.309,2.691,6,6,6s6-2.691,6-6c0-2.967-2.167-5.431-5-5.91
85+
v-10.16c1.458-0.183,2.792-0.759,3.898-1.619l7.669,7.669C41.215,39.576,41,40.26,41,41c0,2.206,1.794,4,4,4s4-1.794,4-4
86+
s-1.794-4-4-4c-0.74,0-1.424,0.215-2.019,0.567l-7.669-7.669C36.366,28.542,37,26.846,37,25s-0.634-3.542-1.688-4.897l9.665-9.665
87+
C46.042,11.405,47.451,12,49,12c3.309,0,6-2.691,6-6S52.309,0,49,0z M11,9c0-1.103,0.897-2,2-2s2,0.897,2,2s-0.897,2-2,2
88+
S11,10.103,11,9z M6,51c-2.206,0-4-1.794-4-4s1.794-4,4-4s4,1.794,4,4S8.206,51,6,51z M33,49c0,2.206-1.794,4-4,4s-4-1.794-4-4
89+
s1.794-4,4-4S33,46.794,33,49z M29,31c-3.309,0-6-2.691-6-6s2.691-6,6-6s6,2.691,6,6S32.309,31,29,31z M47,41c0,1.103-0.897,2-2,2
90+
s-2-0.897-2-2s0.897-2,2-2S47,39.897,47,41z M49,10c-2.206,0-4-1.794-4-4s1.794-4,4-4s4,1.794,4,4S51.206,10,49,10z"
91+
/>
92+
</svg>
93+
</button>
9394
</div>
9495
<div id="global-graph-outer">
9596
<div id="global-graph-container" data-cfg={JSON.stringify(globalGraph)}></div>

quartz/components/PageList.tsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,13 @@ export const PageList: QuartzComponent = ({ cfg, fileData, allFiles, limit, sort
5858
return (
5959
<li class="section-li">
6060
<div class="section">
61-
<p></p>
61+
<div>
62+
{page.dates && (
63+
<p class="meta">
64+
<Date date={getDate(cfg, page)!} locale={cfg.locale} />
65+
</p>
66+
)}
67+
</div>
6268
<div class="desc">
6369
<h3>
6470
<a href={resolveRelative(fileData.slug!, page.slug!)} class="internal">

quartz/components/TableOfContents.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const TableOfContents: QuartzComponent = ({
4949
<polyline points="6 9 12 15 18 9"></polyline>
5050
</svg>
5151
</button>
52-
<div id="toc-content">
52+
<div id="toc-content" class={fileData.collapseToc ? "collapsed" : ""}>
5353
<ul class="overflow">
5454
{fileData.toc.map((tocEntry) => (
5555
<li key={tocEntry.slug} class={`depth-${tocEntry.depth}`}>

quartz/components/scripts/darkmode.inline.ts

+5-8
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ const emitThemeChangeEvent = (theme: "light" | "dark") => {
1111

1212
document.addEventListener("nav", () => {
1313
const switchTheme = (e: Event) => {
14-
const newTheme = (e.target as HTMLInputElement)?.checked ? "dark" : "light"
14+
const newTheme =
15+
document.documentElement.getAttribute("saved-theme") === "dark" ? "light" : "dark"
1516
document.documentElement.setAttribute("saved-theme", newTheme)
1617
localStorage.setItem("theme", newTheme)
1718
emitThemeChangeEvent(newTheme)
@@ -21,17 +22,13 @@ document.addEventListener("nav", () => {
2122
const newTheme = e.matches ? "dark" : "light"
2223
document.documentElement.setAttribute("saved-theme", newTheme)
2324
localStorage.setItem("theme", newTheme)
24-
toggleSwitch.checked = e.matches
2525
emitThemeChangeEvent(newTheme)
2626
}
2727

2828
// Darkmode toggle
29-
const toggleSwitch = document.querySelector("#darkmode-toggle") as HTMLInputElement
30-
toggleSwitch.addEventListener("change", switchTheme)
31-
window.addCleanup(() => toggleSwitch.removeEventListener("change", switchTheme))
32-
if (currentTheme === "dark") {
33-
toggleSwitch.checked = true
34-
}
29+
const themeButton = document.querySelector("#darkmode") as HTMLButtonElement
30+
themeButton.addEventListener("click", switchTheme)
31+
window.addCleanup(() => themeButton.removeEventListener("click", switchTheme))
3532

3633
// Listen for changes in prefers-color-scheme
3734
const colorSchemeMediaQuery = window.matchMedia("(prefers-color-scheme: dark)")

0 commit comments

Comments
 (0)