Redesign landing page around the 2π work cycle
- Replace fabricated proof (testimonials, AI portraits, case images, unsourced metrics) with the real offer: a small senior team present for the whole turn, a written proposal, and iterative delivery. - New cycle diagram built from the logo's arcs: four stages with an inner iteration loop that turns while the iterations stage is read. - Accessible contact form (email type, autocomplete, announced errors, sending state, honeypot, captcha on) and no PII sent to PostHog. - English version at /en/ and /en/thanks/, all copy in _data/i18n.js. - Contrast fixes, mobile menu, self-hosted Schibsted Grotesk. - Add PRODUCT.md and DESIGN.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
45
src/_includes/cycle.njk
Normal file
45
src/_includes/cycle.njk
Normal file
@@ -0,0 +1,45 @@
|
||||
{#
|
||||
The 2π cycle: being present for the whole turn.
|
||||
Outer ring = the logo's two arcs (orange, blue) with four stages at 0°, 90°, 180°, 270°.
|
||||
At 180° an inner loop, tangent to the ring, is the iteration engine: a small 2π that turns
|
||||
many times (refine → build → deliver). Labels sit inside the ring.
|
||||
Geometry: viewBox 600×600, centre (300,300), ring radius 250; loop centre (300,460), radius 90.
|
||||
#}
|
||||
{% macro cycle(c, id, draw=false, sticky=false) %}
|
||||
{% set nodes = [
|
||||
{ x: 300, y: 50, lx: 300, ly: 140, side: "a" },
|
||||
{ x: 550, y: 300, lx: 455, ly: 352, side: "a" },
|
||||
{ x: 300, y: 550, lx: 300, ly: 452, side: "a" },
|
||||
{ x: 50, y: 300, lx: 145, ly: 352, side: "b" }
|
||||
] %}
|
||||
{% set degs = ["0°", "90°", "180°", "270°"] %}
|
||||
<svg class="cycle{% if draw %} cycle-draw{% endif %}" id="{{ id }}" viewBox="-12 -12 624 624" role="img" aria-labelledby="{{ id }}-title {{ id }}-desc"{% if sticky %} data-active="0"{% endif %}>
|
||||
<title id="{{ id }}-title">{{ c.title }}</title>
|
||||
<desc id="{{ id }}-desc">{{ c.desc }}</desc>
|
||||
<path class="arc arc-a" pathLength="1" d="M 326.1 51.4 A 250 250 0 0 1 326.1 548.6" />
|
||||
<path class="arc arc-b" pathLength="1" d="M 273.9 548.6 A 250 250 0 0 1 273.9 51.4" />
|
||||
|
||||
{# Iteration loop: a small 2π inside the ring #}
|
||||
<g class="loop" aria-hidden="true">
|
||||
<g class="loop-spin">
|
||||
<path class="arc loop-arc arc-a" pathLength="1" d="M 312.5 370.9 A 90 90 0 0 1 312.5 549.1" />
|
||||
<path class="arc loop-arc arc-b" pathLength="1" d="M 287.5 549.1 A 90 90 0 0 1 287.5 370.9" />
|
||||
</g>
|
||||
</g>
|
||||
|
||||
{% for n in nodes %}
|
||||
<g class="stage stage-{{ loop.index0 }}" aria-hidden="true">
|
||||
<g class="node node-{{ n.side }}"><circle cx="{{ n.x }}" cy="{{ n.y }}" r="11" /></g>
|
||||
<text class="label" x="{{ n.lx }}" y="{{ n.ly }}" text-anchor="middle">{{ c.labels[loop.index0] }}</text>
|
||||
<text class="deg" x="{{ n.lx }}" y="{{ n.ly + 26 }}" text-anchor="middle">{{ degs[loop.index0] }}</text>
|
||||
</g>
|
||||
{% endfor %}
|
||||
{% if sticky %}
|
||||
<text class="loop-count" x="300" y="505" text-anchor="middle" aria-hidden="true" data-loop-count data-word="{{ c.iteration }}">×N</text>
|
||||
{% endif %}
|
||||
<g aria-hidden="true">
|
||||
<text class="pi" x="300" y="268" text-anchor="middle">2π</text>
|
||||
<text class="center" x="300" y="302" text-anchor="middle">{{ c.center }}</text>
|
||||
</g>
|
||||
</svg>
|
||||
{% endmacro %}
|
||||
55
src/_includes/head.njk
Normal file
55
src/_includes/head.njk
Normal file
@@ -0,0 +1,55 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ pageTitle }}</title>
|
||||
<meta name="description" content="{{ t.meta.description }}">
|
||||
<meta name="theme-color" content="#fbfcfe">
|
||||
<link rel="canonical" href="{{ site.url }}{{ page.url }}">
|
||||
{% if noindex %}<meta name="robots" content="noindex">{% else %}
|
||||
<link rel="alternate" hreflang="es" href="{{ site.url }}/">
|
||||
<link rel="alternate" hreflang="en" href="{{ site.url }}/en/">
|
||||
<link rel="alternate" hreflang="x-default" href="{{ site.url }}/">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:site_name" content="2piDev">
|
||||
<meta property="og:title" content="{{ t.meta.title }}">
|
||||
<meta property="og:description" content="{{ t.meta.description }}">
|
||||
<meta property="og:url" content="{{ site.url }}{{ page.url }}">
|
||||
<meta property="og:locale" content="{{ 'es_419' if t.htmlLang == 'es' else 'en_US' }}">{% endif %}
|
||||
<link rel="icon" href="/images/favicon.svg" type="image/svg+xml">
|
||||
<link rel="preload" href="/fonts/schibsted-latin.woff2" as="font" type="font/woff2" crossorigin>
|
||||
<link rel="stylesheet" href="/css/styles.css">
|
||||
{% if site.posthogKey %}
|
||||
<script>
|
||||
!function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.crossOrigin="anonymous",p.async=!0,p.src=s.api_host+"/static/array.full.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags getSurveys getActiveMatchingSurveys captureException".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);
|
||||
posthog.init('{{ site.posthogKey }}', {
|
||||
api_host: '{{ site.posthogHost }}',
|
||||
capture_performance: true,
|
||||
disable_session_recording: false,
|
||||
})
|
||||
posthog.capture('$pageview', { lang: '{{ t.htmlLang }}' });
|
||||
</script>
|
||||
{% endif %}
|
||||
<!-- OpenReplay Tracking Code -->
|
||||
<script>
|
||||
var initOpts = {
|
||||
projectKey: "5o5HLGZhn4TlGBbOFkVu",
|
||||
// 0 - plain, 1 - obscured, 2 - ignored
|
||||
defaultInputMode: 2,
|
||||
obscureTextNumbers: false,
|
||||
obscureTextEmails: true,
|
||||
};
|
||||
var startOpts = { userID: "" };
|
||||
(function(A,s,a,y,e,r){
|
||||
r=window.OpenReplay=[e,r,y,[s-1, e]];
|
||||
s=document.createElement('script');s.src=A;s.async=!a;
|
||||
document.getElementsByTagName('head')[0].appendChild(s);
|
||||
r.start=function(v){r.push([0])};
|
||||
r.stop=function(v){r.push([1])};
|
||||
r.setUserID=function(id){r.push([2,id])};
|
||||
r.setUserAnonymousID=function(id){r.push([3,id])};
|
||||
r.setMetadata=function(k,v){r.push([4,k,v])};
|
||||
r.event=function(k,p,i){r.push([5,k,p,i])};
|
||||
r.issue=function(k,p){r.push([6,k,p])};
|
||||
r.isActive=function(){return false};
|
||||
r.getSessionToken=function(){};
|
||||
})("//static.openreplay.com/latest/openreplay.js",1,0,initOpts,startOpts);
|
||||
</script>
|
||||
406
src/_includes/landing.njk
Normal file
406
src/_includes/landing.njk
Normal file
@@ -0,0 +1,406 @@
|
||||
{% from "cycle.njk" import cycle %}
|
||||
{% set t = i18n[lang] %}
|
||||
{% set pageTitle = t.meta.title %}
|
||||
{% macro nodeIcon() %}<svg viewBox="0 0 16 16" aria-hidden="true"><circle cx="8" cy="8" r="5" fill="#fff" stroke="#0b1220" stroke-width="2"/></svg>{% endmacro %}
|
||||
{% macro arrow() %}<svg class="arrow h-4 w-4" viewBox="0 0 16 16" fill="none" aria-hidden="true"><path d="M3 8h9.5M8.5 4l4 4-4 4" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg>{% endmacro %}
|
||||
<!doctype html>
|
||||
<html lang="{{ t.htmlLang }}">
|
||||
<head>
|
||||
{% include "head.njk" %}
|
||||
</head>
|
||||
<body>
|
||||
<a class="skip-link" href="#main">{{ t.nav.skip }}</a>
|
||||
|
||||
<header class="site-header" data-header>
|
||||
<div class="shell flex h-full items-center justify-between gap-4">
|
||||
<a href="{{ t.home }}" class="flex items-center gap-2.5 rounded-md" aria-label="{{ t.nav.home }}">
|
||||
<img src="/images/logo-64x64.png" width="32" height="32" alt="" class="h-8 w-8">
|
||||
<span class="text-lg font-semibold tracking-[-0.02em]">2piDev</span>
|
||||
</a>
|
||||
<nav class="hidden items-center md:flex" aria-label="{{ t.nav.main }}">
|
||||
<a class="nav-link" href="#process">{{ t.nav.process }}</a>
|
||||
<a class="nav-link" href="#services">{{ t.nav.services }}</a>
|
||||
<a class="nav-link" href="#team">{{ t.nav.team }}</a>
|
||||
<a class="nav-link" href="#faq">{{ t.nav.faq }}</a>
|
||||
</nav>
|
||||
<div class="flex items-center gap-1.5">
|
||||
<button class="menu-btn md:hidden" type="button" aria-expanded="false" aria-controls="mobile-nav" data-menu-btn>
|
||||
<span class="sr-only">{{ t.nav.menu }}</span>
|
||||
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="none" aria-hidden="true"><path class="menu-open" d="M3 6.5h14M3 13.5h14" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"/><path class="menu-close" d="M5 5l10 10M15 5L5 15" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"/></svg>
|
||||
</button>
|
||||
<a class="lang-link" href="{{ t.alt.href }}" hreflang="{{ t.alt.lang }}" lang="{{ t.alt.lang }}" aria-label="{{ t.alt.name }}">{{ t.alt.label }}</a>
|
||||
<a class="btn-primary btn-small" href="#contact" data-cta="header">{{ t.nav.cta }}</a>
|
||||
</div>
|
||||
</div>
|
||||
<nav class="mobile-nav md:hidden" id="mobile-nav" aria-label="{{ t.nav.main }}" hidden data-mobile-nav>
|
||||
<div class="shell flex flex-col py-2">
|
||||
<a href="#process">{{ t.nav.process }}</a>
|
||||
<a href="#services">{{ t.nav.services }}</a>
|
||||
<a href="#team">{{ t.nav.team }}</a>
|
||||
<a href="#faq">{{ t.nav.faq }}</a>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main id="main">
|
||||
{# ---------- Hero ---------- #}
|
||||
<section class="pb-20 pt-10 sm:pt-16 lg:pb-28 lg:pt-20">
|
||||
<div class="shell grid items-center gap-14 lg:grid-cols-[1.12fr_0.88fr] lg:gap-12">
|
||||
<div>
|
||||
<h1 class="display max-w-[15ch]">{{ t.hero.title }}</h1>
|
||||
<p class="lede mt-6 max-w-[35rem]">{{ t.hero.lede }}</p>
|
||||
<div class="mt-9 flex flex-col gap-3 sm:flex-row">
|
||||
<a class="btn-primary" href="#contact" data-cta="hero">{{ t.hero.primary }} {{ arrow() }}</a>
|
||||
<a class="btn-secondary" href="#process" data-cta="hero-secondary">{{ t.hero.secondary }}</a>
|
||||
</div>
|
||||
<ul class="mt-9 flex flex-col gap-3 sm:flex-row sm:gap-7">
|
||||
<li class="promise">{{ nodeIcon() }}{{ t.hero.promises[0] }}</li>
|
||||
<li class="promise">{{ nodeIcon() }}{{ t.hero.promises[1] }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="mx-auto w-full max-w-[26rem] sm:max-w-[30rem] lg:max-w-[33rem]">
|
||||
{{ cycle(t.cycle, "cycle-hero", true) }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{# ---------- Problem ---------- #}
|
||||
<section class="section border-y border-line bg-white" aria-labelledby="problem-title">
|
||||
<div class="shell grid gap-10 lg:grid-cols-12 lg:gap-16">
|
||||
<h2 id="problem-title" class="h2 lg:col-span-5">{{ t.problem.title }}</h2>
|
||||
<ul class="row-list lg:col-span-7">
|
||||
{% for item in t.problem.items %}
|
||||
<li class="grid gap-2 py-7 sm:grid-cols-[12rem_1fr] sm:gap-8">
|
||||
<h3 class="text-lg font-semibold tracking-[-0.01em] text-ink">{{ item.title }}</h3>
|
||||
<p class="leading-7 text-muted">{{ item.text }}</p>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{# ---------- Process ---------- #}
|
||||
<section id="process" class="section" aria-labelledby="process-title">
|
||||
<div class="shell">
|
||||
<div class="max-w-[40rem]">
|
||||
<h2 id="process-title" class="h2">{{ t.process.title }}</h2>
|
||||
<p class="lede mt-5">{{ t.process.lede }}</p>
|
||||
</div>
|
||||
<div class="mt-14 grid gap-12 lg:mt-20 lg:grid-cols-12 lg:gap-16">
|
||||
<div class="hidden lg:col-span-5 lg:block">
|
||||
<div class="sticky top-28">
|
||||
{{ cycle(t.cycle, "cycle-process", false, true) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="lg:col-span-7">
|
||||
<ol data-stages>
|
||||
{% for s in t.process.stages %}
|
||||
<li class="stage-item" data-stage="{{ loop.index0 }}">
|
||||
<div class="grid grid-cols-[3.75rem_1fr] items-baseline sm:grid-cols-[4.5rem_1fr]">
|
||||
<span class="stage-deg {{ 'text-orange-text' if loop.index0 < 3 else 'text-blue-text' }}">{{ s.deg }}</span>
|
||||
<h3 class="stage-title text-2xl font-semibold tracking-[-0.025em] text-ink">{{ s.title }}</h3>
|
||||
</div>
|
||||
<div class="pl-[3.75rem] sm:pl-[4.5rem]">
|
||||
<p class="mt-3 max-w-[34rem] leading-7 text-ink-2">{{ s.text }}</p>
|
||||
{% if s.steps %}
|
||||
<ol class="iter-steps mt-6 max-w-[34rem]">
|
||||
{% for st in s.steps %}
|
||||
<li class="grid grid-cols-[1.5rem_1fr] items-baseline gap-x-2 py-3 sm:grid-cols-[1.5rem_7.5rem_1fr]">
|
||||
<span class="tnum text-sm font-medium text-muted">{{ loop.index }}</span>
|
||||
<span class="font-medium text-ink">{{ st.title }}</span>
|
||||
<span class="col-start-2 text-[0.9375rem] leading-6 text-muted sm:col-start-3">{{ st.text }}</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
<li class="iter-repeat grid grid-cols-[1.5rem_1fr] items-center gap-x-2 py-3 text-[0.9375rem] text-ink-2">
|
||||
<svg class="h-4 w-4" viewBox="0 0 16 16" fill="none" aria-hidden="true"><path d="M8 2.5a5.5 5.5 0 0 1 5.5 5.5" stroke="#ff7f2a" stroke-width="1.8" stroke-linecap="round"/><path d="M13.5 8A5.5 5.5 0 0 1 8 13.5" stroke="#ff7f2a" stroke-width="1.8" stroke-linecap="round"/><path d="M8 13.5A5.5 5.5 0 0 1 2.5 8" stroke="#0079ff" stroke-width="1.8" stroke-linecap="round"/><path d="M2.5 8A5.5 5.5 0 0 1 8 2.5" stroke="#0079ff" stroke-width="1.8" stroke-linecap="round"/></svg>
|
||||
<span>{{ t.process.repeat }}</span>
|
||||
</li>
|
||||
</ol>
|
||||
{% endif %}
|
||||
<p class="mt-5 flex max-w-[34rem] flex-col gap-1 border-t border-dashed border-line pt-4 text-[0.9375rem] sm:flex-row sm:gap-4">
|
||||
<span class="flex-none font-medium text-ink">{{ t.process.receive }}</span>
|
||||
<span class="text-muted">{{ s.gets }}</span>
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
<p class="mt-4 grid grid-cols-[3.75rem_1fr] items-start border-t border-line pt-10 text-lg font-medium tracking-[-0.01em] text-ink sm:grid-cols-[4.5rem_1fr]">
|
||||
<svg class="mt-1 h-5 w-5 flex-none" viewBox="0 0 20 20" fill="none" aria-hidden="true"><path d="M16.5 10A6.5 6.5 0 1 1 13.8 4.7" stroke="#0b1220" stroke-width="1.8" stroke-linecap="round"/><path d="M14.2 1.8l-.3 3.1-3.1-.3" stroke="#0b1220" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||||
<span>{{ t.process.close }}</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{# ---------- Team ---------- #}
|
||||
<section id="team" class="section border-y border-line bg-white" aria-labelledby="team-title">
|
||||
<div class="shell grid gap-12 lg:grid-cols-12 lg:gap-16">
|
||||
<div class="lg:col-span-6">
|
||||
<h2 id="team-title" class="h2 max-w-[18ch]">{{ t.team.title }}</h2>
|
||||
<p class="lede mt-5 max-w-[34rem]">{{ t.team.lede }}</p>
|
||||
</div>
|
||||
<dl class="row-list lg:col-span-6">
|
||||
{% for p in t.team.points %}
|
||||
<div class="py-6">
|
||||
<dt class="text-lg font-semibold tracking-[-0.01em] text-ink">{{ p.title }}</dt>
|
||||
<dd class="mt-1.5 leading-7 text-muted">{{ p.text }}</dd>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{# ---------- Services ---------- #}
|
||||
<section id="services" class="section" aria-labelledby="services-title">
|
||||
<div class="shell">
|
||||
<div class="max-w-[40rem]">
|
||||
<h2 id="services-title" class="h2">{{ t.services.title }}</h2>
|
||||
<p class="lede mt-5">{{ t.services.lede }}</p>
|
||||
</div>
|
||||
<ul class="row-list mt-12">
|
||||
{% for s in t.services.items %}
|
||||
<li class="grid gap-1.5 py-6 sm:grid-cols-[minmax(0,20rem)_1fr] sm:gap-10">
|
||||
<h3 class="text-lg font-semibold tracking-[-0.01em] text-ink">{{ s.title }}</h3>
|
||||
<p class="leading-7 text-muted">{{ s.text }}</p>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="mt-14 flex flex-col gap-6 lg:flex-row lg:items-center lg:justify-between">
|
||||
<p class="text-[0.9375rem] font-medium text-ink-2">{{ t.services.stackTitle }}</p>
|
||||
<ul class="flex flex-wrap items-center gap-x-8 gap-y-4">
|
||||
{% for tech in [["tech-dotnet.svg", ".NET"], ["tech-typescript.svg", "TypeScript"], ["tech-react.svg", "React"], ["tech-postgres.svg", "PostgreSQL"], ["tech-aws.svg", "AWS"]] %}
|
||||
<li class="flex items-center gap-2.5 text-[0.9375rem] font-medium text-ink">
|
||||
<img src="/images/{{ tech[0] }}" alt="" width="24" height="24" class="tech-mark h-6 w-6 object-contain">{{ tech[1] }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{# ---------- FAQ ---------- #}
|
||||
<section id="faq" class="section border-t border-line bg-white" aria-labelledby="faq-title">
|
||||
<div class="shell grid gap-10 lg:grid-cols-12 lg:gap-16">
|
||||
<h2 id="faq-title" class="h2 lg:col-span-4">{{ t.faq.title }}</h2>
|
||||
<div class="faq row-list lg:col-span-8">
|
||||
{% for f in t.faq.items %}
|
||||
<details{% if loop.first %} open{% endif %}>
|
||||
<summary>{{ f.q }}<span class="plus" aria-hidden="true"></span></summary>
|
||||
<p class="-mt-2 max-w-[40rem] pb-7 leading-7 text-ink-2">{{ f.a }}</p>
|
||||
</details>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{# ---------- Contact ---------- #}
|
||||
{% set fm = t.contact.form %}
|
||||
<section id="contact" class="night section" aria-labelledby="contact-title">
|
||||
<div class="shell grid gap-14 lg:grid-cols-12 lg:gap-16">
|
||||
<div class="lg:col-span-5">
|
||||
<h2 id="contact-title" class="h2 text-white">{{ t.contact.title }}</h2>
|
||||
<p class="lede mt-5 !text-night-text">{{ t.contact.lede }}</p>
|
||||
<ul class="mt-9 space-y-3.5">
|
||||
{% for p in t.contact.promises %}
|
||||
<li class="flex items-start gap-3 text-night-text">
|
||||
<svg class="mt-1 h-4 w-4 flex-none" viewBox="0 0 16 16" fill="none" aria-hidden="true"><path d="M3 8.5l3.2 3L13 4.5" stroke="#c3cad8" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||||
{{ p }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<p class="mt-10 text-night-muted">{{ t.contact.orEmail }} <a class="night-link" href="mailto:{{ site.email }}">{{ site.email }}</a></p>
|
||||
</div>
|
||||
|
||||
<form class="lg:col-span-7" action="https://formsubmit.co/{{ site.email }}" method="POST" data-contact-form
|
||||
data-sending="{{ fm.sending }}"
|
||||
data-err-name="{{ fm.errors.name }}" data-err-email="{{ fm.errors.email }}"
|
||||
data-err-message="{{ fm.errors.message }}" data-err-summary="{{ fm.errors.summary }}">
|
||||
<input type="hidden" name="_next" value="{{ t.thanksUrl }}">
|
||||
<input type="hidden" name="_subject" value="{{ fm.subject }}">
|
||||
<input type="hidden" name="_template" value="table">
|
||||
<input type="hidden" name="idioma" value="{{ t.htmlLang }}">
|
||||
<div class="absolute -left-[9999px] h-px w-px overflow-hidden" aria-hidden="true">
|
||||
<label>Leave empty <input type="text" name="_honey" tabindex="-1" autocomplete="off"></label>
|
||||
</div>
|
||||
|
||||
<div class="form-summary mb-6" role="alert" tabindex="-1" data-form-summary hidden></div>
|
||||
|
||||
<div class="grid gap-5 sm:grid-cols-2">
|
||||
<div>
|
||||
<label class="field-label" for="f-name">{{ fm.name }}</label>
|
||||
<input class="field" id="f-name" name="nombre" type="text" autocomplete="name" required maxlength="120" placeholder="{{ fm.namePh }}" aria-describedby="f-name-error">
|
||||
<p class="field-error" id="f-name-error" hidden></p>
|
||||
</div>
|
||||
<div>
|
||||
<label class="field-label" for="f-company">{{ fm.company }} <span class="field-hint">{{ fm.companyHint }}</span></label>
|
||||
<input class="field" id="f-company" name="empresa" type="text" autocomplete="organization" maxlength="160" placeholder="{{ fm.companyPh }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-5">
|
||||
<label class="field-label" for="f-email">{{ fm.email }}</label>
|
||||
<input class="field" id="f-email" name="email" type="email" inputmode="email" autocomplete="email" autocapitalize="off" spellcheck="false" required maxlength="200" placeholder="{{ fm.emailPh }}" aria-describedby="f-email-error">
|
||||
<p class="field-error" id="f-email-error" hidden></p>
|
||||
</div>
|
||||
<div class="mt-5">
|
||||
<label class="field-label" for="f-message">{{ fm.message }}</label>
|
||||
<textarea class="field min-h-[9rem] resize-y" id="f-message" name="mensaje" rows="5" required maxlength="4000" placeholder="{{ fm.messagePh }}" aria-describedby="f-message-error"></textarea>
|
||||
<p class="field-error" id="f-message-error" hidden></p>
|
||||
</div>
|
||||
<button class="btn-submit mt-7" type="submit" data-submit>
|
||||
<span class="spinner" aria-hidden="true"></span>
|
||||
<span data-submit-label>{{ fm.submit }}</span>
|
||||
</button>
|
||||
<p class="mt-5 max-w-[36rem] text-sm leading-6 text-night-muted">{{ fm.privacy }}</p>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer class="night border-t border-white/10">
|
||||
<div class="shell flex flex-col gap-6 py-10 sm:flex-row sm:items-center sm:justify-between">
|
||||
<div class="flex items-center gap-3">
|
||||
<img src="/images/logo-64x64.png" width="28" height="28" alt="" class="h-7 w-7">
|
||||
<p class="text-sm text-night-muted"><span class="font-semibold text-white">2piDev</span> · {{ t.footer.rights }}</p>
|
||||
</div>
|
||||
<div class="flex items-center gap-6 text-sm text-night-muted">
|
||||
<a class="hover:text-white" href="mailto:{{ site.email }}">{{ site.email }}</a>
|
||||
<a class="hover:text-white" href="{{ t.alt.href }}" hreflang="{{ t.alt.lang }}" lang="{{ t.alt.lang }}">{{ t.alt.name }}</a>
|
||||
<span class="tnum">© {{ site.year }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
(function () {
|
||||
// Header hairline once the page scrolls
|
||||
var header = document.querySelector('[data-header]');
|
||||
function onScroll() { header.toggleAttribute('data-scrolled', window.scrollY > 8); }
|
||||
onScroll();
|
||||
window.addEventListener('scroll', onScroll, { passive: true });
|
||||
|
||||
// Mobile menu
|
||||
var menuBtn = document.querySelector('[data-menu-btn]');
|
||||
var menu = document.querySelector('[data-mobile-nav]');
|
||||
function setMenu(open) {
|
||||
menuBtn.setAttribute('aria-expanded', open ? 'true' : 'false');
|
||||
menu.hidden = !open;
|
||||
}
|
||||
menuBtn.addEventListener('click', function () { setMenu(menu.hidden); });
|
||||
menu.addEventListener('click', function (e) { if (e.target.closest('a')) setMenu(false); });
|
||||
document.addEventListener('keydown', function (e) {
|
||||
if (e.key === 'Escape' && !menu.hidden) { setMenu(false); menuBtn.focus(); }
|
||||
});
|
||||
window.matchMedia('(min-width: 768px)').addEventListener('change', function (m) { if (m.matches) setMenu(false); });
|
||||
|
||||
// Sticky cycle follows the stage being read
|
||||
var cycleEl = document.getElementById('cycle-process');
|
||||
var stages = document.querySelectorAll('[data-stage]');
|
||||
if (cycleEl && stages.length && 'IntersectionObserver' in window) {
|
||||
var io = new IntersectionObserver(function (entries) {
|
||||
entries.forEach(function (entry) {
|
||||
if (!entry.isIntersecting) return;
|
||||
var i = entry.target.getAttribute('data-stage');
|
||||
cycleEl.setAttribute('data-active', i);
|
||||
stages.forEach(function (s) { s.toggleAttribute('data-current', s === entry.target); });
|
||||
});
|
||||
}, { rootMargin: '-40% 0px -59% 0px' });
|
||||
stages.forEach(function (s) { io.observe(s); });
|
||||
|
||||
// While the iterations stage is being read, the inner loop turns and counts
|
||||
var counter = cycleEl.querySelector('[data-loop-count]');
|
||||
var still = window.matchMedia('(prefers-reduced-motion: reduce)');
|
||||
var timer = null, turn = 0;
|
||||
function tick() { turn += 1; counter.textContent = counter.dataset.word + ' ' + turn; }
|
||||
new MutationObserver(function () {
|
||||
var on = cycleEl.getAttribute('data-active') === '2' && !still.matches;
|
||||
if (on && !timer) { turn = 0; tick(); timer = setInterval(tick, 1800); }
|
||||
if (!on && timer) { clearInterval(timer); timer = null; }
|
||||
}).observe(cycleEl, { attributes: true, attributeFilter: ['data-active'] });
|
||||
}
|
||||
|
||||
// Contact form: accessible validation and sending state
|
||||
var form = document.querySelector('[data-contact-form]');
|
||||
if (!form) return;
|
||||
form.setAttribute('novalidate', '');
|
||||
var summary = form.querySelector('[data-form-summary]');
|
||||
var submit = form.querySelector('[data-submit]');
|
||||
var submitLabel = form.querySelector('[data-submit-label]');
|
||||
var emailRe = /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/;
|
||||
var fields = [
|
||||
{ el: form.querySelector('#f-name'), msg: form.dataset.errName, ok: function (v) { return v.length > 0; } },
|
||||
{ el: form.querySelector('#f-email'), msg: form.dataset.errEmail, ok: function (v) { return emailRe.test(v); } },
|
||||
{ el: form.querySelector('#f-message'), msg: form.dataset.errMessage, ok: function (v) { return v.length > 0; } }
|
||||
];
|
||||
|
||||
function setError(f, show) {
|
||||
var err = document.getElementById(f.el.id + '-error');
|
||||
if (show) {
|
||||
f.el.setAttribute('aria-invalid', 'true');
|
||||
err.textContent = f.msg;
|
||||
err.hidden = false;
|
||||
} else {
|
||||
f.el.removeAttribute('aria-invalid');
|
||||
err.hidden = true;
|
||||
}
|
||||
}
|
||||
|
||||
fields.forEach(function (f) {
|
||||
f.el.addEventListener('input', function () {
|
||||
if (f.el.getAttribute('aria-invalid') === 'true' && f.ok(f.el.value.trim())) setError(f, false);
|
||||
});
|
||||
});
|
||||
|
||||
form.addEventListener('submit', function (e) {
|
||||
if (submit.getAttribute('aria-busy') === 'true') { e.preventDefault(); return; }
|
||||
var firstBad = null;
|
||||
fields.forEach(function (f) {
|
||||
var bad = !f.ok(f.el.value.trim());
|
||||
setError(f, bad);
|
||||
if (bad && !firstBad) firstBad = f;
|
||||
});
|
||||
if (firstBad) {
|
||||
e.preventDefault();
|
||||
summary.textContent = form.dataset.errSummary;
|
||||
summary.hidden = false;
|
||||
firstBad.el.focus();
|
||||
return;
|
||||
}
|
||||
summary.hidden = true;
|
||||
submit.setAttribute('aria-busy', 'true');
|
||||
submitLabel.textContent = form.dataset.sending;
|
||||
if (window.posthog) window.posthog.capture('contact_form_submitted', { lang: document.documentElement.lang });
|
||||
});
|
||||
|
||||
// Restore the button if the visitor comes back with the browser's back button
|
||||
var idleLabel = submitLabel.textContent;
|
||||
window.addEventListener('pageshow', function () {
|
||||
submit.removeAttribute('aria-busy');
|
||||
submitLabel.textContent = idleLabel;
|
||||
});
|
||||
|
||||
// Analytics without personal data
|
||||
if (window.posthog) {
|
||||
document.addEventListener('click', function (e) {
|
||||
var link = e.target.closest('[data-cta]');
|
||||
if (link) window.posthog.capture('cta_click', { cta: link.getAttribute('data-cta'), lang: document.documentElement.lang });
|
||||
});
|
||||
if ('IntersectionObserver' in window) {
|
||||
var seen = {};
|
||||
var so = new IntersectionObserver(function (entries) {
|
||||
entries.forEach(function (entry) {
|
||||
var id = entry.target.id;
|
||||
if (entry.isIntersecting && !seen[id]) { seen[id] = true; window.posthog.capture('section_view', { section: id }); }
|
||||
});
|
||||
}, { threshold: 0.3 });
|
||||
['process', 'team', 'services', 'faq', 'contact'].forEach(function (id) {
|
||||
var el = document.getElementById(id);
|
||||
if (el) so.observe(el);
|
||||
});
|
||||
}
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
43
src/_includes/thanks.njk
Normal file
43
src/_includes/thanks.njk
Normal file
@@ -0,0 +1,43 @@
|
||||
{% set t = i18n[lang] %}
|
||||
{% set pageTitle = t.thanks.title %}
|
||||
<!doctype html>
|
||||
<html lang="{{ t.htmlLang }}">
|
||||
<head>
|
||||
{% include "head.njk" %}
|
||||
</head>
|
||||
<body class="flex min-h-screen flex-col">
|
||||
<header class="site-header border-line" data-scrolled>
|
||||
<div class="shell flex h-full items-center justify-between gap-4">
|
||||
<a href="{{ t.home }}" class="flex items-center gap-2.5 rounded-md" aria-label="{{ t.nav.home }}">
|
||||
<img src="/images/logo-64x64.png" width="32" height="32" alt="" class="h-8 w-8">
|
||||
<span class="text-lg font-semibold tracking-[-0.02em]">2piDev</span>
|
||||
</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="flex flex-1 items-center py-16 sm:py-24">
|
||||
<div class="shell grid items-center gap-14 lg:grid-cols-12 lg:gap-16">
|
||||
<div class="lg:col-span-7">
|
||||
<svg class="h-14 w-14" viewBox="0 0 56 56" fill="none" aria-hidden="true">
|
||||
<path d="M28 4a24 24 0 0 1 24 24" stroke="#ff7f2a" stroke-width="4" stroke-linecap="round"/>
|
||||
<path d="M52 28A24 24 0 0 1 28 52" stroke="#ff7f2a" stroke-width="4" stroke-linecap="round"/>
|
||||
<path d="M28 52A24 24 0 0 1 4 28" stroke="#0079ff" stroke-width="4" stroke-linecap="round"/>
|
||||
<path d="M4 28A24 24 0 0 1 28 4" stroke="#0079ff" stroke-width="4" stroke-linecap="round"/>
|
||||
<path d="M19 28.5l6 5.5 12-12" stroke="#0b1220" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<h1 class="display mt-8 max-w-[14ch]">{{ t.thanks.heading }}</h1>
|
||||
<p class="lede mt-6 max-w-[34rem]">{{ t.thanks.lede }}</p>
|
||||
<ol class="row-list mt-8 max-w-[34rem]">
|
||||
{% for step in t.thanks.steps %}
|
||||
<li class="flex gap-4 py-4 text-ink-2">
|
||||
<span class="tnum w-5 flex-none font-medium text-ink">{{ loop.index }}</span>
|
||||
<span>{{ step }}</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
<a class="btn-secondary mt-10" href="{{ t.home }}">{{ t.thanks.back }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user