|
1 | 1 | <x-layout title="The Vibes - Laracon Day 3"> |
2 | | - <div class="mx-auto max-w-5xl"> |
| 2 | + <div |
| 3 | + class="mx-auto max-w-5xl" |
| 4 | + x-data="{ |
| 5 | + deadline: new Date('2026-04-01T00:00:00-04:00').getTime(), |
| 6 | + days: 0, |
| 7 | + hours: 0, |
| 8 | + minutes: 0, |
| 9 | + seconds: 0, |
| 10 | + expired: false, |
| 11 | + init() { |
| 12 | + this.tick(); |
| 13 | + setInterval(() => this.tick(), 1000); |
| 14 | + }, |
| 15 | + tick() { |
| 16 | + const now = Date.now(); |
| 17 | + const diff = this.deadline - now; |
| 18 | + if (diff <= 0) { |
| 19 | + this.expired = true; |
| 20 | + return; |
| 21 | + } |
| 22 | + this.days = Math.floor(diff / (1000 * 60 * 60 * 24)); |
| 23 | + this.hours = Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); |
| 24 | + this.minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60)); |
| 25 | + this.seconds = Math.floor((diff % (1000 * 60)) / 1000); |
| 26 | + }, |
| 27 | + }" |
| 28 | + > |
3 | 29 | {{-- Hero Section --}} |
4 | 30 | <section class="mt-12"> |
5 | 31 | <div class="grid place-items-center text-center"> |
@@ -105,41 +131,15 @@ class="mt-8 flex flex-col items-center gap-3" |
105 | 131 | href="https://luma.com/szs6n4ym" |
106 | 132 | class="flex items-center justify-center gap-2.5 rounded-xl bg-zinc-800 px-8 py-4 text-white transition duration-200 hover:bg-zinc-900 dark:bg-violet-500/80 dark:drop-shadow-xl dark:drop-shadow-transparent dark:hover:bg-violet-500 dark:hover:drop-shadow-violet-500/30" |
107 | 133 | > |
108 | | - Grab Your Spot — $89 |
| 134 | + Grab Your Spot — <span x-text="expired ? '$129' : '$89'">$89</span> |
109 | 135 | </a> |
110 | 136 | <span class="text-sm text-gray-500 dark:text-gray-500">Only 100 spots available</span> |
111 | 137 | </div> |
112 | 138 | </div> |
113 | 139 | </section> |
114 | 140 |
|
115 | 141 | {{-- Early Bird Countdown --}} |
116 | | - <section |
117 | | - class="mt-10" |
118 | | - x-data="{ |
119 | | - deadline: new Date('2026-04-01T00:00:00').getTime(), |
120 | | - days: 0, |
121 | | - hours: 0, |
122 | | - minutes: 0, |
123 | | - seconds: 0, |
124 | | - expired: false, |
125 | | - init() { |
126 | | - this.tick(); |
127 | | - setInterval(() => this.tick(), 1000); |
128 | | - }, |
129 | | - tick() { |
130 | | - const now = Date.now(); |
131 | | - const diff = this.deadline - now; |
132 | | - if (diff <= 0) { |
133 | | - this.expired = true; |
134 | | - return; |
135 | | - } |
136 | | - this.days = Math.floor(diff / (1000 * 60 * 60 * 24)); |
137 | | - this.hours = Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); |
138 | | - this.minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60)); |
139 | | - this.seconds = Math.floor((diff % (1000 * 60)) / 1000); |
140 | | - }, |
141 | | - }" |
142 | | - > |
| 142 | + <section class="mt-10"> |
143 | 143 | <div |
144 | 144 | x-show="!expired" |
145 | 145 | x-init=" |
@@ -739,10 +739,10 @@ class="mt-10 grid gap-6 md:grid-cols-2" |
739 | 739 | <h3 class="text-xl font-medium">Ticket Price</h3> |
740 | 740 | </div> |
741 | 741 | <div class="mt-4 flex items-baseline gap-2"> |
742 | | - <p class="text-lg font-semibold">$89 per person</p> |
743 | | - <span class="text-sm text-gray-500 line-through dark:text-gray-500">$129</span> |
| 742 | + <p class="text-lg font-semibold" x-text="expired ? '$129 per person' : '$89 per person'">$89 per person</p> |
| 743 | + <span x-show="!expired" class="text-sm text-gray-500 line-through dark:text-gray-500">$129</span> |
744 | 744 | </div> |
745 | | - <p class="mt-1 text-gray-600 dark:text-gray-400"> |
| 745 | + <p class="mt-1 text-gray-600 dark:text-gray-400" x-text="expired ? 'Includes catering, drinks, and full event access.' : 'Early bird pricing until April 1st. Includes catering, drinks, and full event access.'"> |
746 | 746 | Early bird pricing until April 1st. Includes catering, drinks, and full event access. |
747 | 747 | </p> |
748 | 748 | </div> |
@@ -961,9 +961,9 @@ class="grid place-items-center text-center" |
961 | 961 | href="https://luma.com/szs6n4ym" |
962 | 962 | class="flex items-center justify-center gap-2.5 rounded-xl bg-zinc-800 px-8 py-4 text-white transition duration-200 hover:bg-zinc-900 dark:bg-violet-500/80 dark:drop-shadow-xl dark:drop-shadow-transparent dark:hover:bg-violet-500 dark:hover:drop-shadow-violet-500/30" |
963 | 963 | > |
964 | | - Get Your Ticket — $89 |
| 964 | + Get Your Ticket — <span x-text="expired ? '$129' : '$89'">$89</span> |
965 | 965 | </a> |
966 | | - <span class="text-sm text-gray-500 dark:text-gray-500"> |
| 966 | + <span x-show="!expired" class="text-sm text-gray-500 dark:text-gray-500"> |
967 | 967 | Early bird $89 · $129 after April 1st · 100 spots |
968 | 968 | </span> |
969 | 969 | </div> |
|
0 commit comments