Commit Graph

179 Commits

Author SHA1 Message Date
Nuno C. a1509e9064 Merge pull request #2566 from ZhenShuo2021/fix/keyword
🐛 Fix(keyword): trim empty spaces
2025-11-03 22:16:10 +00:00
ZhenShuo Leo 1e99e63084 fix(keyword): trim empty spaces 2025-10-17 18:35:26 +08:00
ZhenShuo Leo 884d84363e Revert "perf(repo-card): only generate used CSS class"
This reverts commit af221fbf3b.

fix language dot colors in repo-card not displaying

This occurs because head.html is rendered before the page content,
making .Page.Store unavailable at that point in the template
execution order.

This issue doesn't appear in local development because page refreshes
trigger full re-renders, allowing the Store values to be properly
populated from shortcodes.

Alternative solutions considered:

1. templates.Defer: too complex and unreliable
2. Moving CSS to footer: confusing and delayed load
3. Inline styles: incurs CSP issue

Final I choose pre-generate CSS for all languages. After zstd
compression, the CSS file is only 8KB and benefits from browser
caching across all pages.
2025-10-17 14:38:24 +08:00
Nuno C. 01dafef575 Merge pull request #2533 from ZhenShuo2021/feat/mermaid-dark
 Feat(mermaid): support dark mode
2025-10-14 10:08:26 +01:00
Nuno C. 7f4e044464 Merge pull request #2532 from ZhenShuo2021/fix/render-image
🐛 Fix(render-image): correct srcset and HTML structure
2025-10-14 10:07:52 +01:00
ZhenShuo Leo 925065a5bd feat(mermaid): support dark mode 2025-10-11 15:24:21 +08:00
ZhenShuo Leo 8bfa9926c7 fix(render-image): improper srcset usage
- correct srcset image w descriptor value
- use compressed image for src fallback
2025-10-11 15:07:20 +08:00
Ted 45c084afa0 Update carousel.html to support arbitrary aspect ratios 2025-09-28 09:29:30 -05:00
ZhenShuo Leo e1f59b6108 fix(carousel): prevent generating duplicate CSS files
use inline CSS to avoid extra workarounds
2025-09-20 01:09:15 +08:00
Nuno C. 488be56b5f Merge pull request #2466 from ZhenShuo2021/feat/repo-card-csp
 Feat(repo-card): remove inline style
2025-09-15 23:08:42 +01:00
Nuno C. 53eff2b690 Merge pull request #2465 from ZhenShuo2021/feat/timeline-md
 Feat(timeline): support markdown content
