2026-01-20 22:54:07 +00:00
|
|
|
<!DOCTYPE html>
|
2026-02-19 21:27:52 +00:00
|
|
|
<html lang="en">
|
2026-01-20 22:54:07 +00:00
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8" />
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
|
|
<meta name="csrf-token" content={get_csrf_token()} />
|
2026-01-31 14:24:58 +00:00
|
|
|
<meta
|
|
|
|
|
name="description"
|
|
|
|
|
content={
|
|
|
|
|
assigns[:page_description] || @theme_settings.site_description ||
|
|
|
|
|
"Welcome to #{@theme_settings.site_name}"
|
|
|
|
|
}
|
|
|
|
|
/>
|
add favicon and site icon generation from uploaded images
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>
2026-02-24 17:22:15 +00:00
|
|
|
<!-- 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"} />
|
2026-02-23 21:23:09 +00:00
|
|
|
<.live_title suffix={" · #{@theme_settings.site_name}"}>
|
|
|
|
|
{assigns[:page_title]}
|
|
|
|
|
</.live_title>
|
2026-02-23 21:37:50 +00:00
|
|
|
<% og_title =
|
|
|
|
|
if assigns[:page_title],
|
|
|
|
|
do: "#{assigns[:page_title]} · #{@theme_settings.site_name}",
|
|
|
|
|
else: @theme_settings.site_name
|
|
|
|
|
|
|
|
|
|
og_description =
|
|
|
|
|
assigns[:page_description] ||
|
|
|
|
|
@theme_settings.site_description ||
|
|
|
|
|
"Welcome to #{@theme_settings.site_name}" %>
|
|
|
|
|
<meta property="og:site_name" content={@theme_settings.site_name} />
|
|
|
|
|
<meta property="og:title" content={og_title} />
|
|
|
|
|
<meta property="og:description" content={og_description} />
|
|
|
|
|
<meta property="og:type" content={assigns[:og_type] || "website"} />
|
|
|
|
|
<%= if assigns[:og_url] do %>
|
add canonical URLs, robots.txt, and sitemap.xml
Canonical: all shop pages now assign og_url (reusing the existing og:url
assign), which the layout renders as <link rel="canonical">. Collection
pages strip the sort param so ?sort=price_asc doesn't create a duplicate
canonical.
robots.txt: dynamic controller disallows /admin/, /api/, /users/,
/webhooks/, /checkout/. Removed robots.txt from static_paths so it
goes through the router instead of Plug.Static.
sitemap.xml: auto-generated from all visible products + categories +
static pages, served as application/xml. 8 tests.
Also updates PROGRESS.md: marks tasks 55, 58, 59, 61, 62 as done.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-23 21:47:35 +00:00
|
|
|
<link rel="canonical" href={assigns[:og_url]} />
|
2026-02-23 21:37:50 +00:00
|
|
|
<meta property="og:url" content={assigns[:og_url]} />
|
|
|
|
|
<% end %>
|
|
|
|
|
<%= if assigns[:og_image] do %>
|
|
|
|
|
<meta property="og:image" content={assigns[:og_image]} />
|
|
|
|
|
<meta name="twitter:card" content="summary_large_image" />
|
|
|
|
|
<meta name="twitter:image" content={assigns[:og_image]} />
|
|
|
|
|
<% else %>
|
|
|
|
|
<meta name="twitter:card" content="summary" />
|
|
|
|
|
<% end %>
|
|
|
|
|
<meta name="twitter:title" content={og_title} />
|
|
|
|
|
<meta name="twitter:description" content={og_description} />
|
2026-02-23 22:37:34 +00:00
|
|
|
<%= if assigns[:json_ld] do %>
|
|
|
|
|
<script type="application/ld+json">
|
|
|
|
|
<%= Phoenix.HTML.raw(assigns[:json_ld]) %>
|
|
|
|
|
</script>
|
|
|
|
|
<% end %>
|
2026-01-25 00:33:24 +00:00
|
|
|
<!-- Preload critical fonts for the current typography preset -->
|
2026-02-18 21:23:15 +00:00
|
|
|
<%= for preload <- Berrypod.Theme.Fonts.preload_links(
|
2026-01-25 09:32:06 +00:00
|
|
|
@theme_settings.typography,
|
2026-02-18 21:23:15 +00:00
|
|
|
&BerrypodWeb.Endpoint.static_path/1
|
2026-01-25 09:32:06 +00:00
|
|
|
) do %>
|
|
|
|
|
<link rel="preload" href={preload.href} as="font" type="font/woff2" crossorigin />
|
2026-01-25 00:33:24 +00:00
|
|
|
<% end %>
|
2026-02-17 00:13:03 +00:00
|
|
|
<!-- Pre-declare layer order so reset < components regardless of load order -->
|
|
|
|
|
<style>
|
|
|
|
|
@layer properties, reset, primitives, tokens, theme, base, components, layout, utilities, overrides;
|
|
|
|
|
</style>
|
2026-02-16 23:45:13 +00:00
|
|
|
<link phx-track-static rel="stylesheet" href={~p"/assets/css/shop.css"} />
|
2026-02-27 16:22:35 +00:00
|
|
|
<%= if assigns[:current_scope] && @current_scope.user do %>
|
|
|
|
|
<link phx-track-static rel="stylesheet" href={~p"/assets/css/admin.css"} />
|
|
|
|
|
<% end %>
|
2026-01-25 00:33:24 +00:00
|
|
|
<script defer phx-track-static src={~p"/assets/js/app.js"}>
|
2026-01-20 22:54:07 +00:00
|
|
|
</script>
|
2026-01-25 00:33:24 +00:00
|
|
|
<!-- Generated theme CSS with @font-face declarations -->
|
2026-01-31 14:24:58 +00:00
|
|
|
<style id="theme-css">
|
|
|
|
|
<%= Phoenix.HTML.raw(@generated_css) %>
|
|
|
|
|
</style>
|
2026-01-20 22:54:07 +00:00
|
|
|
</head>
|
2026-02-19 21:27:52 +00:00
|
|
|
<body>
|
2026-01-21 20:20:39 +00:00
|
|
|
<div
|
2026-02-19 21:27:52 +00:00
|
|
|
class="themed shop-root"
|
2026-01-21 20:20:39 +00:00
|
|
|
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>
|
2026-01-20 22:54:07 +00:00
|
|
|
</body>
|
|
|
|
|
</html>
|