Files
where_woof/frontend/templates/base.html
Sam Rolfe 2a101e9a62 Promo: order page + red banner + contact form; fix admin login rehash
- /order page: single tag $5.50 / 10-pack $22.00 (GST-incl), qty via
  Stripe Payment Links (single 1-25, pack 1-2), thanks state
- Red 'Protect & recover your valuables — ORDER NOW' banner in base layout
  (every page incl. found-dog tag page) + footer promo links
- Contact page: form -> Gmail SMTP (env SMTP_*), hello@where-woof.com
- Fix admin login 500: User.getAuthPasswordName() = password_hash so
  Laravel 13 rehash-on-login writes the correct column (was trying
  UPDATE users SET password = ...)
2026-09-01 12:53:53 +10:00

65 lines
3.1 KiB
HTML

{{define "base"}}
<!doctype html>
<html lang="en" class="h-full">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="/static/favicon.svg" type="image/svg+xml">
<title>{{.Title}} · Where Woof !</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/htmx.org@1.9.12"></script>
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
<style>
/* HTMX swap/settle animations */
.htmx-swapping { opacity: 0; transition: opacity 150ms ease-out; }
.htmx-settling { opacity: 0; transition: opacity 200ms ease-in; }
.htmx-settling.show { opacity: 1; }
.fade-row { transition: opacity 200ms ease-out; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }
.htmx-indicator { opacity: 0; transition: opacity 150ms ease-in; }
</style>
</head>
<body class="min-h-full bg-stone-100 text-stone-900 antialiased">
<nav class="bg-stone-900 text-white">
<div class="mx-auto flex max-w-4xl items-center justify-between px-4 py-3">
<a href="/" class="text-lg font-bold tracking-tight">🐕 Where Woof</a>
<div class="flex items-center gap-4 text-sm">
{{if .CurrentUser}}
<div class="text-right leading-tight">
<span class="text-stone-300">Hi, {{.CurrentUser.Name}}</span>
<span class="block text-xs text-stone-500" title="Your username / email">{{.CurrentUser.Email}}</span>
</div>
<a href="/account" class="hover:underline">My Tags</a>
<form method="post" action="/logout" class="inline">
<button class="hover:underline">Log out</button>
</form>
{{else}}
<a href="/login" class="hover:underline">Log in</a>
<a href="/register" class="rounded bg-amber-500 px-3 py-1 font-semibold text-stone-900 hover:bg-amber-400">Register</a>
{{end}}
</div>
</div>
</nav>
<!-- Promo banner: consistent across every page -> order page -->
<div class="bg-red-600 text-white">
<a href="/order" class="mx-auto flex max-w-4xl items-center justify-center gap-2 px-4 py-2.5 text-center text-sm font-bold tracking-wide hover:bg-red-500">
<span>🛡️ Protect &amp; recover your valuables</span>
<span class="rounded bg-white px-2 py-0.5 text-xs font-extrabold text-red-600">ORDER NOW — tags from $5</span>
</a>
</div>
<main class="mx-auto max-w-4xl px-4 py-8">
{{template "content" .}}
</main>
<footer class="border-t border-stone-200 py-6">
<div class="mx-auto flex max-w-4xl flex-wrap items-center justify-center gap-x-6 gap-y-2 px-4 text-sm text-stone-500">
<a href="/order" class="font-semibold text-red-600 hover:underline">🛡️ Order tags — from $5</a>
<a href="/about" class="hover:underline">About</a>
<a href="/what-is-this" class="hover:underline">What is this?</a>
<a href="/contact" class="hover:underline">Get in touch</a>
<span>🐕 Where Woof — every item deserves a way home</span>
</div>
</footer>
</body>
</html>
{{end}}