{"id":32,"date":"2023-08-08T08:09:16","date_gmt":"2023-08-08T08:09:16","guid":{"rendered":"https:\/\/vivaciousweddings.nl\/?page_id=32"},"modified":"2026-07-27T20:46:08","modified_gmt":"2026-07-27T20:46:08","slug":"home","status":"publish","type":"page","link":"https:\/\/vivaciousweddings.nl\/","title":{"rendered":"Countdown"},"content":{"rendered":"\n<div class=\"wp-block-group alignfull has-foreground-color has-text-color has-link-color wp-elements-1 has-global-padding is-layout-constrained wp-block-group-is-layout-constrained wp-container-2 is-position-sticky has-background\" style=\"padding-top:var(--wp--style--block-gap);padding-bottom:var(--wp--style--block-gap);background-image:url(&apos;https:\/\/vivaciousweddings.nl\/wp-content\/uploads\/2026\/04\/CV3XAldo5o9CutjiWR3f-ZZJw9huHg-rPJfk3LXUq5y7S62KYIrcrn2X562EJU3g6VUzCcJs9jxo7DTG-rNXpnYh7N-JuIm8Z4CP0toVO3BJNEBLIcley551TM9CHZXDYG6hdQBJPLI0CMlVcjBxigzvU_Q4-dO6cZd0TiQSPERNSnZyVQ6nJFCAwFpm6Y5q.jpg&apos;);background-size:cover;\"><div class=\"alignwide wp-block-bplugins-custom-html\" id='bPluginsCustomHtml-1'>\n<div class=\"garda-countdown-hero\">\n  <div class=\"garda-countdown-overlay\"><\/div>\n  <canvas id=\"garda-confetti-canvas\"><\/canvas>\n\n  <div class=\"garda-countdown-content\" id=\"garda-countdown-content\">\n    <p class=\"garda-countdown-label\">Zomer 2026<\/p>\n    <h1>Countdown<\/h1>\n\n    <p class=\"garda-hero-subtitle\">\n  Roadtrip naar Gardameer, Itali\u00eb\n<\/p>\n<div class=\"garda-hero-info\">\n\n  <div class=\"garda-info-card\">\n    <span>Vertrek<\/span>\n    <strong>29 juli 2026<\/strong>\n  <\/div>\n\n  <div class=\"garda-info-card\">\n    <span>Check-in<\/span>\n    <strong>30 Juli 2026<\/strong>\n  <\/div>\n\n  <div class=\"garda-info-card\">\n    <span>Check-out<\/span>\n    <strong>10 augustus 2026<\/strong>\n  <\/div>\n\n  <div class=\"garda-info-card\">\n    <span>Terugkomst<\/span>\n    <strong>11 Augustus<\/strong>\n  <\/div>\n<\/div>\n    \n    <div class=\"garda-countdown-grid\" id=\"garda-countdown-grid\">\n      <div class=\"garda-countdown-box\">\n        <span id=\"garda-days\">00<\/span>\n        <p>Dagen<\/p>\n      <\/div>\n      <div class=\"garda-countdown-box\">\n        <span id=\"garda-hours\">00<\/span>\n        <p>Uren<\/p>\n      <\/div>\n      <div class=\"garda-countdown-box\">\n        <span id=\"garda-minutes\">00<\/span>\n        <p>Minuten<\/p>\n      <\/div>\n      <div class=\"garda-countdown-box\">\n        <span id=\"garda-seconds\">00<\/span>\n        <p>Seconden<\/p>\n      <\/div>\n    <\/div>\n  <\/div>\n<\/div>\n\n<script>\n(function () {\n  const tripStartDate = new Date(\"2026-07-29T04:00:00\");\n  const tripEndDate = new Date(\"2026-08-10T15:00:00\");\n  \/\/const tripStartDate = new Date(\"2024-01-01T00:00:00\");\n  \/\/const tripEndDate = new Date(\"2024-01-02T00:00:00\");\n\n  const daysEl = document.getElementById(\"garda-days\");\n  const hoursEl = document.getElementById(\"garda-hours\");\n  const minutesEl = document.getElementById(\"garda-minutes\");\n  const secondsEl = document.getElementById(\"garda-seconds\");\n  const contentEl = document.getElementById(\"garda-countdown-content\");\n\n  let finished = false;\n  let timer = null;\n\n  function pad(value) {\n    return String(value).padStart(2, \"0\");\n  }\n\n  function showMessage(html, animationCallback) {\n    if (finished) return;\n    finished = true;\n    clearInterval(timer);\n\n    contentEl.classList.add(\"garda-fade-out\");\n\n    setTimeout(() => {\n      contentEl.classList.remove(\"garda-fade-out\");\n      contentEl.innerHTML = html;\n\n      if (typeof animationCallback === \"function\") {\n        animationCallback();\n      }\n    }, 700);\n  }\n\n  function launchTripStartedState() {\n    showMessage(`\n      <div class=\"garda-arrival-message garda-fade-in\">\n        <p class=\"garda-countdown-label\">Zomer 2026<\/p>\n        <h1 class=\"garda-arrival-title\">\n          GARDAMEER HERE WE COME! \ud83c\uddee\ud83c\uddf9 \ud83d\ude97\n        <\/h1>\n        <p class=\"garda-arrival-text\">\n          Bekijk\n          <a href=\"https:\/\/vivaciousweddings.nl\/?page_id=343\" class=\"garda-arrival-link\">\n            onze reis\n          <\/a>\n          en volg live updates via het\n          <a href=\"https:\/\/vivaciousweddings.nl\/?page_id=302\" class=\"garda-arrival-link\">\n            fotoboek\n          <\/a>\n        <\/p>\n      <\/div>\n      `, function () {\n  startConfetti();\n});\n  }\n\n  function launchTripEndedState() {\n    showMessage(`\n      <div class=\"garda-arrival-message garda-fade-in garda-home-message\">\n        <p class=\"garda-countdown-label\">Zomer 2026<\/p>\n        <h1 class=\"garda-arrival-title\">\n          WEER TERUG NAAR HUIS \ud83c\udfe1\ud83d\ude97\n        <\/h1>\n        <p class=\"garda-arrival-text\">\n          De vakantie zit erop, met alle herinneringen in het\n          <a href=\"https:\/\/vivaciousweddings.nl\/?page_id=302\" class=\"garda-arrival-link\">\n            fotoboek\n          <\/a>\n        <\/p>\n      <\/div>\n    `, function () {\n  startSoftStars();\n\n});\n  }\n\n  function updateCountdown() {\n    const now = new Date();\n\n    if (now >= tripEndDate) {\n      launchTripEndedState();\n      return;\n    }\n\n    if (now >= tripStartDate) {\n      daysEl.textContent = \"00\";\n      hoursEl.textContent = \"00\";\n      minutesEl.textContent = \"00\";\n      secondsEl.textContent = \"00\";\n      launchTripStartedState();\n      return;\n    }\n\n    const distance = tripStartDate - now;\n\n    const days = Math.floor(distance \/ (1000 * 60 * 60 * 24));\n    const hours = Math.floor((distance \/ (1000 * 60 * 60)) % 24);\n    const minutes = Math.floor((distance \/ (1000 * 60)) % 60);\n    const seconds = Math.floor((distance \/ 1000) % 60);\n\n    daysEl.textContent = pad(days);\n    hoursEl.textContent = pad(hours);\n    minutesEl.textContent = pad(minutes);\n    secondsEl.textContent = pad(seconds);\n  }\n\n  function startConfetti() {\n    const canvas = document.getElementById(\"garda-confetti-canvas\");\n    const ctx = canvas.getContext(\"2d\");\n\n    let pieces = [];\n    let animationId;\n    let startTime = null;\n    const duration = 6000;\n\n    function resizeCanvas() {\n      canvas.width = window.innerWidth;\n      canvas.height = window.innerHeight;\n    }\n\n    function random(min, max) {\n      return Math.random() * (max - min) + min;\n    }\n\n    function createPiece() {\n      return {\n        x: random(0, canvas.width),\n        y: random(-canvas.height * 0.5, 0),\n        w: random(6, 12),\n        h: random(10, 18),\n        speedY: random(2, 6),\n        speedX: random(-1.5, 1.5),\n        rotation: random(0, Math.PI * 2),\n        rotationSpeed: random(-0.2, 0.2),\n        color: [\"#ffffff\", \"#e8a325\", \"#5a7a5c\", \"#c45a2a\", \"#f5f0e8\"][Math.floor(Math.random() * 5)],\n        opacity: random(0.7, 1)\n      };\n    }\n\n    function initConfetti() {\n      pieces = [];\n      for (let i = 0; i < 180; i++) {\n        pieces.push(createPiece());\n      }\n    }\n\n    function drawPiece(piece) {\n      ctx.save();\n      ctx.translate(piece.x, piece.y);\n      ctx.rotate(piece.rotation);\n      ctx.globalAlpha = piece.opacity;\n      ctx.fillStyle = piece.color;\n      ctx.fillRect(-piece.w \/ 2, -piece.h \/ 2, piece.w, piece.h);\n      ctx.restore();\n    }\n\n    function updatePiece(piece) {\n      piece.y += piece.speedY;\n      piece.x += piece.speedX;\n      piece.rotation += piece.rotationSpeed;\n\n      if (piece.y > canvas.height + 20) {\n        piece.y = random(-120, -20);\n        piece.x = random(0, canvas.width);\n      }\n    }\n\n    function animate(timestamp) {\n      if (!startTime) startTime = timestamp;\n      const elapsed = timestamp - startTime;\n\n      ctx.clearRect(0, 0, canvas.width, canvas.height);\n\n      pieces.forEach(piece => {\n        updatePiece(piece);\n        drawPiece(piece);\n      });\n\n      if (elapsed < duration) {\n        animationId = requestAnimationFrame(animate);\n      } else {\n        ctx.clearRect(0, 0, canvas.width, canvas.height);\n        cancelAnimationFrame(animationId);\n      }\n    }\n\n    resizeCanvas();\n    initConfetti();\n    window.addEventListener(\"resize\", resizeCanvas);\n    animationId = requestAnimationFrame(animate);\n  }\n\n  function startSoftStars() {\n    const canvas = document.getElementById(\"garda-confetti-canvas\");\n    const ctx = canvas.getContext(\"2d\");\n\n    let stars = [];\n    let animationId;\n    let startTime = null;\n    const duration = 7000;\n\n    function resizeCanvas() {\n      canvas.width = window.innerWidth;\n      canvas.height = window.innerHeight;\n    }\n\n    function random(min, max) {\n      return Math.random() * (max - min) + min;\n    }\n\n    function createStar() {\n      return {\n        x: random(0, canvas.width),\n        y: random(canvas.height, canvas.height + 200),\n        size: random(2, 5),\n        speedY: random(0.4, 1.2),\n        speedX: random(-0.3, 0.3),\n        opacity: random(0.4, 0.9)\n      };\n    }\n\n    function initStars() {\n      stars = [];\n      for (let i = 0; i < 80; i++) {\n        stars.push(createStar());\n      }\n    }\n\n    function animate(timestamp) {\n      if (!startTime) startTime = timestamp;\n      const elapsed = timestamp - startTime;\n\n      ctx.clearRect(0, 0, canvas.width, canvas.height);\n\n      stars.forEach(star => {\n        star.y -= star.speedY;\n        star.x += star.speedX;\n\n        ctx.beginPath();\n        ctx.globalAlpha = star.opacity;\n        ctx.fillStyle = \"#f5f0e8\";\n        ctx.arc(star.x, star.y, star.size, 0, Math.PI * 2);\n        ctx.fill();\n      });\n\n      if (elapsed < duration) {\n        animationId = requestAnimationFrame(animate);\n      } else {\n        ctx.clearRect(0, 0, canvas.width, canvas.height);\n        cancelAnimationFrame(animationId);\n      }\n    }\n\n    resizeCanvas();\n    initStars();\n    window.addEventListener(\"resize\", resizeCanvas);\n    animationId = requestAnimationFrame(animate);\n  }\n\n  updateCountdown();\n  timer = setInterval(updateCountdown, 1000);\n})();\n<\/script><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":402,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_themeisle_gutenberg_block_has_review":false,"footnotes":""},"class_list":["post-32","page","type-page","status-publish","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"https:\/\/vivaciousweddings.nl\/index.php?rest_route=\/wp\/v2\/pages\/32","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vivaciousweddings.nl\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/vivaciousweddings.nl\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/vivaciousweddings.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vivaciousweddings.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=32"}],"version-history":[{"count":192,"href":"https:\/\/vivaciousweddings.nl\/index.php?rest_route=\/wp\/v2\/pages\/32\/revisions"}],"predecessor-version":[{"id":1575,"href":"https:\/\/vivaciousweddings.nl\/index.php?rest_route=\/wp\/v2\/pages\/32\/revisions\/1575"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vivaciousweddings.nl\/index.php?rest_route=\/wp\/v2\/media\/402"}],"wp:attachment":[{"href":"https:\/\/vivaciousweddings.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=32"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}