perf: self-host fonts and add /admin route

Self-hosted fonts:
- Download all 10 typefaces (35 font files, 728KB) from Google Fonts
- Create @font-face declarations in assets/css/fonts.css
- Remove Google Fonts external dependency from layouts
- Privacy improvement (no Google tracking)
- Performance improvement (no DNS lookup to fonts.googleapis.com)
- GDPR compliant (no third-party requests)

Admin access:
- Add /admin route that redirects to /admin/theme (requires auth)
- Remove Admin link from footer (too visible for visitors)
- Shop owners can bookmark or type /admin directly

Layout improvements:
- Create shop_root.html.heex as minimal root for shop pages
- Shop pages no longer show admin nav bar

Other:
- Update .gitignore to exclude digested static files
- Add PageSpeed 100% task to ROADMAP.md
- Fix test to check /users/settings instead of shop homepage

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-20 22:54:07 +00:00
parent 8ab7169c1a
commit 5faa6c4c09
45 changed files with 364 additions and 16 deletions

View File

@@ -339,7 +339,30 @@ This ensures sellers never unknowingly sell at a loss due to Printify price chan
## Quick Wins (Low Effort)
*(None pending)*
### PageSpeed 100% Score
**Status:** In progress
**Effort:** 0.5-1 day
Achieve 100% Google PageSpeed score on all core metrics.
**Completed:**
- [x] Self-hosted fonts (removed Google Fonts external dependency)
- [x] Production asset pipeline (minified, gzipped CSS/JS)
**Remaining:**
- [ ] Add proper image dimensions to all `<img>` tags (CLS)
- [ ] Preload critical fonts (LCP)
- [ ] Lazy load below-fold images
- [ ] Add `fetchpriority="high"` to hero images
- [ ] Optimise mockup images (resize to actual display sizes, WebP format)
- [ ] Review and reduce unused CSS (currently 22KB gzipped)
- [ ] Add cache headers for static assets
**Metrics to hit:**
- Performance: 100
- Accessibility: 100
- Best Practices: 100
- SEO: 100
---
@@ -480,3 +503,14 @@ The project is currently named `simpleshop_theme` (reflecting its origins as a t
- Shadow above nav for visual separation
- Hidden on desktop (≥768px), replaces header nav on mobile
- Works in both live shop and theme preview modes
### Self-Hosted Fonts ✅
- Removed Google Fonts external dependency
- All 10 typefaces (35 font files, 728KB) served from `/fonts/`
- Privacy improvement (no Google tracking)
- Performance improvement (no DNS lookup to fonts.googleapis.com)
- GDPR compliant (no third-party requests)
### Admin Access Route ✅
- `/admin` redirects to `/admin/theme` (requires auth)
- Shop owners can bookmark or type `/admin` to access