Files
supermarket/internal/theme/files/layouts/partials/head.html
T
davidandClaude Opus 5.5 5d7db5c5bf Phase 6 part 5, step 1: a shared site theme
internal/theme embeds a Hugo theme from federated-website's look and the
13 section types both sites share, with the header, footer, colors, font
and logo set per site in hugo.toml, and a README of each type's fields.
The catalogue reader reads themes' sections and READMEs after the site's
own; lead forms know a theme site needs only the Lead Capture address.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 15:14:24 -07:00

44 lines
2.8 KiB
HTML

{{/* Brand settings ([params.brand] in hugo.toml) override the stylesheet's
colors and font; see the theme's README. */}}
{{ $b := site.Params.brand | default dict }}
{{ $dark := $b.dark | default "#001a2b" }}
{{ $dark2 := $b.dark2 | default "#052b42" }}
{{ $primary := $b.primary | default "#e0ff4f" }}
{{ $accent := $b.accent | default "#614efa" }}
{{ $font := $b.font | default "Inter" }}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ if .IsHome }}{{ site.Title }}{{ with site.Params.tagline }} — {{ . }}{{ end }}{{ else }}{{ .Title }} · {{ site.Title }}{{ end }}</title>
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ site.Params.tagline }}{{ end }}">
<meta name="theme-color" content="{{ $dark }}">
<link rel="canonical" href="{{ .Permalink }}">
<meta property="og:title" content="{{ .Title | default site.Title }}">
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{ site.Params.tagline }}{{ end }}">
<meta property="og:url" content="{{ .Permalink }}">
<meta property="og:type" content="website">
{{ with $b.favicon }}<link rel="icon" href="{{ . | relURL }}">{{ end }}
<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={{ $font }}:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="{{ "css/supermarket.css" | relURL }}">
<style>
:root {
--navy-deep: {{ $dark | safeCSS }}; --ink: {{ $dark | safeCSS }};
--navy: {{ $dark2 | safeCSS }}; --navy-2: {{ $dark2 | safeCSS }};
--lime: {{ $primary | safeCSS }}; --lime-deep: {{ $b.primaryHover | default $primary | safeCSS }}; --live: {{ $primary | safeCSS }};
--violet: {{ $accent | safeCSS }}; --violet-deep: {{ $b.accentHover | default $accent | safeCSS }};
--violet-7: color-mix(in srgb, {{ $accent | safeCSS }} 7%, transparent);
--violet-11: color-mix(in srgb, {{ $accent | safeCSS }} 11%, transparent);
--ink-86: color-mix(in srgb, {{ $dark | safeCSS }} 86%, transparent);
--ink-68: color-mix(in srgb, {{ $dark | safeCSS }} 68%, transparent);
--ink-60: color-mix(in srgb, {{ $dark | safeCSS }} 60%, transparent);
--ink-45: color-mix(in srgb, {{ $dark | safeCSS }} 45%, transparent);
--ink-22: color-mix(in srgb, {{ $dark | safeCSS }} 22%, transparent);
--font: "{{ $font | safeCSS }}", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
</style>
{{ with site.Params.plausible }}{{ if .script }}
<script defer data-domain="{{ .domain | default (urls.Parse site.BaseURL).Host }}" src="{{ .script }}"></script>
<script>window.plausible = window.plausible || function () { (window.plausible.q = window.plausible.q || []).push(arguments) };</script>
{{ end }}{{ end }}