Commit Graph

112 Commits

Author SHA1 Message Date
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
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