From 499adf4a4ea52e743f1c27c8439545faa90928d0 Mon Sep 17 00:00:00 2001 From: Emile Bangma Date: Tue, 3 Jun 2025 19:51:38 +0200 Subject: [PATCH 1/4] fix(ios): mobile explorer overscroll behavior (#2008) --- quartz/components/styles/explorer.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quartz/components/styles/explorer.scss b/quartz/components/styles/explorer.scss index 002b086a7..8d9410044 100644 --- a/quartz/components/styles/explorer.scss +++ b/quartz/components/styles/explorer.scss @@ -239,7 +239,7 @@ li:has(> .folder-outer:not(.open)) > .folder-container > svg { margin-top: 0; background-color: var(--light); max-width: 100vw; - width: 100%; + width: 100vw; transform: translateX(-100vw); transition: transform 200ms ease, @@ -265,6 +265,6 @@ li:has(> .folder-outer:not(.open)) > .folder-container > svg { .mobile-no-scroll { @media all and ($mobile) { - overflow: hidden; + overscroll-behavior: none; } } From ae0466eedb1a560e3d330899af6b563f1eeb029a Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Tue, 3 Jun 2025 10:57:07 -0700 Subject: [PATCH 2/4] css: unapply redundant bg on section --- quartz/styles/base.scss | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/quartz/styles/base.scss b/quartz/styles/base.scss index 820b9ab40..b7037fa1c 100644 --- a/quartz/styles/base.scss +++ b/quartz/styles/base.scss @@ -11,8 +11,7 @@ html { width: 100vw; } -body, -section { +body { margin: 0; box-sizing: border-box; background-color: var(--light); From 9de370ae14584ca5301440019190da1854f80c26 Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Wed, 4 Jun 2025 15:00:41 -0700 Subject: [PATCH 3/4] watcher: manually ignore .git changes --- quartz/build.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/quartz/build.ts b/quartz/build.ts index 9e657b657..9fff1b6b8 100644 --- a/quartz/build.ts +++ b/quartz/build.ts @@ -125,9 +125,10 @@ async function startWatching( ctx, mut, contentMap, - ignored: (path) => { - if (gitIgnoredMatcher(path)) return true - const pathStr = path.toString() + ignored: (fp) => { + const pathStr = toPosixPath(fp.toString()) + if (pathStr.startsWith(".git/")) return true + if (gitIgnoredMatcher(pathStr)) return true for (const pattern of cfg.configuration.ignorePatterns) { if (minimatch(pathStr, pattern)) { return true From cdd0be2aa8c6e0a6d97779f3db3072952b54bf13 Mon Sep 17 00:00:00 2001 From: Jiangnan Li Date: Sun, 8 Jun 2025 17:23:01 +0800 Subject: [PATCH 4/4] feat(giscus): expose language option for Comments component (#2012) * add language support for Comment * docs: let users know they can customize their language preference --- docs/features/comments.md | 6 ++++++ quartz/components/Comments.tsx | 2 ++ quartz/components/scripts/comments.inline.ts | 3 ++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/features/comments.md b/docs/features/comments.md index 48037735a..6e5a25ca1 100644 --- a/docs/features/comments.md +++ b/docs/features/comments.md @@ -45,6 +45,8 @@ afterBody: [ category: 'Announcements', // from data-category-id categoryId: 'DIC_kwDOFxRnmM4B-Xg6', + // from data-lang + lang: 'en' } }), ], @@ -90,6 +92,10 @@ type Options = { // where to put the comment input box relative to the comments // defaults to 'bottom' inputPosition?: "top" | "bottom" + + // set your preference language here + // defaults to 'en' + lang?: string } } ``` diff --git a/quartz/components/Comments.tsx b/quartz/components/Comments.tsx index 0bfd82d2d..a7315214f 100644 --- a/quartz/components/Comments.tsx +++ b/quartz/components/Comments.tsx @@ -17,6 +17,7 @@ type Options = { strict?: boolean reactionsEnabled?: boolean inputPosition?: "top" | "bottom" + lang?: string } } @@ -50,6 +51,7 @@ export default ((opts: Options) => { data-theme-url={ opts.options.themeUrl ?? `https://${cfg.baseUrl ?? "example.com"}/static/giscus` } + data-lang={opts.options.lang ?? "en"} > ) } diff --git a/quartz/components/scripts/comments.inline.ts b/quartz/components/scripts/comments.inline.ts index c54230fbe..2b876bf6b 100644 --- a/quartz/components/scripts/comments.inline.ts +++ b/quartz/components/scripts/comments.inline.ts @@ -55,6 +55,7 @@ type GiscusElement = Omit & { strict: string reactionsEnabled: string inputPosition: "top" | "bottom" + lang: string } } @@ -78,7 +79,7 @@ document.addEventListener("nav", () => { giscusScript.setAttribute("data-strict", giscusContainer.dataset.strict) giscusScript.setAttribute("data-reactions-enabled", giscusContainer.dataset.reactionsEnabled) giscusScript.setAttribute("data-input-position", giscusContainer.dataset.inputPosition) - + giscusScript.setAttribute("data-lang", giscusContainer.dataset.lang) const theme = document.documentElement.getAttribute("saved-theme") if (theme) { giscusScript.setAttribute("data-theme", getThemeUrl(getThemeName(theme)))