Files
bennyshouse.net/templates/base.html

99 lines
4.4 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{{ brand }} — {{ tagline }}</title>
<meta name="description" content="Bennys House — local IT infrastructure, web hosting, and creative services." />
<link rel="icon" href="{{ url_for('static', filename='favicon.svg') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/app.css') }}">
</head>
<body class="bg-zinc-950 text-zinc-100 antialiased">
<!-- NAV -->
<header class="sticky top-0 z-50 border-b border-white/10 bg-black/60 backdrop-blur">
<div class="max-w-7xl mx-auto px-6 py-4 flex items-center justify-between">
<a href="/" class="flex items-center gap-3">
<div class="size-8 rounded-lg bg-white text-black grid place-items-center font-bold">BH</div>
<span class="font-bebas tracking-wider text-2xl">Bennys House</span>
</a>
<!-- Desktop nav -->
<nav class="hidden md:flex items-center gap-6 text-sm">
<a href="/" class="hover:underline underline-offset-4">Home</a>
<a href="/about" class="hover:underline underline-offset-4">About</a>
<a href="/services" class="hover:underline underline-offset-4">Services</a>
<a href="/contact" class="hover:underline underline-offset-4">Contact</a>
<a href="/benjamin.vcf" class="ml-2 inline-flex items-center gap-2 px-4 py-2 rounded-xl glass hover:bg-white/10 transition">Download vCard</a>
</nav>
<!-- Mobile toggle -->
<button
id="menuBtn"
class="md:hidden p-2 rounded hover:bg-white/10 focus:outline-none focus:ring-2 focus:ring-white/30"
aria-label="Toggle menu"
aria-controls="mobileNav"
aria-expanded="false">
<!-- hamburger -->
<svg id="iconOpen" width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
<path d="M4 7h16M4 12h16M4 17h16"/>
</svg>
<!-- close -->
<svg id="iconClose" width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" class="hidden" aria-hidden="true">
<path d="M6 6l12 12M18 6L6 18"/>
</svg>
</button>
</div>
<!-- Mobile panel -->
<div id="mobileNav" class="md:hidden hidden border-t border-white/10 bg-black/90 backdrop-blur">
<nav class="px-6 py-4 grid gap-2 text-sm">
<a class="py-2 hover:underline underline-offset-4" href="/">Home</a>
<a class="py-2 hover:underline underline-offset-4" href="/about">About</a>
<a class="py-2 hover:underline underline-offset-4" href="/services">Services</a>
<a class="py-2 hover:underline underline-offset-4" href="/contact">Contact</a>
<a class="mt-2 inline-flex items-center justify-center gap-2 px-4 py-2 rounded-xl glass hover:bg-white/10 transition" href="/benjamin.vcf">Download vCard</a>
</nav>
</div>
</header>
<main>
{% block content %}{% endblock %}
</main>
<footer class="border-t border-white/10 py-10">
<div class="max-w-7xl mx-auto px-6 flex flex-col md:flex-row items-center justify-between gap-4 text-sm text-white/60">
<div> {{ year or 2025 }} Bennys House.</div>
<div class="flex items-center gap-6">
<a class="hover:underline underline-offset-4" href="https://brookhaven.bennyshouse.net">Enterprise</a>
<a class="hover:underline underline-offset-4" href="{{ contact.link }}">LinkedIn</a>
<a class="hover:underline underline-offset-4" href="{{ contact.cal }}">Book a call</a>
</div>
</div>
</footer>
<script>
// mobile nav toggle (vanilla JS)
const btn = document.getElementById('menuBtn');
const nav = document.getElementById('mobileNav');
const icoOpen = document.getElementById('iconOpen');
const icoClose = document.getElementById('iconClose');
function toggleNav(force) {
const willOpen = force !== undefined ? force : nav.classList.contains('hidden');
nav.classList.toggle('hidden', !willOpen);
icoOpen.classList.toggle('hidden', willOpen);
icoClose.classList.toggle('hidden', !willOpen);
btn.setAttribute('aria-expanded', String(willOpen));
document.body.classList.toggle('overflow-hidden', willOpen); // lock scroll when open
}
btn?.addEventListener('click', () => toggleNav());
window.addEventListener('keydown', (e) => { if (e.key === 'Escape') toggleNav(false); });
document.addEventListener('click', (e) => {
if (!nav.contains(e.target) && !btn.contains(e.target)) toggleNav(false);
});
</script>
</body>
</html>