Commit Graph

103 Commits

Author SHA1 Message Date
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
ZhenShuo Leo
352130c6a8 feat: add zen mode toggle into a11y panel 2025-07-23 04:00:56 +08:00
ZhenShuo Leo
b9bb959a48 fix(a11y): preserve user CSS font-size when a11y panel not configured
- Add "default" option to font size selector to respect user's original CSS
- Clear localStorage font setting when "default" is selected
- This prevent overriding user's custom font-size declarations on first load
2025-07-23 03:57:47 +08:00
ZhenShuo Leo
4351bb10fb refactor: remove onclick in a11y 2025-07-22 01:47:20 +08:00
ZhenShuo Leo
26637ee585 refactor: decoupling a11y and blur 2025-07-22 00:43:14 +08:00
ZhenShuo Leo
9f07989148 fix: a11y id confict between desktop and mobile 2025-07-22 00:09:57 +08:00
ZhenShuo Leo
5b376cc116 feat: add a11y panel 2025-07-21 23:58:48 +08:00
ZhenShuo Leo
dc778836f1 feat: hide image in a11y mode 2025-07-21 17:18:18 +08:00
ZhenShuo Leo
edbace7be0 feat: support a11y disable blur 2025-07-21 17:18:18 +08:00
Nuno C.
037c741ded Merge pull request #2262 from ZhenShuo2021/refactor/repo-card
♻️ Refactor(repo-card): reduce coupling and indention
2025-07-10 11:37:27 +01:00
Nuno C.
8d940881a4 Merge pull request #2278 from servedsmart/refactor-background-blur
♻️ Refactor: Use IIFE for background-blur and simplify code
2025-07-09 15:45:55 +01:00
Nuno C.
0f83712a3d Merge pull request #2253 from servedsmart/move-some-inline-event-handlers-out-of-line
♻️ Refactor: Move 2 inline event handlers out of line
2025-07-09 15:42:33 +01:00
Served Smart
a34947a630 ♻️ Refactor: Move 2 inline event handlers out of line
If MDN explicitly warns user not to use them, we probably shouldn't.

MDN also states: "Note that inline event handlers are blocked as well[...]You should replace them with addEventListener calls[...]" regarding CSP.
2025-06-27 19:23:55 +02:00
Served Smart
1e9458802a ♻️ Refactor: Use IIFE for background-blur and simplify code
This improves readability and removes an unnecessary function declaration by using IIFE.

This is inspired by https://github.com/nunocoracao/blowfish/pull/2262 . If both are merged, this would enhance consistency
2025-06-27 19:19:28 +02:00
Nuno Coração
8c42d127ff fix: improve scripts and js 2025-06-20 23:24:40 +01:00
ZhenShuo Leo
d39a64afe1 refactor(repo-card): use iife and async loading 2025-06-20 22:15:27 +08:00
ZhenShuo Leo
91fe08d205 refactor(repo-card): reduce coupling and indention 2025-06-20 22:14:46 +08:00
Nuno Coração
f2e224a042 pretty run 2025-06-17 23:17:26 +01:00
Nuno Coração
485b641756 Merge pull request #2226 from servedsmart/check-null-mobilemenu
🐛 Fix: null error when no [[menu]] block is defined
2025-06-17 23:07:37 +01:00
Served Smart
cee01113cd 🐛 Fix: null error when no [[menu]] block is defined
- This fixes https://github.com/nunocoracao/blowfish/issues/2117
- Additionally this also removes unnecessary parameters in used functions
2025-06-16 19:59:48 +02:00
Served Smart
9cb0db3e08 🎨 structure: Use more explicit naming in setBackgroundBlur() 2025-06-12 13:58:59 +02:00
Served Smart
4ff3d07d30 🎨 structure: Use more explicit naming in fetchRepo() 2025-06-12 13:58:59 +02:00
Served Smart
37ab1055e7 ♻️ refactor: Move similar javascript inline code out of line
- Move variables oid, oid_likes out of line
- Move background-blur out of line
- Move fetch-repo code out of line
2025-06-12 13:58:59 +02:00
Nuno Coração
b7478e4bad Merge pull request #2129 from ZhenShuo2021/fix/zen-mode
🐛 fix: footer not included in zen-mode toggle
2025-05-27 00:21:11 +01:00
ZhenShuo Leo
c705186e41 🐛 fix: footer not expand in zen-mode 2025-05-11 18:11:24 +08:00
ZhenShuo Leo
e169dfa5ec Fix: disable the search keyboard shortcut in a form (#2041) 2025-05-06 17:32:04 +08:00
ZhenShuo Leo
059d22ca96 🐛 fix: Preserve Mermaid indentation disrupted by Hugo minify (#2069)
Add a pre tag to the Mermaid class to preserve indentation and ensure data retrieval on DOMContentLoaded
2025-04-22 05:53:15 +08:00
Nuno Coração
25386511f5 Merge pull request #1902 from morethan987/dev
support the day/night mod change for SVG logo
2025-01-10 23:09:20 +00:00
morethan987
4a0b135331 support the day/night mod change for SVG logo
Relevant issue: #1900
I add some code to support the day/night mod change for SVG logo.
It's based on the issue: #676
2025-01-04 11:33:23 +08:00
ZhenShuo2021
6d20417fd5 fix: expand article title in zen mode 2024-12-02 22:30:52 +08:00
Nuno Coração
a21d70697f final polish and bug fixes 2024-11-08 18:03:19 +00:00
Nuno Coração
8e9e5d0f33 fixed issue with previous release 2024-09-04 00:10:11 +01:00
Nuno Coração
de1fa4a58d fix https://github.com/nunocoracao/blowfish/issues/1695 2024-09-03 23:40:54 +01:00
Jinbo Pan
dcde4feef3 Do not prevent default for Enter
Do not prevent default for "Enter" if search is not visible. Old logic would prevent comment system adding new line using "Enter"
2024-08-15 17:17:07 -07:00