Free
Hero
Cairnlight Hero
A hero block extracted from the Cairnlight template, available in Tailwind CSS.
0
1
A hero block extracted from the Cairnlight template, available in Tailwind CSS.
Free download · up to 5 blocks per day. Unlimited with All-Access
<!DOCTYPE html>
<html lang="en">
<head>
<script>
window.FontAwesomeConfig = { autoReplaceSvg: 'nest' };
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/js/all.min.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Cairnlight Hero | Tailwind CSS UI Block</title>
<meta name="description" content="A hero block extracted from the Cairnlight template, available in Tailwind CSS.">
<meta name="keywords" content="Cairnlight, Tailwind CSS template, HTML website template, travel website template, walking holidays, tour operator template, mountain huts, interactive map, itinerary page, trip price calculator">
<meta name="author" content="Let's templates">
<link rel="canonical" href="">
<meta property="og:type" content="product">
<meta property="og:site_name" content="Let's templates">
<meta property="og:locale" content="en_US">
<meta property="og:url" content="">
<meta property="og:title" content="Cairnlight | Tailwind CSS Travel Template">
<meta property="og:description" content="A deep green Tailwind CSS template for walking holidays and tour operators, with a glowing map of huts filtered by season, a rail of routes, a trip price builder, a day-by-day route page and a booking enquiry form.">
<meta property="og:image" content="">
<meta property="og:image:alt" content="Cairnlight template preview">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:url" content="">
<meta name="twitter:title" content="Cairnlight | Tailwind CSS Travel Template">
<meta name="twitter:description" content="A deep green Tailwind CSS template for walking holidays and tour operators, with a glowing map of huts filtered by season, a rail of routes, a trip price builder, a day-by-day route page and a booking enquiry form.">
<meta name="twitter:image" content="">
<meta name="twitter:image:alt" content="Cairnlight template preview">
<script src="https://cdn.tailwindcss.com/3.4.17"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500&family=Jost:wght@300;400;500&display=swap" rel="stylesheet">
<script>
tailwind.config = {
theme: {
extend: {
colors: {
pine: { DEFAULT: '#073a2f', deep: '#042720', land: '#0f5342', high: '#17654f' },
cream: '#efe9dc',
mint: '#9fd8c0'
},
fontFamily: {
sans: ['Jost', 'sans-serif'],
serif: ['"Cormorant Garamond"', 'serif']
}
}
}
}
</script>
<style>
@view-transition { navigation: auto; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }
.night { background: radial-gradient(120% 90% at 55% 45%, #0a4a3b 0%, #073a2f 45%, #042720 100%); }
.lamp { fill: #fff; filter: drop-shadow(0 0 5px rgba(255, 255, 255, .85)); transition: opacity .5s ease; }
.lamp[data-dim] { opacity: .1; }
.label { font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; }
.slant { clip-path: polygon(14% 0, 100% 0, 86% 100%, 0 100%); }
.lead { display: inline-flex; align-items: center; }
.lead::before { content: ""; width: .4rem; height: .4rem; border: 1px solid currentColor; border-radius: 9999px; }
.lead > span:first-child { width: 1.75rem; height: 1px; background: currentColor; }
.lead > span:last-child { border: 1px solid currentColor; padding: .85rem 1.6rem; transition: background-color .3s ease, color .3s ease; }
.lead:hover > span:last-child { background: #efe9dc; color: #042720; }
.rail { scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.reveal-ready [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; transition-delay: var(--reveal-delay, 0ms); }
.reveal-ready [data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .lamp { transition: none; } }
</style>
</head>
<body class="bg-pine-deep font-sans font-light text-cream antialiased">
<!-- block:start hero -->
<section class="night relative overflow-hidden" data-huts>
<div class="mx-auto grid max-w-[1500px] gap-8 px-6 pb-10 pt-32 md:px-12 lg:min-h-screen lg:grid-cols-[minmax(0,.8fr)_minmax(0,1.2fr)] lg:pt-36">
<div class="relative z-10 flex flex-col">
<h1 class="max-w-md font-serif text-5xl font-light leading-[1.02] md:text-7xl">Walk from one lit window to the next.</h1>
<p class="mt-6 max-w-sm text-cream/75">Twenty-four staffed huts a day's walk apart, on 412 kilometres of old path. We carry the bag, light the stove and keep the lamp in the window.</p>
<div class="mt-10 flex flex-wrap gap-x-8 gap-y-4 lg:mt-14 lg:flex-col lg:gap-5 lg:border-r lg:border-cream/15 lg:pr-8 lg:w-fit" role="group" aria-label="Season">
<button type="button" data-season="all" aria-pressed="true" class="group text-left transition aria-pressed:!opacity-100 hover:!opacity-100" style="opacity: 1">
<span class="label block text-[.6rem] text-cream/70 group-aria-pressed:text-mint">Every</span>
<span class="block font-serif text-2xl leading-none group-aria-pressed:text-3xl lg:text-3xl lg:group-aria-pressed:text-4xl">season</span>
</button>
<button type="button" data-season="sp" aria-pressed="false" class="group text-left transition aria-pressed:!opacity-100 hover:!opacity-100" style="opacity: 0.8">
<span class="label block text-[.6rem] text-cream/70 group-aria-pressed:text-mint">Spring</span>
<span class="block font-serif text-2xl leading-none group-aria-pressed:text-3xl lg:text-3xl lg:group-aria-pressed:text-4xl">2027</span>
</button>
<button type="button" data-season="su" aria-pressed="false" class="group text-left transition aria-pressed:!opacity-100 hover:!opacity-100" style="opacity: 0.6">
<span class="label block text-[.6rem] text-cream/70 group-aria-pressed:text-mint">Summer</span>
<span class="block font-serif text-2xl leading-none group-aria-pressed:text-3xl lg:text-3xl lg:group-aria-pressed:text-4xl">2027</span>
</button>
<button type="button" data-season="au" aria-pressed="false" class="group text-left transition aria-pressed:!opacity-100 hover:!opacity-100" style="opacity: 0.45">
<span class="label block text-[.6rem] text-cream/70 group-aria-pressed:text-mint">Autumn</span>
<span class="block font-serif text-2xl leading-none group-aria-pressed:text-3xl lg:text-3xl lg:group-aria-pressed:text-4xl">2027</span>
</button>
<button type="button" data-season="wi" aria-pressed="false" class="group text-left transition aria-pressed:!opacity-100 hover:!opacity-100" style="opacity: 0.32">
<span class="label block text-[.6rem] text-cream/70 group-aria-pressed:text-mint">Winter</span>
<span class="block font-serif text-2xl leading-none group-aria-pressed:text-3xl lg:text-3xl lg:group-aria-pressed:text-4xl">2028</span>
</button>
</div>
<p class="mt-8 text-sm text-cream/75"><span class="font-serif text-3xl text-cream" data-huts-count>24</span> huts with the lamp lit</p>
<div class="mt-10 flex flex-wrap items-center justify-between gap-6 lg:mt-auto lg:pt-10">
<div class="flex" role="group" aria-label="View">
<button type="button" data-view="map" aria-pressed="true" class="slant label -mr-3 bg-white/5 px-9 py-3.5 transition aria-pressed:bg-cream aria-pressed:text-pine-deep"><i class="fa-solid fa-circle mr-2 text-[.5rem]"></i>Map</button>
<button type="button" data-view="list" aria-pressed="false" class="slant label bg-white/5 px-9 py-3.5 transition aria-pressed:bg-cream aria-pressed:text-pine-deep"><i class="fa-solid fa-bars mr-2 text-[.6rem]"></i>List</button>
</div>
<a href="routes.html" class="lead label lg:hidden"><span></span><span>Find a walk</span></a>
</div>
</div>
<div class="relative min-h-[30rem] lg:min-h-0">
<svg viewBox="50 30 520 690" class="h-full max-h-[52rem] w-full lg:absolute lg:inset-0" data-view-panel="map" role="img" aria-label="Map of the twenty-four Cairnlight huts along the path, from the south shore to the north end">
<defs>
<filter id="coast" x="-20%" y="-20%" width="140%" height="140%">
<feTurbulence type="fractalNoise" baseFrequency=".018" numOctaves="3" seed="4"/>
<feDisplacementMap in="SourceGraphic" scale="38"/>
</filter>
</defs>
<g filter="url(#coast)" fill="#0f5342">
<ellipse cx="190" cy="600" rx="100" ry="84" transform="rotate(-58 190 600)"/>
<ellipse cx="270" cy="530" rx="95" ry="72" transform="rotate(-58 270 530)"/>
<ellipse cx="320" cy="440" rx="85" ry="64" transform="rotate(-58 320 440)"/>
<ellipse cx="360" cy="340" rx="88" ry="60" transform="rotate(-58 360 340)"/>
<ellipse cx="420" cy="240" rx="84" ry="66" transform="rotate(-58 420 240)"/>
<ellipse cx="460" cy="140" rx="80" ry="70" transform="rotate(-58 460 140)"/>
<ellipse cx="110" cy="450" rx="24" ry="13" transform="rotate(-58 110 450)"/>
<ellipse cx="540" cy="280" rx="28" ry="15" transform="rotate(-58 540 280)"/>
<ellipse cx="80" cy="545" rx="15" ry="9" transform="rotate(-58 80 545)"/>
</g>
<g filter="url(#coast)" fill="#13604b">
<ellipse cx="190" cy="600" rx="68" ry="57" transform="rotate(-58 190 600)"/>
<ellipse cx="270" cy="530" rx="65" ry="49" transform="rotate(-58 270 530)"/>
<ellipse cx="320" cy="440" rx="58" ry="44" transform="rotate(-58 320 440)"/>
<ellipse cx="360" cy="340" rx="60" ry="41" transform="rotate(-58 360 340)"/>
<ellipse cx="420" cy="240" rx="57" ry="45" transform="rotate(-58 420 240)"/>
<ellipse cx="460" cy="140" rx="54" ry="48" transform="rotate(-58 460 140)"/>
<ellipse cx="110" cy="450" rx="16" ry="9" transform="rotate(-58 110 450)"/>
<ellipse cx="540" cy="280" rx="19" ry="10" transform="rotate(-58 540 280)"/>
<ellipse cx="80" cy="545" rx="10" ry="6" transform="rotate(-58 80 545)"/>
</g>
<g filter="url(#coast)" fill="#187057">
<ellipse cx="190" cy="600" rx="38" ry="32" transform="rotate(-58 190 600)"/>
<ellipse cx="270" cy="530" rx="36" ry="27" transform="rotate(-58 270 530)"/>
<ellipse cx="320" cy="440" rx="32" ry="24" transform="rotate(-58 320 440)"/>
<ellipse cx="360" cy="340" rx="33" ry="23" transform="rotate(-58 360 340)"/>
<ellipse cx="420" cy="240" rx="32" ry="25" transform="rotate(-58 420 240)"/>
<ellipse cx="460" cy="140" rx="30" ry="27" transform="rotate(-58 460 140)"/>
<ellipse cx="110" cy="450" rx="9" ry="5" transform="rotate(-58 110 450)"/>
<ellipse cx="540" cy="280" rx="11" ry="6" transform="rotate(-58 540 280)"/>
<ellipse cx="80" cy="545" rx="6" ry="3" transform="rotate(-58 80 545)"/>
</g>
<polyline points="172,640 205,612 232,590 262,560 275,520 305,495 320,455 300,420 330,375 365,350 392,300 380,265 405,205 440,190 480,95" fill="none" stroke="#efe9dc" stroke-opacity=".3" stroke-dasharray="2 6" stroke-linecap="round"/>
<circle class="lamp" data-hut data-open="sp su au" cx="172" cy="640" r="4.5"><desc>Lamb's Rest, South shore: 12 beds</desc></circle>
<circle class="lamp" data-hut data-open="sp su au wi" cx="205" cy="612" r="3"><desc>Otter Bothy, South shore: 8 beds</desc></circle>
<circle class="lamp" data-hut data-open="su" cx="150" cy="585" r="3"><desc>The Fank, South shore: 6 beds</desc></circle>
<circle class="lamp" data-hut data-open="sp su au wi" cx="232" cy="590" r="4.5"><desc>Kettle House, Birchwood: 14 beds</desc></circle>
<circle class="lamp" data-hut data-open="sp su au" cx="262" cy="560" r="6"><desc>Birch Hall, Birchwood: 18 beds</desc></circle>
<circle class="lamp" data-hut data-open="su au" cx="215" cy="548" r="4.5"><desc>Sgor Lodge, Birchwood: 10 beds</desc></circle>
<circle class="lamp" data-hut data-open="sp su" cx="290" cy="585" r="3"><desc>Ferryman's, Birchwood: 8 beds</desc></circle>
<circle class="lamp" data-hut data-open="sp su au wi" cx="275" cy="520" r="4.5"><desc>Low Byre, The Long Glen: 10 beds</desc></circle>
<circle class="lamp" data-hut data-open="su au" cx="305" cy="495" r="6"><desc>Midge Hall, The Long Glen: 16 beds</desc></circle>
<circle class="lamp" data-hut data-open="su" cx="255" cy="480" r="3"><desc>The Stell, The Long Glen: 6 beds</desc></circle>
<circle class="lamp" data-hut data-open="sp su au wi" cx="320" cy="455" r="6"><desc>Long Glen Hut, The Long Glen: 20 beds</desc></circle>
<circle class="lamp" data-hut data-open="sp su au" cx="300" cy="420" r="4.5"><desc>Wade's Rest, The Long Glen: 12 beds</desc></circle>
<circle class="lamp" data-hut data-open="su au" cx="345" cy="410" r="4.5"><desc>Tarn House, Black Water: 10 beds</desc></circle>
<circle class="lamp" data-hut data-open="sp su au wi" cx="330" cy="375" r="4.5"><desc>Black Water, Black Water: 14 beds</desc></circle>
<circle class="lamp" data-hut data-open="sp su au wi" cx="365" cy="350" r="6"><desc>Crook Inn, Black Water: 22 beds</desc></circle>
<circle class="lamp" data-hut data-open="su" cx="350" cy="315" r="3"><desc>The Saddle, The ridge: 8 beds</desc></circle>
<circle class="lamp" data-hut data-open="sp su au" cx="392" cy="300" r="4.5"><desc>Heron Hut, The ridge: 10 beds</desc></circle>
<circle class="lamp" data-hut data-open="su au" cx="380" cy="265" r="3"><desc>Glass Bothy, The ridge: 6 beds</desc></circle>
<circle class="lamp" data-hut data-open="su" cx="415" cy="245" r="4.5"><desc>High Shieling, The ridge: 12 beds</desc></circle>
<circle class="lamp" data-hut data-open="su au wi" cx="405" cy="205" r="6"><desc>Snow Gate, North end: 16 beds</desc></circle>
<circle class="lamp" data-hut data-open="sp su au" cx="440" cy="190" r="3"><desc>Lantern Rock, North end: 8 beds</desc></circle>
<circle class="lamp" data-hut data-open="su" cx="430" cy="150" r="4.5"><desc>North Byre, North end: 10 beds</desc></circle>
<circle class="lamp" data-hut data-open="su au" cx="462" cy="135" r="3"><desc>Wind Door, North end: 6 beds</desc></circle>
<circle class="lamp" data-hut data-open="sp su au wi" cx="480" cy="95" r="4.5"><desc>Last Light, North end: 14 beds</desc></circle>
</svg>
<div class="h-[30rem] overflow-y-auto border-t border-cream/20 lg:absolute lg:inset-0 lg:h-auto" data-view-panel="list" hidden>
<ul>
<li class="flex items-baseline gap-4 border-b border-cream/20 py-3.5" data-hut data-open="sp su au">
<span class="font-serif text-2xl">Lamb's Rest</span>
<span class="label text-[.6rem] text-cream/60">South shore</span>
<span class="ml-auto text-sm text-cream/75">12 beds</span>
</li>
<li class="flex items-baseline gap-4 border-b border-cream/20 py-3.5" data-hut data-open="sp su au wi">
<span class="font-serif text-2xl">Otter Bothy</span>
<span class="label text-[.6rem] text-cream/60">South shore</span>
<span class="ml-auto text-sm text-cream/75">8 beds</span>
</li>
<li class="flex items-baseline gap-4 border-b border-cream/20 py-3.5" data-hut data-open="su">
<span class="font-serif text-2xl">The Fank</span>
<span class="label text-[.6rem] text-cream/60">South shore</span>
<span class="ml-auto text-sm text-cream/75">6 beds</span>
</li>
<li class="flex items-baseline gap-4 border-b border-cream/20 py-3.5" data-hut data-open="sp su au wi">
<span class="font-serif text-2xl">Kettle House</span>
<span class="label text-[.6rem] text-cream/60">Birchwood</span>
<span class="ml-auto text-sm text-cream/75">14 beds</span>
</li>
<li class="flex items-baseline gap-4 border-b border-cream/20 py-3.5" data-hut data-open="sp su au">
<span class="font-serif text-2xl">Birch Hall</span>
<span class="label text-[.6rem] text-cream/60">Birchwood</span>
<span class="ml-auto text-sm text-cream/75">18 beds</span>
</li>
<li class="flex items-baseline gap-4 border-b border-cream/20 py-3.5" data-hut data-open="su au">
<span class="font-serif text-2xl">Sgor Lodge</span>
<span class="label text-[.6rem] text-cream/60">Birchwood</span>
<span class="ml-auto text-sm text-cream/75">10 beds</span>
</li>
<li class="flex items-baseline gap-4 border-b border-cream/20 py-3.5" data-hut data-open="sp su">
<span class="font-serif text-2xl">Ferryman's</span>
<span class="label text-[.6rem] text-cream/60">Birchwood</span>
<span class="ml-auto text-sm text-cream/75">8 beds</span>
</li>
<li class="flex items-baseline gap-4 border-b border-cream/20 py-3.5" data-hut data-open="sp su au wi">
<span class="font-serif text-2xl">Low Byre</span>
<span class="label text-[.6rem] text-cream/60">The Long Glen</span>
<span class="ml-auto text-sm text-cream/75">10 beds</span>
</li>
<li class="flex items-baseline gap-4 border-b border-cream/20 py-3.5" data-hut data-open="su au">
<span class="font-serif text-2xl">Midge Hall</span>
<span class="label text-[.6rem] text-cream/60">The Long Glen</span>
<span class="ml-auto text-sm text-cream/75">16 beds</span>
</li>
<li class="flex items-baseline gap-4 border-b border-cream/20 py-3.5" data-hut data-open="su">
<span class="font-serif text-2xl">The Stell</span>
<span class="label text-[.6rem] text-cream/60">The Long Glen</span>
<span class="ml-auto text-sm text-cream/75">6 beds</span>
</li>
<li class="flex items-baseline gap-4 border-b border-cream/20 py-3.5" data-hut data-open="sp su au wi">
<span class="font-serif text-2xl">Long Glen Hut</span>
<span class="label text-[.6rem] text-cream/60">The Long Glen</span>
<span class="ml-auto text-sm text-cream/75">20 beds</span>
</li>
<li class="flex items-baseline gap-4 border-b border-cream/20 py-3.5" data-hut data-open="sp su au">
<span class="font-serif text-2xl">Wade's Rest</span>
<span class="label text-[.6rem] text-cream/60">The Long Glen</span>
<span class="ml-auto text-sm text-cream/75">12 beds</span>
</li>
<li class="flex items-baseline gap-4 border-b border-cream/20 py-3.5" data-hut data-open="su au">
<span class="font-serif text-2xl">Tarn House</span>
<span class="label text-[.6rem] text-cream/60">Black Water</span>
<span class="ml-auto text-sm text-cream/75">10 beds</span>
</li>
<li class="flex items-baseline gap-4 border-b border-cream/20 py-3.5" data-hut data-open="sp su au wi">
<span class="font-serif text-2xl">Black Water</span>
<span class="label text-[.6rem] text-cream/60">Black Water</span>
<span class="ml-auto text-sm text-cream/75">14 beds</span>
</li>
<li class="flex items-baseline gap-4 border-b border-cream/20 py-3.5" data-hut data-open="sp su au wi">
<span class="font-serif text-2xl">Crook Inn</span>
<span class="label text-[.6rem] text-cream/60">Black Water</span>
<span class="ml-auto text-sm text-cream/75">22 beds</span>
</li>
<li class="flex items-baseline gap-4 border-b border-cream/20 py-3.5" data-hut data-open="su">
<span class="font-serif text-2xl">The Saddle</span>
<span class="label text-[.6rem] text-cream/60">The ridge</span>
<span class="ml-auto text-sm text-cream/75">8 beds</span>
</li>
<li class="flex items-baseline gap-4 border-b border-cream/20 py-3.5" data-hut data-open="sp su au">
<span class="font-serif text-2xl">Heron Hut</span>
<span class="label text-[.6rem] text-cream/60">The ridge</span>
<span class="ml-auto text-sm text-cream/75">10 beds</span>
</li>
<li class="flex items-baseline gap-4 border-b border-cream/20 py-3.5" data-hut data-open="su au">
<span class="font-serif text-2xl">Glass Bothy</span>
<span class="label text-[.6rem] text-cream/60">The ridge</span>
<span class="ml-auto text-sm text-cream/75">6 beds</span>
</li>
<li class="flex items-baseline gap-4 border-b border-cream/20 py-3.5" data-hut data-open="su">
<span class="font-serif text-2xl">High Shieling</span>
<span class="label text-[.6rem] text-cream/60">The ridge</span>
<span class="ml-auto text-sm text-cream/75">12 beds</span>
</li>
<li class="flex items-baseline gap-4 border-b border-cream/20 py-3.5" data-hut data-open="su au wi">
<span class="font-serif text-2xl">Snow Gate</span>
<span class="label text-[.6rem] text-cream/60">North end</span>
<span class="ml-auto text-sm text-cream/75">16 beds</span>
</li>
<li class="flex items-baseline gap-4 border-b border-cream/20 py-3.5" data-hut data-open="sp su au">
<span class="font-serif text-2xl">Lantern Rock</span>
<span class="label text-[.6rem] text-cream/60">North end</span>
<span class="ml-auto text-sm text-cream/75">8 beds</span>
</li>
<li class="flex items-baseline gap-4 border-b border-cream/20 py-3.5" data-hut data-open="su">
<span class="font-serif text-2xl">North Byre</span>
<span class="label text-[.6rem] text-cream/60">North end</span>
<span class="ml-auto text-sm text-cream/75">10 beds</span>
</li>
<li class="flex items-baseline gap-4 border-b border-cream/20 py-3.5" data-hut data-open="su au">
<span class="font-serif text-2xl">Wind Door</span>
<span class="label text-[.6rem] text-cream/60">North end</span>
<span class="ml-auto text-sm text-cream/75">6 beds</span>
</li>
<li class="flex items-baseline gap-4 border-b border-cream/20 py-3.5" data-hut data-open="sp su au wi">
<span class="font-serif text-2xl">Last Light</span>
<span class="label text-[.6rem] text-cream/60">North end</span>
<span class="ml-auto text-sm text-cream/75">14 beds</span>
</li>
</ul>
</div>
<a href="routes.html" class="lead label absolute bottom-2 right-0 hidden lg:inline-flex"><span></span><span>Find a walk</span></a>
</div>
</div>
</section>
<!-- block:end hero -->
<script>
document.querySelectorAll("[data-menu-toggle]").forEach((button) => {
const menu = document.getElementById(button.getAttribute("aria-controls"));
if (!menu) return;
button.addEventListener("click", () => {
const open = button.getAttribute("aria-expanded") === "true";
button.setAttribute("aria-expanded", String(!open));
menu.classList.toggle("hidden", open);
});
});
document.querySelectorAll("[data-huts]").forEach((root) => {
const seasons = root.querySelectorAll("[data-season]");
const views = root.querySelectorAll("[data-view]");
const huts = root.querySelectorAll("[data-hut]");
seasons.forEach((season) => season.addEventListener("click", () => {
seasons.forEach((other) => other.setAttribute("aria-pressed", String(other === season)));
const key = season.dataset.season;
let open = 0;
huts.forEach((hut) => {
const lit = key === "all" || hut.dataset.open.split(" ").includes(key);
if (hut.tagName.toLowerCase() === "circle") { hut.toggleAttribute("data-dim", !lit); if (lit) open += 1; } else { hut.hidden = !lit; }
});
root.querySelector("[data-huts-count]").textContent = open;
}));
views.forEach((view) => view.addEventListener("click", () => {
views.forEach((other) => other.setAttribute("aria-pressed", String(other === view)));
root.querySelectorAll("[data-view-panel]").forEach((panel) => { panel.toggleAttribute("hidden", panel.dataset.viewPanel !== view.dataset.view); });
}));
});
document.querySelectorAll("[data-rail]").forEach((rail) => {
const track = rail.querySelector("[data-rail-track]");
const move = (direction) => track.scrollBy({ left: direction * (track.firstElementChild.clientWidth + 24), behavior: matchMedia("(prefers-reduced-motion: reduce)").matches ? "auto" : "smooth" });
rail.querySelector("[data-rail-prev]")?.addEventListener("click", () => move(-1));
rail.querySelector("[data-rail-next]")?.addEventListener("click", () => move(1));
});
document.querySelectorAll("[data-trip]").forEach((trip) => {
const nightButtons = trip.querySelectorAll("[data-trip-nights]");
const walkersLabel = trip.querySelector("[data-trip-walkers]");
const link = trip.querySelector("[data-trip-link]");
let nights = 5;
let walkers = 2;
const update = () => {
const extra = (key) => { const box = trip.querySelector(`[data-trip-extra="${key}"]`); return box.checked ? Number(box.dataset.price) : 0; };
const total = walkers * nights * (78 + extra("bag") + extra("lunch")) + nights * extra("guide");
walkersLabel.textContent = walkers;
trip.querySelector("[data-trip-total]").textContent = total.toLocaleString("en-GB");
trip.querySelector("[data-trip-each]").textContent = Math.round(total / walkers).toLocaleString("en-GB");
trip.querySelector("[data-trip-nights-label]").textContent = nights;
if (link) link.href = `contact.html?nights=${nights}&walkers=${walkers}`;
};
nightButtons.forEach((button) => button.addEventListener("click", () => {
nights = Number(button.dataset.tripNights);
nightButtons.forEach((other) => other.setAttribute("aria-pressed", String(other === button)));
update();
}));
trip.querySelectorAll("[data-trip-step]").forEach((button) => button.addEventListener("click", () => {
walkers = Math.min(8, Math.max(1, walkers + Number(button.dataset.tripStep)));
update();
}));
trip.addEventListener("change", update);
update();
});
document.querySelectorAll("[data-quotes]").forEach((root) => {
const quotes = JSON.parse(root.querySelector("[data-quotes-data]").textContent);
let index = 0;
root.querySelectorAll("[data-quotes-step]").forEach((button) => button.addEventListener("click", () => {
index = (index + Number(button.dataset.quotesStep) + quotes.length) % quotes.length;
root.querySelector("[data-quotes-quote]").textContent = quotes[index].quote;
root.querySelector("[data-quotes-name]").textContent = quotes[index].name;
root.querySelector("[data-quotes-place]").textContent = quotes[index].place;
root.querySelector("[data-quotes-index]").textContent = index + 1;
}));
});
(() => {
const items = document.querySelectorAll("[data-reveal]");
const skip = navigator.webdriver || !("IntersectionObserver" in window) || matchMedia("(prefers-reduced-motion: reduce)").matches;
if (!items.length || skip) return;
document.documentElement.classList.add("reveal-ready");
const observer = new IntersectionObserver((entries) => {
entries.forEach((entry) => {
if (!entry.isIntersecting) return;
entry.target.classList.add("is-visible");
observer.unobserve(entry.target);
});
}, { rootMargin: "0px 0px -10% 0px" });
items.forEach((item) => observer.observe(item));
})();
</script>
<!-- Optional credit — delete this block if you prefer a clean footer -->
<p class="lt-built-with" style="margin:0;padding:12px 16px;text-align:center;font:500 11px/1.4 system-ui,-apple-system,sans-serif;color:#9ca3af;">Built with <a href="https://letstemplates.com" style="color:#059669;text-decoration:none;">Let's templates</a></p>
</body>
</html>
Premium
Travel
Unlock the entire library of premium templates and blocks. Renews automatically, cancel anytime.