2025-09-15 23:08:24 +01:00
Nuno C. 64aed3c6e7 Merge pull request #2403 from ZhenShuo2021/fix/figure-link-area
🐛 Fix(figure): limit link hover area to image only
2025-09-15 23:03:33 +01:00
Nuno C. ecd990b5e5 Merge pull request #2397 from ZhenShuo2021/chore/prune-tailwind-classes
🔧 Chore: prune unused Tailwind classes
2025-09-15 23:02:30 +01:00
ZhenShuo Leo e355715a3b feat(timeline): support markdown content 2025-09-12 20:25:35 +08:00
ZhenShuo Leo af221fbf3b perf(repo-card): only generate used CSS class 2025-09-12 11:13:23 +08:00
ZhenShuo Leo f94f60aef6 perf(repo-card): load CSS once globally instead of per card 2025-09-12 10:31:28 +08:00
ZhenShuo Leo 2ff90348e7 feat(repo-card): fix inline style CSP issue 2025-09-10 07:27:47 +08:00
ZhenShuo Leo 4bb67ca1ca chore: remove text-white 2025-08-22 04:03:22 +08:00
ZhenShuo Leo 3150fb6631 fix(rtl): timeline shortcode broken on rtl site 2025-08-22 03:34:02 +08:00
ZhenShuo Leo 41f6b37e56 refactor(tailwind): use logical properties for language direction 2025-08-22 03:34:02 +08:00
ZhenShuo Leo 571b875f4a fix(figure): limit link hover area to image only 2025-08-03 19:17:12 +08:00
Nuno C. e87d4f59bb Merge pull request #2398 from ZhenShuo2021/fix/repo-card-dollar
🐛 Fix(repo-card): add missing dollar sign
2025-08-03 01:49:16 +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
Nuno C. 73119cddbe Merge pull request #2374 from ZhenShuo2021/fix/carousel-transition
🐛 Fix(carousel): transition time not controlled by interval
2025-08-03 01:41:10 +01:00
Nuno C. 12de0ffd88 Merge pull request #2373 from ZhenShuo2021/fix/carousel-interval
🐛 Fix(carousel): interval not working
2025-08-03 01:40:33 +01:00
ZhenShuo Leo 87586e58ae chore(huggingface): fix typo 2025-08-03 06:41:12 +08:00
ZhenShuo Leo 96d164265f fix(repo-card): add missing dollar sign 2025-08-03 05:49:41 +08:00
ZhenShuo Leo 3ee9ed824f feat: add huggingface shortcode (#2376) 2025-07-29 04:52:21 +08:00
ZhenShuo Leo b3c70cedf7 chore(carosel): prevent style tag in HTML
this approach does not need to change the assets or the vendor file

and the live reload is also supported
2025-07-27 01:23:24 +08:00
ZhenShuo Leo aec737ff16 fix(carousel): make interval affect slide transition on click 2025-07-27 00:37:40 +08:00
ZhenShuo Leo ccf5e24f55 fix(carousel): interval not working 2025-07-27 00:35:31 +08:00
ZhenShuo Leo 54a643d703 fix(icon): trim white spaces 2025-07-25 05:12:51 +08:00
Nuno C. 4285a740fa Merge pull request #2332 from ZhenShuo2021/fix/repo-color
🐛 Fix: repo card language color is missed
2025-07-21 10:05:23 +01:00
Nuno C. 01622ede5a Merge pull request #2324 from ZhenShuo2021/fix/gist-corb
🐛 Fix: gist CORB error
2025-07-21 10:03:52 +01:00
ZhenShuo Leo 5009fffcf4 fix(repo-card): manually revert to the version in 2.87.0
The md5 method has severe performance degradation
It is approximately 2x slower without cache and 5x slower with cache

Reverted due to lack of a better option
2025-07-18 00:46:14 +08:00
Nuno C. ab9f0b6af8 Merge branch 'dev' into chore/try-repo-card 2025-07-17 16:44:15 +01:00
Nuno C. a679625472 Merge pull request #2331 from ZhenShuo2021/chore/error-msg
🔧 Chore: add warn message for GetRemote usage in shortcodes
2025-07-17 16:42:52 +01:00
ZhenShuo Leo ecf6d1d53f chore(repo-card): add try statement at GetRemote 2025-07-17 23:09:00 +08:00
ZhenShuo Leo 237c90afa9 chore(github.html): move div into with syntax 2025-07-13 20:08:32 +08:00
ZhenShuo Leo d8bdf7e316 chore: add warn message for GetRemote usage in shortcodes 2025-07-13 19:56:39 +08:00
ZhenShuo Leo 965c241f8c feat: add support for compactSummary option in article shortcode 2025-07-13 18:44:45 +08:00
ZhenShuo Leo b4a7741b39 feat: add support for showSummary in article shortcode 2025-07-13 18:44:45 +08:00
ZhenShuo Leo fed64fa58d fix: gist corb error 2025-07-11 18:51:34 +08:00
Nuno C. 6d94d1d62c Merge pull request #2269 from servedsmart/use-data-repo-colors-and-move-out-of-line
♻️ Refactor: Use universal json for repo shortcodes and move styles out of line
2025-07-10 11:37:41 +01: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
Served Smart 65a50ff643 Only generate css classes for used repo colors
This in most cases will reduce the size of main.bundle.css dramatically. Before I had around ~+32kB, now it is ~+228B
2025-07-09 19:19:10 +02:00
Served Smart cc2e90233a ♻️ Refactor: Use universal json and move styles out of line 2025-07-09 19:18:54 +02:00
Served Smart 17faf8b738 ♻️ Refactor: Autogen classes and use consistent naming
- This should greatly improve consistency
- This mainly targets one of my PRs https://github.com/nunocoracao/blowfish/pull/2211
2025-07-09 18:59:32 +02:00
ZhenShuo Leo 43857a5aa9 refactor(gallery): improve readibility
- remove unnecessary intermediate variable
- move the go process out of the div since they are not related
- use expressive variable names
- reorder declarations
2025-06-24 03:44:13 +08:00
ZhenShuo Leo d39a64afe1 refactor(repo-card): use iife and async loading 2025-06-20 22:15:27 +08:00