Przejdź do treści
<code>pen.pl

SZLAK — wyprawy poza miasto

Landing page

Podgląd

Ładowanie podglądu…

Poziomy atlas podróży, ilustracje krajobrazu i przełączane trasy.

0,0 / 5 Brak ocen

Kod źródłowy

Licencja MIT — także do użytku komercyjnego. Zachowaj informacje o autorze i licencji.

HTML
<header id="top"><a class="brand" href="#top">SZLAK / poza miastem</a><nav aria-label="Nawigacja"><a href="#kolekcja">Trasy</a><a href="#o-nas">Przygotowanie</a></nav></header><main><section class="travel-hero"><div class="travel-heading" data-reveal><h1>Dalej<br>od codzienności.</h1><p>Wyłącz pośpiech.<br>Zostaw miejsce na drogę.</p></div><div class="travel-strip" data-reveal><figure><svg viewBox="0 0 400 440" role="img" aria-label="Ilustracja górskiego szlaku" xmlns="http://www.w3.org/2000/svg"><rect width="400" height="440" fill="#c4d4d4"></rect><circle cx="300" cy="90" r="42" fill="#ecc576"></circle><path d="M0 290L110 83L229 282L311 133L400 293V440H0Z" fill="#828e87"></path><path d="M65 170l45-87l52 88l-35-15l-22 19l-20-22Z" fill="#f4efe3"></path><path d="M0 345L117 227L193 331L285 202L400 366V440H0Z" fill="#475b57"></path><path d="M0 391Q112 310 198 378T400 347V440H0Z" fill="#263d38"></path><path d="M175 440Q285 370 228 343T262 292" stroke="#d6b894" stroke-width="8" fill="none"></path></svg></figure><figure><svg viewBox="0 0 400 440" role="img" aria-label="Ilustracja górskiego szlaku" xmlns="http://www.w3.org/2000/svg"><rect width="400" height="440" fill="#d9c3b5"></rect><circle cx="300" cy="90" r="42" fill="#ecc576"></circle><path d="M0 290L110 83L229 282L311 133L400 293V440H0Z" fill="#828e87"></path><path d="M65 170l45-87l52 88l-35-15l-22 19l-20-22Z" fill="#f4efe3"></path><path d="M0 345L117 227L193 331L285 202L400 366V440H0Z" fill="#475b57"></path><path d="M0 391Q112 310 198 378T400 347V440H0Z" fill="#263d38"></path><path d="M175 440Q285 370 228 343T262 292" stroke="#d6b894" stroke-width="8" fill="none"></path></svg></figure><figure><svg viewBox="0 0 400 440" role="img" aria-label="Ilustracja górskiego szlaku" xmlns="http://www.w3.org/2000/svg"><rect width="400" height="440" fill="#a9c1cc"></rect><circle cx="300" cy="90" r="42" fill="#ecc576"></circle><path d="M0 290L110 83L229 282L311 133L400 293V440H0Z" fill="#828e87"></path><path d="M65 170l45-87l52 88l-35-15l-22 19l-20-22Z" fill="#f4efe3"></path><path d="M0 345L117 227L193 331L285 202L400 366V440H0Z" fill="#475b57"></path><path d="M0 391Q112 310 198 378T400 347V440H0Z" fill="#263d38"></path><path d="M175 440Q285 370 228 343T262 292" stroke="#d6b894" stroke-width="8" fill="none"></path></svg></figure><div class="travel-caption"><span>Mapa dobrego dnia</span><a href="#kolekcja">Wybierz kierunek ↓</a></div></div></section><section class="section" id="kolekcja"><div class="section-head"><h2>W którą stronę?</h2><div class="actions"><button class="arrow" type="button" data-route-step="-1" aria-label="Poprzednia trasa">←</button><button class="arrow" type="button" data-route-step="1" aria-label="Następna trasa">→</button></div></div><article class="route-card" data-route-card="0"><div><svg viewBox="0 0 400 440" role="img" aria-label="Ilustracja górskiego szlaku" xmlns="http://www.w3.org/2000/svg"><rect width="400" height="440" fill="#c4d4d4"></rect><circle cx="300" cy="90" r="42" fill="#ecc576"></circle><path d="M0 290L110 83L229 282L311 133L400 293V440H0Z" fill="#828e87"></path><path d="M65 170l45-87l52 88l-35-15l-22 19l-20-22Z" fill="#f4efe3"></path><path d="M0 345L117 227L193 331L285 202L400 366V440H0Z" fill="#475b57"></path><path d="M0 391Q112 310 198 378T400 347V440H0Z" fill="#263d38"></path><path d="M175 440Q285 370 228 343T262 292" stroke="#d6b894" stroke-width="8" fill="none"></path></svg></div><div class="route-description"><p class="eyebrow">Trasa 01</p><h3>Przez przełęcz</h3><p>Kamienne ścieżki i szeroki widok. Dzień zaplanowany wokół drogi, nie wokół zegarka.</p></div></article><article class="route-card" data-route-card="1" hidden><div><svg viewBox="0 0 400 440" role="img" aria-label="Ilustracja górskiego szlaku" xmlns="http://www.w3.org/2000/svg"><rect width="400" height="440" fill="#d9c3b5"></rect><circle cx="300" cy="90" r="42" fill="#ecc576"></circle><path d="M0 290L110 83L229 282L311 133L400 293V440H0Z" fill="#828e87"></path><path d="M65 170l45-87l52 88l-35-15l-22 19l-20-22Z" fill="#f4efe3"></path><path d="M0 345L117 227L193 331L285 202L400 366V440H0Z" fill="#475b57"></path><path d="M0 391Q112 310 198 378T400 347V440H0Z" fill="#263d38"></path><path d="M175 440Q285 370 228 343T262 292" stroke="#d6b894" stroke-width="8" fill="none"></path></svg></div><div class="route-description"><p class="eyebrow">Trasa 02</p><h3>Wzdłuż jeziora</h3><p>Leśna ścieżka, woda i miejsce na dłuższy postój. Spokojniejszy wariant wędrówki.</p></div></article><article class="route-card" data-route-card="2" hidden><div><svg viewBox="0 0 400 440" role="img" aria-label="Ilustracja górskiego szlaku" xmlns="http://www.w3.org/2000/svg"><rect width="400" height="440" fill="#a9c1cc"></rect><circle cx="300" cy="90" r="42" fill="#ecc576"></circle><path d="M0 290L110 83L229 282L311 133L400 293V440H0Z" fill="#828e87"></path><path d="M65 170l45-87l52 88l-35-15l-22 19l-20-22Z" fill="#f4efe3"></path><path d="M0 345L117 227L193 331L285 202L400 366V440H0Z" fill="#475b57"></path><path d="M0 391Q112 310 198 378T400 347V440H0Z" fill="#263d38"></path><path d="M175 440Q285 370 228 343T262 292" stroke="#d6b894" stroke-width="8" fill="none"></path></svg></div><div class="route-description"><p class="eyebrow">Trasa 03</p><h3>Na grzbiet</h3><p>Otwarta przestrzeń i długie podejście. Propozycja dla tych, którzy lubią ruszyć wcześniej.</p></div></article><p id="selection-status" role="status">Trasa 1 / 3: Przez przełęcz</p></section><section class="section split" id="o-nas"><h2>Dobry plan.<br>Lekki plecak.</h2><div><p>Przed wyjściem sprawdź pogodę, aktualny przebieg trasy i warunki w terenie. Zostaw komuś informację, dokąd idziesz.</p><ul class="list"><li><b>Mapa offline</b><span>Zapisz trasę przed wyjściem.</span></li><li><b>Woda i warstwy</b><span>Dostosuj wyposażenie do długości wyjścia.</span></li></ul><button class="button" type="button" data-open="Lista przed wyjściem" data-description="Mapa, naładowany telefon, woda, przekąska, warstwa przeciwdeszczowa i plan powrotu. Ta koncepcja przedstawia fikcyjne trasy — zaplanuj rzeczywistą wędrówkę na aktualnej mapie.">Otwórz listę</button></div></section></main><footer><span>SZLAK / kolekcja koncepcyjna</span><a href="#top">Na górę</a></footer><dialog aria-labelledby="dialog-title" aria-describedby="dialog-description"><h2 id="dialog-title">Szczegóły</h2><p id="dialog-description"></p><form method="dialog"><button class="button" type="submit">Zamknij</button></form></dialog>
CSS
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--paper);color:var(--ink);font:16px/1.5 Arial,Helvetica,sans-serif}button,input,select{font:inherit;border-radius:0}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer}a{color:inherit;text-underline-offset:5px}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible{outline:3px solid var(--focus,var(--ink));outline-offset:5px}button:disabled{cursor:default;opacity:.5}h1,h2,h3,p,figure{margin:0}h1,h2{line-height:1;letter-spacing:-.055em}h1{font-size:clamp(54px,8vw,120px)}h2{font-size:clamp(34px,5vw,70px)}h3{font-size:22px;line-height:1.15}p{max-width:60ch}svg{display:block;width:100%;height:auto}header{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:22px 4vw;border-bottom:1px solid var(--line)}.brand{font-size:24px;font-weight:800;text-decoration:none;letter-spacing:-1px}nav{display:flex;gap:24px;flex-wrap:wrap}nav a{min-height:44px;display:inline-flex;align-items:center;text-decoration:none;font-size:14px}nav a:hover{text-decoration:underline}.eyebrow{font:12px/1.4 monospace;letter-spacing:.08em;text-transform:uppercase}.button{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:11px 22px;border:1px solid var(--ink);background:var(--ink);color:var(--paper);text-decoration:none}.button:hover{background:var(--paper);color:var(--ink)}.outline{background:transparent;color:var(--ink)}.section{padding:70px 4vw;border-top:1px solid var(--line)}.section>p{margin:22px 0}.section-head{display:flex;justify-content:space-between;align-items:end;gap:30px;margin-bottom:32px}.section-head p{max-width:36ch}.actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.arrow{width:48px;height:48px;background:transparent;border:1px solid var(--ink);color:var(--ink);font-size:24px}.arrow:hover{background:var(--ink);color:var(--paper)}.muted{color:var(--muted)}.status{font-size:14px}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}footer{display:flex;justify-content:space-between;gap:20px;padding:28px 4vw;border-top:1px solid var(--line);font-size:13px}dialog{padding:32px;border:1px solid var(--ink);max-width:540px;width:calc(100% - 40px);background:var(--paper);color:var(--ink)}dialog::backdrop{background:#1119}dialog h2{font-size:36px;letter-spacing:-.03em}dialog p{margin:24px 0}dialog form{display:flex;justify-content:end}[hidden]{display:none!important}.split{display:grid;grid-template-columns:1fr 1fr;gap:40px}.list{list-style:none;padding:0;margin:0}.list li{padding:22px 0;border-bottom:1px solid var(--line)}.list li b{display:block;font-size:20px}.list li span{color:var(--muted)}@media(max-width:640px){header{padding:14px 5vw;gap:10px;flex-wrap:wrap}nav{gap:18px}.brand{font-size:21px}h1{font-size:clamp(46px,13vw,80px)}.section{padding:44px 5vw}.section-head{align-items:start;flex-direction:column;gap:16px}.split{grid-template-columns:1fr}.button{padding:10px 16px}.section-head h2{font-size:42px}footer{flex-wrap:wrap}}@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation:none!important;transition:none!important}}
body{--paper:#ede8df;--ink:#243b36;--line:#b7c0b6;--muted:#52665c}.brand{font-family:monospace;font-size:19px}.travel-hero{padding:38px 4vw 0}.travel-heading{display:flex;justify-content:space-between;align-items:end;gap:30px;padding-bottom:32px}.travel-heading h1{font-size:clamp(56px,7.7vw,112px);font-weight:750}.travel-heading p{font:italic 23px/1.3 Georgia;max-width:20ch}.travel-strip{display:grid;grid-template-columns:1.2fr .85fr 1fr;gap:12px;position:relative;padding-bottom:62px}.travel-strip figure{height:320px;overflow:hidden}.travel-strip figure:nth-child(2){padding-top:45px}.travel-strip figure:nth-child(3){padding-top:90px}.travel-strip svg{height:100%;object-fit:cover}.travel-caption{position:absolute;bottom:10px;left:0;right:0;display:flex;justify-content:space-between;font:13px monospace}.route-card{display:grid;grid-template-columns:1fr 1fr;background:#deded2}.route-card svg{max-height:460px}.route-description{padding:44px}.route-description h3{font:48px/1.1 Georgia;margin:20px 0}.route-description p{max-width:32ch}#selection-status{margin-top:16px}.travel-strip figure:hover svg{transform:scale(1.06);transition:transform .6s}@media(max-width:640px){.travel-heading{display:block}.travel-heading h1{font-size:13vw}.travel-heading p{margin-top:22px;font-size:20px}.travel-strip{gap:7px}.travel-strip figure{height:230px}.travel-strip figure:nth-child(2){padding-top:20px}.travel-strip figure:nth-child(3){padding-top:40px}.travel-caption{font-size:11px}.route-card{grid-template-columns:1fr}.route-description{padding:25px}.route-description h3{font-size:36px}}
JavaScript
const reduced = matchMedia('(prefers-reduced-motion: reduce)').matches;
const dialog = document.querySelector('dialog');
$('[data-open]').on('click', function () {
  $('#dialog-title').text($(this).attr('data-open'));
  $('#dialog-description').text($(this).attr('data-description'));
  dialog.showModal();
});
if (!reduced) document.querySelectorAll('[data-reveal]').forEach((el, i) => el.animate([{opacity:0,transform:'translateY(24px)'},{opacity:1,transform:'translateY(0)'}],{duration:650,delay:i*70,easing:'cubic-bezier(.2,.7,.2,1)'}));

let route=0;const routeNames=['Przez przełęcz','Wzdłuż jeziora','Na grzbiet'];$('[data-route-step]').on('click',function(){route=(route+Number(this.dataset.routeStep)+3)%3;$('[data-route-card]').prop('hidden',true).filter(`[data-route-card="${route}"]`).prop('hidden',false);$('#selection-status').text(`Trasa ${route+1} / 3: ${routeNames[route]}`);});
Biblioteki

JavaScript

Edytuj swój pen

Podaj adres e-mail użyty przy zapisie. Wyślemy link do edycji.

Link jest ważny przez 30 minut.