Commit Graph

93 Commits

Author SHA1 Message Date
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
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
Nuno Coração
2ffe55a86a fix https://github.com/nunocoracao/blowfish/issues/1563 2024-06-27 23:05:51 +01:00
Nuno Coração
9c5b68fb22 fix https://github.com/nunocoracao/blowfish/issues/1521 2024-06-08 12:20:26 +01:00
Nuno Coração
6190898b70 fixed view like counters to work across multiple langs 2024-03-20 16:05:48 +00:00
Nuno Coração
93ef687194 too big too describe 2024-03-14 00:01:32 +00:00
Nuno Coração
e92c30b7a3 🐛 Clicking on a External URL page from search results does not navigate to external page 2024-03-10 10:31:37 +00:00
Nuno Coração
f0f6afa555 Revert "Gallery: Switch Packery to MagicGrid " 2024-03-09 14:28:04 +00:00
Nuno Coração
f93ac47d88 Merge branch 'dev' into gallery-magic-grid 2024-03-09 14:23:45 +00:00
Alex Haslam
5a11829222 Add mermaid back in package.json 2024-03-07 20:32:21 +00:00
StandingPad Animations
85fe1addbc Fixed debug variable 2024-03-06 20:28:59 -06:00
StandingPad Animations
f1d582ff98 Swapped out Packery for MagicGrid
This switches the Gallery shortcode to use MagicGrid instead of Packery.
The main benefit is size (2.7k as opposed to 32k), and the results are
mostly similar minus a few differences in image position.
2024-03-06 20:12:28 -06:00