perf: Always use bundled CSS (28+ files → 1 file)

- Update head-styles.html to always load bundle.min.css
- Remove development/production conditional CSS loading
- Add CSS auto-rebuild to pre-commit hook
- Track bundle.min.css in git (unignore it)
- Reduces initial CSS requests from 28+ to 1
This commit is contained in:
juanatsap
2025-12-02 09:23:32 +00:00
parent db642c7cc2
commit fbcc5f8f5b
3 changed files with 6 additions and 6 deletions
+3 -1
View File
@@ -34,7 +34,9 @@ static/psd
static/psd/yo DNI.psd
# CSS build output (generated by Lightning CSS)
static/dist/
# We track bundle.min.css for production but ignore dev bundle
static/dist/bundle.css
!static/dist/bundle.min.css
# Temporary implementation artifacts (prevent clutter)
*_SUMMARY.md
+1
View File
File diff suppressed because one or more lines are too long
+2 -5
View File
@@ -1,10 +1,7 @@
{{define "head-styles"}}
<!-- CSS - Conditional loading: bundled in production, modular in development -->
{{if .IsProduction}}
<!-- CSS - Always use bundled CSS (built via 'make css-prod') -->
<!-- Individual CSS files are merged into one bundle to reduce HTTP requests -->
<link rel="stylesheet" href="/static/dist/bundle.min.css">
{{else}}
<link rel="stylesheet" href="/static/css/main.css">
{{end}}
<!-- Print styles - loaded separately, only applied when printing -->
<link rel="stylesheet" href="/static/css/print.css" media="print">
{{end}}