Template info

Instruction

How Nestrova is built and how to make it yours in an afternoon: variables first, then components, then the CMS.

<script>
window.__WF_REVIEW_BRIDGE = {
  siteId: "6aa8c0d5e7bbbb615035334a",
  version: "0.3.0",
  marker: "__wf_review_snippet_v1",
  bridgeToken: "wfbt_6d4282e03b6c4994b25e15a72da556b1",
  reviewSurface: "published-review",
  reviewScriptUrl: "https://validation-worker.createsomething.workers.dev/app-validator/snippet/review.js"
};
</script>
<script src="https://validation-worker.createsomething.workers.dev/app-validator/snippet/review.js"></script>

<link rel="stylesheet" href="https://unpkg.com/lenis@1.1.20/dist/lenis.css" />
<script src="https://unpkg.com/lenis@1.3.1/dist/lenis.min.js"></script>


<script>
  
  const lenis = new Lenis({
  smooth: true,
  lerp: .1,
  wheelMultiplier: 1,
  infinite: false,
});

function raf(time) {
  lenis.raf(time);
  requestAnimationFrame(raf);
}

requestAnimationFrame(raf);

</script>


<script>
window.Webflow ||= [];
window.Webflow.push(() => {
  document.querySelectorAll("[data-counter]").forEach((counter) => {
    const textEl = counter.firstElementChild || counter;
    const original = textEl.textContent.trim();

    const match = original.match(/^([^0-9.-]*)([0-9.,-]+)(.*)$/);
    if (!match) return;

    const prefix = match[1];
    const number = match[2].replace(/,/g, "");
    const suffix = match[3];

    const target = parseFloat(number);
    if (isNaN(target)) return;

    const hasDecimal = number.includes(".");
    const hasComma = original.includes(",");

    const obj = { value: 0 };

    gsap.fromTo(
      obj,
      { value: 0 },
      {
        value: target,
        duration: 1.8,
        ease: "power2.out",
        scrollTrigger: {
          trigger: counter,
          start: "top 88%",
          once: true,
        },
        onUpdate() {
          let value = hasDecimal
            ? obj.value.toFixed(1)
            : Math.floor(obj.value);

          if (hasComma && !hasDecimal) {
            value = Number(value).toLocaleString();
          }

          textEl.textContent = prefix + value + suffix;
        },
      }
    );
  });
});
</script>