feat: Add CSS bundling with Lightning CSS for production optimization
- Add Lightning CSS integration for CSS bundling and minification - Create Makefile targets: css-dev, css-prod, css-watch, css-clean - Implement conditional CSS loading based on GO_ENV (dev=modular, prod=bundled) - Add IsProduction template variable for environment-aware rendering - Keep print.css separate with media="print" for PDF export - Add static/dist/ to .gitignore (generated bundles) - Fix Go template syntax in _cv-header.css - Remove redundant font @import in _typography.css Performance gains: - 27 HTTP requests → 1 (96% reduction) - 188KB → 86KB CSS (54% reduction) - ~15KB gzip network transfer Documentation: - Update 12-CSS-ARCHITECTURE.md with bundling section - Add Phase 9 to 2-MODERN-WEB-TECHNIQUES.md - Add css-bundling.test.mjs Playwright test (8/8 pass)
This commit is contained in:
@@ -109,8 +109,12 @@
|
||||
<!-- Using unpkg CDN (more reliable than code.iconify.design) -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/iconify-icon@2.1.0/dist/iconify-icon.min.js"></script>
|
||||
|
||||
<!-- CSS - Modular structure with native @import -->
|
||||
<!-- CSS - Conditional loading: bundled in production, modular in development -->
|
||||
{{if .IsProduction}}
|
||||
<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">
|
||||
|
||||
|
||||
Reference in New Issue
Block a user