2026-02-12 08:35:22 +00:00
|
|
|
<!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()} />
|
2026-02-18 21:23:15 +00:00
|
|
|
<.live_title default="Admin" suffix=" · Berrypod">
|
2026-02-12 08:35:22 +00:00
|
|
|
{assigns[:page_title]}
|
|
|
|
|
</.live_title>
|
2026-02-20 23:53:42 +00:00
|
|
|
<!-- Preload critical fonts for the current typography preset -->
|
|
|
|
|
<%= for preload <- Berrypod.Theme.Fonts.preload_links(
|
|
|
|
|
@theme_settings.typography,
|
|
|
|
|
&BerrypodWeb.Endpoint.static_path/1
|
|
|
|
|
) do %>
|
|
|
|
|
<link rel="preload" href={preload.href} as="font" type="font/woff2" crossorigin />
|
|
|
|
|
<% end %>
|
2026-02-17 20:07:52 +00:00
|
|
|
<!-- Pre-declare layer order so shop reset < Tailwind base regardless of load order -->
|
|
|
|
|
<style>
|
|
|
|
|
@layer properties, reset, primitives, tokens, theme, base, components, layout, utilities, overrides;
|
|
|
|
|
</style>
|
2026-02-18 01:15:28 +00:00
|
|
|
<link phx-track-static rel="stylesheet" href={~p"/assets/css/admin.css"} />
|
2026-02-17 20:07:52 +00:00
|
|
|
<link phx-track-static rel="stylesheet" href={~p"/assets/css/shop.css"} />
|
2026-02-20 23:53:42 +00:00
|
|
|
<!-- Generated theme CSS with @font-face declarations -->
|
|
|
|
|
<style id="theme-css">
|
|
|
|
|
<%= Phoenix.HTML.raw(@generated_css) %>
|
|
|
|
|
</style>
|
2026-02-12 08:35:22 +00:00
|
|
|
<script defer phx-track-static 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 class="h-full">
|
|
|
|
|
{@inner_content}
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|