- Add .themed class as shared selector for both shop and preview - Move visual/behavioral styles from .preview-frame to .themed - Keep .preview-frame only for CSS variable switching (editor live preview) - Update CSSGenerator to target .themed instead of .shop-root - Refactor CSS files to use native CSS nesting syntax - Update tests to reflect new class structure This improves maintainability by: - Eliminating duplicate selectors (.shop-root + .preview-frame) - Using modern CSS nesting (94%+ browser support) - Clear separation: .preview-frame = vars, .themed = styles Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
38 lines
1.8 KiB
Plaintext
38 lines
1.8 KiB
Plaintext
<!DOCTYPE html>
|
|
<html lang="en" class="h-full">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<meta name="csrf-token" content={get_csrf_token()} />
|
|
<.live_title><%= assigns[:page_title] || @theme_settings.site_name %></.live_title>
|
|
<link phx-track-static rel="stylesheet" href={~p"/assets/css/app.css"} />
|
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
<link
|
|
href="https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=DM+Sans:opsz,wght@9..40,400..700&family=Fraunces:opsz,wght@9..144,400..700&family=Inter:wght@300..700&family=Manrope:wght@400..700&family=Outfit:wght@300..600&family=Playfair+Display:wght@400;500;700&family=Raleway:wght@300;400;500&family=Source+Serif+4:wght@400;600&family=Space+Grotesk:wght@400..600&family=Work+Sans:wght@300..600&display=swap"
|
|
rel="stylesheet"
|
|
/>
|
|
<script defer phx-track-static type="text/javascript" src={~p"/assets/js/app.js"}>
|
|
</script>
|
|
<!-- Generated theme CSS (only active values, not all variants) -->
|
|
<style id="theme-css"><%= Phoenix.HTML.raw(@generated_css) %></style>
|
|
</head>
|
|
<body class="h-full">
|
|
<div
|
|
class="themed shop-root h-full"
|
|
data-mood={@theme_settings.mood}
|
|
data-typography={@theme_settings.typography}
|
|
data-shape={@theme_settings.shape}
|
|
data-density={@theme_settings.density}
|
|
data-grid={@theme_settings.grid_columns}
|
|
data-header={@theme_settings.header_layout}
|
|
data-sticky={to_string(@theme_settings.sticky_header)}
|
|
data-layout={@theme_settings.layout_width}
|
|
data-shadow={@theme_settings.card_shadow}
|
|
data-button-style={@theme_settings.button_style}
|
|
>
|
|
<%= @inner_content %>
|
|
</div>
|
|
</body>
|
|
</html>
|