Files
landing-2pi/src/_includes/cycle.njk
Jose Selesan 93bc7688c3 Refine landing: mobile signature, clearer form, closing the 2π turn
- Fix 320px overflow; nav switches to the menu below 1024px; per-stage
  mini cycles below lg where the sticky cycle is hidden.
- Form placeholders become hints (dimmer, not fake values).
- Bring the cycle to the contact close ("Escribirnos te pone en el 0°")
  and to the thank-you page (Relevamiento lit, "tu vuelta empezó").
- Sticky cycle: ring fills with the stage being read and closes at
  360° on the closing line, with a single pulse at 0°; iteration
  counter loops 1–3 and clears when inactive.
- Nav order matches the page; check marks for hero promises; email
  link on the thank-you page; unified "1 día hábil" and "turn" copy.
- Record critique snapshots and update DESIGN.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 21:19:00 -03:00

51 lines
2.8 KiB
Plaintext
Raw 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.

{#
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, active=none, center=none) %}
{% 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" style="--pa:0;--pb:0"{% elif active != none %} data-active="{{ active }}"{% endif %}>
<title id="{{ id }}-title">{{ c.title }}</title>
<desc id="{{ id }}-desc">{{ c.desc }}</desc>
<path class="arc arc-a{% if sticky %} track{% endif %}" pathLength="1" d="M 326.1 51.4 A 250 250 0 0 1 326.1 548.6" />
<path class="arc arc-b{% if sticky %} track{% endif %}" pathLength="1" d="M 273.9 548.6 A 250 250 0 0 1 273.9 51.4" />
{% if sticky %}
{# Progress: the turn fills as the reader moves through the stages and closes at the end #}
<path class="arc arc-a progress progress-a" pathLength="1" d="M 326.1 51.4 A 250 250 0 0 1 326.1 548.6" />
<path class="arc arc-b progress progress-b" pathLength="1" d="M 273.9 548.6 A 250 250 0 0 1 273.9 51.4" />
{% endif %}
{# 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 }}"></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">{{ center or c.center }}</text>
</g>
</svg>
{% endmacro %}