Commit Graph

6 Commits

Author SHA1 Message Date
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
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
87586e58ae chore(huggingface): fix typo 2025-08-03 06:41:12 +08:00
ZhenShuo Leo
3ee9ed824f feat: add huggingface shortcode (#2376) 2025-07-29 04:52:21 +08:00