2025-12-30 12:26:26 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="en">
|
|
|
|
|
<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 default="SimpleshopTheme" suffix=" · Phoenix Framework">
|
|
|
|
|
{assigns[:page_title]}
|
|
|
|
|
</.live_title>
|
|
|
|
|
<link phx-track-static rel="stylesheet" href={~p"/assets/css/app.css"} />
|
2025-12-31 00:24:53 +00:00
|
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
|
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
feat: implement professional typography system with curated font pairings
Typography Presets (research-backed pairings):
- clean: Manrope + Inter (minimal, modern)
- editorial: Playfair Display + Raleway (fashion, lifestyle)
- modern: Space Grotesk + Inter (tech, futuristic)
- classic: Cormorant Garamond + Source Serif 4 (luxury, elegant)
- friendly: Fraunces + Work Sans (playful, quirky)
- minimal: DM Sans + Source Serif 4 (design-forward)
- impulse: Raleway + Inter (wellness, beauty)
Type Scale & Line Heights:
- Major Third (1.25) ratio for mathematical harmony
- H1: line-height 1.1, letter-spacing -0.025em
- H2: line-height 1.15, letter-spacing -0.02em
- H3: line-height 1.2, letter-spacing -0.015em
- Body: line-height 1.5 (WCAG compliant)
- Small text: letter-spacing +0.01em for readability
Fluid Typography:
- Headings use clamp() for smooth mobile→desktop scaling
- Display: 36px→48px, XL: 30px→40px, LG: 24px→32px
Performance:
- Variable font loading where available (Inter, Manrope, etc.)
- Removed unused fonts (Libre Baskerville, Nunito, Source Sans)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 01:16:21 +00:00
|
|
|
<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">
|
2025-12-30 12:26:26 +00:00
|
|
|
<script defer phx-track-static type="text/javascript" src={~p"/assets/js/app.js"}>
|
|
|
|
|
</script>
|
|
|
|
|
<script>
|
|
|
|
|
(() => {
|
|
|
|
|
const setTheme = (theme) => {
|
|
|
|
|
if (theme === "system") {
|
|
|
|
|
localStorage.removeItem("phx:theme");
|
|
|
|
|
document.documentElement.removeAttribute("data-theme");
|
|
|
|
|
} else {
|
|
|
|
|
localStorage.setItem("phx:theme", theme);
|
|
|
|
|
document.documentElement.setAttribute("data-theme", theme);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
if (!document.documentElement.hasAttribute("data-theme")) {
|
|
|
|
|
setTheme(localStorage.getItem("phx:theme") || "system");
|
|
|
|
|
}
|
|
|
|
|
window.addEventListener("storage", (e) => e.key === "phx:theme" && setTheme(e.newValue || "system"));
|
|
|
|
|
|
|
|
|
|
window.addEventListener("phx:set-theme", (e) => setTheme(e.target.dataset.phxTheme));
|
|
|
|
|
})();
|
|
|
|
|
</script>
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
2025-12-30 12:26:46 +00:00
|
|
|
<ul class="menu menu-horizontal w-full relative z-10 flex items-center gap-4 px-4 sm:px-6 lg:px-8 justify-end">
|
|
|
|
|
<%= if @current_scope do %>
|
|
|
|
|
<li>
|
|
|
|
|
{@current_scope.user.email}
|
|
|
|
|
</li>
|
feat: add Theme LiveView with preset switching
Implement basic theme editor interface with live preview:
- ThemeLive.Index LiveView with mount and event handlers
- Two-column layout: controls sidebar + preview area
- Display all 9 presets as clickable buttons
- Apply preset and regenerate CSS on click
- Show current theme settings (mood, typography, shape, density, color)
- Preview page switcher (7 pages: home, collection, product, cart, about, contact, 404)
- Inline <style> tag with generated CSS for instant preview
- Basic preview frame showing theme variables in action
- Authentication required via :require_authenticated_user pipeline
- Theme navigation link added to user menu
- 9 comprehensive LiveView tests
All tests passing (197 total).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-30 21:53:52 +00:00
|
|
|
<li>
|
|
|
|
|
<.link href={~p"/admin/theme"}>Theme</.link>
|
|
|
|
|
</li>
|
2025-12-30 12:26:46 +00:00
|
|
|
<li>
|
|
|
|
|
<.link href={~p"/users/settings"}>Settings</.link>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<.link href={~p"/users/log-out"} method="delete">Log out</.link>
|
|
|
|
|
</li>
|
|
|
|
|
<% else %>
|
|
|
|
|
<li>
|
|
|
|
|
<.link href={~p"/users/register"}>Register</.link>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<.link href={~p"/users/log-in"}>Log in</.link>
|
|
|
|
|
</li>
|
|
|
|
|
<% end %>
|
|
|
|
|
</ul>
|
2025-12-30 12:26:26 +00:00
|
|
|
{@inner_content}
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|