add favicon and site icon generation from uploaded images
All checks were successful
deploy / deploy (push) Successful in 1m26s

Upload a source image (PNG, JPEG, or SVG) and get a complete favicon
setup: PNG variants at 32, 180, 192, 512px served from DB via
FaviconController with ETag caching, SVG favicon for vector sources,
dynamic site.webmanifest, and theme-color meta tag. Theme editor gains
a site icon section with "use logo as icon" toggle, dedicated icon
upload, short name, and background colour picker.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jamey
2026-02-24 17:22:15 +00:00
parent 12d87998ee
commit f788108665
15 changed files with 837 additions and 4 deletions

View File

@@ -11,6 +11,12 @@
"Welcome to #{@theme_settings.site_name}"
}
/>
<!-- Favicon & PWA -->
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
<link rel="icon" href="/favicon-32x32.png" sizes="32x32" type="image/png" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<link rel="manifest" href="/site.webmanifest" />
<meta name="theme-color" content={@theme_settings.accent_color || "#000000"} />
<.live_title suffix={" · #{@theme_settings.site_name}"}>
{assigns[:page_title]}
</.live_title>