Skip to content

Commit 95860dd

Browse files
committed
Update page
1 parent 557e8a5 commit 95860dd

File tree

2 files changed

+77
-100
lines changed

2 files changed

+77
-100
lines changed

resources/views/components/footer.blade.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,14 @@ class="inline-block px-px py-1.5 transition duration-300 will-change-transform h
223223
Partners
224224
</a>
225225
</li>
226+
<li>
227+
<a
228+
href="{{ route('wall-of-love') }}"
229+
class="inline-block px-px py-1.5 transition duration-300 will-change-transform hover:translate-x-1 hover:text-gray-700 dark:hover:text-gray-300"
230+
>
231+
Wall of Love
232+
</a>
233+
</li>
226234
@feature(App\Features\ShowAuthButtons::class)
227235
<li>
228236
<a

resources/views/wall-of-love.blade.php

Lines changed: 69 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -111,109 +111,78 @@ class="mx-auto mt-5 max-w-2xl text-center text-base/relaxed text-gray-600 sm:tex
111111

112112
{{-- List --}}
113113
@php
114-
$earlyAdopters = [
115-
[
116-
'name' => 'Sara Johnson',
117-
'url' => 'https://example.com',
118-
'image' => 'https://i.pravatar.cc/300?img=31',
119-
'title' => 'Founder at Example Co',
120-
],
121-
[
122-
'name' => 'Jane Smith',
123-
'image' => 'https://i.pravatar.cc/300?img=5',
124-
'title' => 'CEO at Example Inc',
125-
'featured' => true,
126-
],
127-
[
128-
'name' => 'Alice Johnson',
129-
'url' => 'https://example.net',
130-
'image' => 'https://i.pravatar.cc/300?img=7',
131-
],
132-
[
133-
'name' => 'Eve Wilson',
134-
'url' => 'https://example.edu',
135-
'image' => 'https://i.pravatar.cc/300?img=9',
136-
],
137-
[
138-
'name' => 'Charlie Davis',
139-
'image' => 'https://i.pravatar.cc/300?img=10',
140-
],
141-
[
142-
'name' => 'Bob Brown',
143-
'url' => 'https://example.io',
144-
'image' => 'https://i.pravatar.cc/300?img=11',
145-
'featured' => true,
146-
],
147-
[
148-
'name' => 'Frank Miller',
149-
'url' => 'https://example.dev',
150-
'image' => 'https://i.pravatar.cc/300?img=12',
151-
],
152-
[
153-
'name' => 'Grace Lee',
154-
'image' => 'https://i.pravatar.cc/300?img=16',
155-
],
156-
[
157-
'name' => 'Tara Adams',
158-
'url' => 'https://example.app',
159-
'image' => 'https://i.pravatar.cc/300?img=24',
160-
],
161-
[
162-
'name' => 'Ivy Anderson',
163-
'url' => 'https://example.site',
164-
'image' => 'https://i.pravatar.cc/300?img=65',
165-
],
166-
[
167-
'name' => 'Jack Thomas',
168-
'image' => 'https://i.pravatar.cc/300?img=32',
169-
'featured' => true,
170-
],
171-
[
172-
'name' => 'Kathy Martinez',
173-
'url' => 'https://example.tech',
174-
'image' => 'https://i.pravatar.cc/300?img=33',
175-
],
176-
];
114+
// Get approved submissions
115+
$approvedSubmissions = App\Models\WallOfLoveSubmission::whereNotNull('approved_at')
116+
->orderBy('approved_at', 'desc')
117+
->get();
118+
119+
// Convert approved submissions to the format expected by the component
120+
$earlyAdopters = $approvedSubmissions->map(function ($submission) {
121+
return [
122+
'name' => $submission->name,
123+
'title' => $submission->company,
124+
'url' => $submission->url,
125+
'image' => $submission->photo_path
126+
? asset('storage/' . $submission->photo_path)
127+
: 'https://i.pravatar.cc/300?img=' . rand(1, 70),
128+
'featured' => rand(0, 4) === 0, // Randomly feature about 20% of submissions
129+
'testimonial' => $submission->testimonial,
130+
];
131+
})->toArray();
177132
@endphp
178133

179-
<div
180-
x-init="
181-
() => {
182-
motion.inView($el, (element) => {
183-
const children = Array.from($el.children)
134+
@if(count($earlyAdopters) > 0)
135+
<div
136+
x-init="
137+
() => {
138+
motion.inView($el, (element) => {
139+
const children = Array.from($el.children)
184140
185-
children.forEach((child, i) => {
186-
const range = 20 // px
187-
const xFrom = (Math.random() * 2 - 1) * range
188-
const yFrom = (Math.random() * 2 - 1) * range
141+
children.forEach((child, i) => {
142+
const range = 20 // px
143+
const xFrom = (Math.random() * 2 - 1) * range
144+
const yFrom = (Math.random() * 2 - 1) * range
189145
190-
motion.animate(
191-
child,
192-
{
193-
x: [xFrom, 0],
194-
y: [yFrom, 0],
195-
opacity: [0, 1],
196-
},
197-
{
198-
duration: 0.7,
199-
ease: motion.backOut,
200-
delay: i * 0.06,
201-
},
202-
)
146+
motion.animate(
147+
child,
148+
{
149+
x: [xFrom, 0],
150+
y: [yFrom, 0],
151+
opacity: [0, 1],
152+
},
153+
{
154+
duration: 0.7,
155+
ease: motion.backOut,
156+
delay: i * 0.06,
157+
},
158+
)
159+
})
203160
})
204-
})
205-
}
206-
"
207-
class="relative z-10 mt-10 grid place-items-center 2xs:block 2xs:columns-[10rem] xl:columns-[12rem]"
208-
>
209-
@foreach ($earlyAdopters as $adopter)
210-
<x-wall-of-love.early-adopter-card
211-
:name="$adopter['name']"
212-
:image="$adopter['image']"
213-
:url="$adopter['url'] ?? null"
214-
:title="$adopter['title'] ?? null"
215-
:featured="$adopter['featured'] ?? false"
216-
/>
217-
@endforeach
218-
</div>
161+
}
162+
"
163+
class="relative z-10 mt-10 grid place-items-center 2xs:block 2xs:columns-[10rem] xl:columns-[12rem]"
164+
>
165+
@foreach ($earlyAdopters as $adopter)
166+
<x-wall-of-love.early-adopter-card
167+
:name="$adopter['name']"
168+
:image="$adopter['image']"
169+
:url="$adopter['url'] ?? null"
170+
:title="$adopter['title'] ?? null"
171+
:featured="$adopter['featured'] ?? false"
172+
/>
173+
@endforeach
174+
</div>
175+
@else
176+
<div class="relative z-10 mt-10 text-center">
177+
<div class="bg-white dark:bg-gray-800/50 backdrop-blur-sm rounded-2xl p-8 mx-auto max-w-md border border-gray-200 dark:border-gray-700">
178+
<div class="text-6xl mb-4">🚀</div>
179+
<h3 class="text-xl font-semibold text-gray-900 dark:text-white mb-2">
180+
Coming Soon!
181+
</h3>
182+
<p class="text-gray-600 dark:text-gray-400">
183+
Our early adopters will appear here soon.
184+
</p>
185+
</div>
186+
</div>
187+
@endif
219188
</x-layout>

0 commit comments

Comments
 (0)