feat: add shop storefront with optimized theme CSS

- Create LoadTheme plug for loading theme settings
- Add shop layout with inline CSS injection (~400 bytes vs 17KB full)
- Create ShopLive.Home at / using shared ShopComponents
- Wire up CSS cache invalidation when theme settings change
- Replace Phoenix welcome page with themed shop home page

The shop layout injects only the active theme CSS variables inline,
achieving a 97% reduction compared to the full variants file used
by the theme editor.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-17 16:19:35 +00:00
parent 97981a9884
commit 88636db9d2
7 changed files with 172 additions and 5 deletions

View File

@@ -1,8 +1,8 @@
defmodule SimpleshopThemeWeb.PageControllerTest do
use SimpleshopThemeWeb.ConnCase
test "GET /", %{conn: conn} do
test "GET / renders the shop home page", %{conn: conn} do
conn = get(conn, ~p"/")
assert html_response(conn, 200) =~ "Peace of mind from prototype to production"
assert html_response(conn, 200) =~ "Original designs, printed on demand"
end
end