136 Commits
Author SHA1 Message Date
Yannick Tocquet 2e7c5bb91f 🐛 Guard event.key before toLowerCase in search keydown handler
The global keydown handler calls event.key.toLowerCase() without checking
that event.key is defined. Some keydown events carry no key property
(browser autofill, IME composition, some mobile virtual keyboards), which
throws TypeError: Cannot read properties of undefined (reading
'toLowerCase') and breaks the handler for that keystroke.

Add a truthiness guard before calling toLowerCase(), matching the style
already used for the other event.key comparisons in the same handler.
No behavior change for real Cmd/Ctrl+K presses.
2026-09-03 16:34:26 +01:00
ZhenShuo2021 8334f00562 fix: JS broken in v3 (#3061)
* fix: zoom broken in v3 (#3060)

* fix: buymeacoffee broken in v3
2026-08-21 02:17:22 +01:00
Metalhearf 5ef4024c40 🐛 Close the mobile dropdown menu when clicking outside it (#3059)
The dropdown panel only closed through its own X button. Escape already
dismissed it, so the missing pointer equivalent left the panel stuck open
over the page after a stray tap.

Close it on any click landing outside the panel and outside the labels that
toggle it. Both early returns are load-bearing. A label forwards a synthetic
click to its checkbox, so without skipping the input the menu closes in the
same gesture that opened it. And without skipping the opener, opening then
closing with the hamburger leaves the panel open, because this handler and
the label's default action cancel each other out.

The fullscreen panel needs no special case. It covers the viewport, so
every click lands inside it and the handler stays inert.
2026-08-19 23:43:37 +01:00
Nuno CoraçãoandClaude Fable 5 b05eff3b30 🐛 Fix i18n apostrophes in JS, schema author image, avatar crops
JSON-encode i18n strings injected into appearance.js (#3040), resolve
and publish the original author image for the JSON-LD schema (#3037),
and anchor avatar crops to Center so small and zoomed framings match
(#3016).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-17 20:19:02 +01:00
Nuno CoraçãoandClaude Fable 5 09f0573749 ✨ v3 theme: glass UI, landing layout, a11y, perf, print styles
Floating glass header with ⌘K search, landing homepage layout with
hero image and GitHub-stars CTA, background canvas with dissolving
heroes, burufugu colour scheme, movie-quote 404, taxonomy pills,
keyboard/ARIA accessibility across menus, search and tabs, idle-
loaded third-party scripts, and dedicated print styles.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-17 20:19:02 +01:00
Friday 53a64328d7 perf: make visual effects and heroes more resilient 2026-08-17 20:19:02 +01:00
Morten Victor Nordbye 1f82608cd6 Add reading progress bar for articles (#3014)
* Add reading progress bar for articles

* Let page-level showReadingProgress override the site setting

Hugo's default treats false as empty, so a page-level false could not
disable the bar once it was enabled site-wide. Resolve the value by
initialising from the site setting and overriding it only when the
front matter parameter is actually present, and use the same resolved
boolean in single.html and head.html.

* Guard the reading progress handler and mark the listener passive

The script loads in the head without defer, so the scroll listener is
registered before the progress bar element exists. A scroll event fired
during parsing, such as when the browser restores the scroll position on
reload, would throw. Bail out when the element is missing, matching the
guard in background-blur.js, and mark the scroll listener passive as
toc.html already does.
2026-08-16 22:14:45 +01:00
Nuno C. bacf607405 Merge pull request #2935 from aplgr/feature/client-language-redirect
✨ Add opt-in client-side language redirect
2026-07-02 12:46:49 +01:00
Nuno C. 3c0b3a5ebe Merge pull request #2945 from ilantz/fix-appearance-tooltips
♿️ Fix appearance switcher accessibility tooltips
2026-07-02 12:42:51 +01:00
ilantz 1d61651817 ♿️ Fix appearance switcher accessibility tooltips
Dynamically update the appearance switcher accessibility labels and tooltips using the native i18n variables so that the UI correctly reflects the user's localized language instead of hardcoded English strings.
2026-05-15 00:15:55 -07:00
André Plöger 598905a36b 🌐 Preserve locale subtags in language redirects 2026-05-10 11:14:37 -03:00
André Plöger 3a86a7656e ✨ Add opt-in client-side language redirect 2026-05-10 10:47:49 -03:00
Kamil Sijko db9fb58bca 🐛 fix: race condition in search query execution
When a user opens the search modal and starts typing immediately, executeQuery() is triggered. Since buildIndex() is asynchronous, the fuse variable might still be undefined when .search() is called. Added safety checks for fuse initialization.
2026-05-05 11:50:28 +02:00
Nuno C. d8416ee104 Revert "✨ Feat: logo alt and remove logo JS" 2026-03-11 14:16:49 +00:00
Nuno C. 20c6de4eb8 Merge pull request #2815 from ZhenShuo2021/email
✨ Feat: Email obfuscation
2026-03-11 00:49:20 +00:00
ZhenShuo Leo c74017c987 fix: auto detect mailto prefix 2026-02-26 13:35:29 +08:00
ZhenShuo Leo 55f2f22849 feat: email obfuscation (#2711) 2026-02-25 23:13:16 +08:00
ZhenShuo Leo 02a7397119 refactor: use css for logo switcher 2026-02-25 22:41:25 +08:00
Nuno C. e753c191c3 Merge pull request #2775 from ZhenShuo2021/firebase
✨ Feat: improve Firebase
2026-02-11 21:51:05 +00:00
ZhenShuo Leo 99d329c7b0 feat: reduce firebase blocking time
- use esm format
- defer loading with type="module"
- upgrade from v8.10.0 to v9.23.0
- allow homepage/taxonomy/term log
2026-02-10 06:52:05 +08:00
ZhenShuo Leo 0e9a151ce5 refactor: gather firebase templates 2026-02-07 21:48:53 +08:00
Eric Gusmao 39209dbab3 Remove jQuery dependency and update theme version to 2.97.0 2026-01-26 20:36:32 -03:00
ZhenShuo Leo dbb7d3f7f2 feat(tabs): support group 2026-01-04 19:29:38 +08:00
ZhenShuo Leo 8ab8807398 feat: better mobile menu 2025-12-27 17:32:00 +08:00
ZhenShuo Leo 81f2423d71 Merge branch 'dev' into feature/callout-tailwind 2025-12-23 01:21:40 +08:00
Nuno C. 4bab2b4e7e Merge pull request #2644 from NSStudent/hotfix/copy-safari-issue
Fix: Copy fallback for safari
2025-12-22 17:17:41 +00:00
Nuno C. b6c00249c6 Merge pull request #2656 from ZhenShuo2021/feat/codeblock-title
✨ Feat: support title in code block
2025-12-22 17:11:53 +00:00
rxchi1d 775d5b1bbf feat: add admonitions 2025-12-22 09:53:58 +08:00
ZhenShuo Leo 0e3bad2be7 feat(codeblock): add title support 2025-12-18 02:38:31 +08:00
NSStudent 8ba07f0d59 fix copy fallback for safari
Signed-off-by: NSStudent <omarmn83@gmail.com>
2025-12-08 21:12:14 +01:00
ZhenShuo Leo eda9fc9bc3 feat(tabs): better usage 2025-12-01 21:14:15 +08:00
ZhenShuo Leo 20044af981 feat: add tabs 2025-12-01 20:24:26 +08:00
ZhenShuo Leo 925065a5bd feat(mermaid): support dark mode 2025-10-11 15:24:21 +08:00
ZhenShuo Leo b777d4e59e fix(scroll-to-top): resolve overlap with buy me a coffee button 2025-09-23 17:57:58 +08:00
Nuno C. c14887e992 Merge pull request #2456 from ZhenShuo2021/fix/a11y
🐛 Fix(a11y): multiple a11y issues
2025-09-15 23:04:54 +01:00
Nuno C. e6cd7a9948 Merge pull request #2426 from ZhenShuo2021/fix/code-copy
🐛 Fix(code.js): filter line number on code copy
2025-09-15 23:03:55 +01:00
ZhenShuo Leo 0840169724 chore(code.js): add linenos comments 2025-08-21 06:00:26 +08:00
ZhenShuo Leo 9d0aecf41f refactor(code.js): simplify code
uses optional chaining
inlines short functions
2025-08-21 05:40:30 +08:00
ZhenShuo Leo 65637ec3f0 fix(code.js): filter line number on code copy 2025-08-16 20:58:06 +08:00
ZhenShuo Leo 4b9062f4c1 style(blur): rename data-target-id to data-blur-id 2025-08-05 18:36:25 +08:00
ZhenShuo Leo e78105429f fix(a11y): add underline links on article card 2025-08-05 18:36:24 +08:00
ZhenShuo Leo 344f7de0da fix(a11y): prevent disableImages FOUC 2025-08-05 18:23:16 +08:00
ZhenShuo Leo ade00547b3 fix(a11y): disableImages not working when layoutBackgroundBlur is false 2025-08-05 18:23:16 +08:00
ZhenShuo Leo 10ffbca4c0 refactor(a11y): simply code 2025-08-05 17:39:59 +08:00
ZhenShuo Leo 6a4123f59f fix(fetch-repo): prevent DOM updates with invalid remote data 2025-08-03 17:09:24 +08:00
Nuno C. cd1982264e Merge pull request #2379 from ZhenShuo2021/fix/forgejo-cors
🐛 Fix: forgejo CORS
2025-08-03 01:44:31 +01:00
Nuno C. a3dd43e992 Merge pull request #2378 from ZhenShuo2021/feat/huggingface-card
✨ Feat: add huggingface shortcode
2025-08-03 01:44:17 +01:00
ZhenShuo Leo 3ee9ed824f feat: add huggingface shortcode (#2376) 2025-07-29 04:52:21 +08:00
ZhenShuo Leo c3f6f901a5 fix: forgejo CORS 2025-07-29 04:46:55 +08:00
ZhenShuo Leo 7f4e4dab40 fix(a11y): prevent zen mode toggle requiring double-click
Add state comparison in applyZenMode to only toggle when
current state differs from desired state
2025-07-23 04:25:22 +08:00