Skip to content

Commit ead9fe3

Browse files
committed
feat: add features, demo, faq page, update ticket comments, remove navbar items
1 parent 35b039f commit ead9fe3

File tree

7 files changed

+896
-27
lines changed

7 files changed

+896
-27
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
@props(['question', 'answer'])
2+
3+
<div
4+
x-data="{ open: false }"
5+
class="border border-gray-200 rounded-lg overflow-hidden"
6+
>
7+
<button
8+
@click="open = !open"
9+
class="w-full flex justify-between items-center px-6 py-4 text-left text-gray-900 font-medium hover:bg-gray-50 transition"
10+
>
11+
<span>{{ $question }}</span>
12+
<i
13+
class="fa-solid fa-chevron-down text-gray-400 transition-transform duration-200"
14+
:class="{ 'rotate-180': open }"
15+
></i>
16+
</button>
17+
18+
<div
19+
x-show="open"
20+
x-transition
21+
class="px-6 pb-5 text-gray-600 text-sm leading-relaxed border-t border-gray-100"
22+
>
23+
<p class="pt-4">{{ $answer }}</p>
24+
</div>
25+
</div>

resources/views/demo.blade.php

Lines changed: 319 additions & 0 deletions
Large diffs are not rendered by default.

resources/views/faq.blade.php

Lines changed: 191 additions & 0 deletions
Large diffs are not rendered by default.

resources/views/features.blade.php

Lines changed: 293 additions & 0 deletions
Large diffs are not rendered by default.

resources/views/layouts/navbar.blade.php

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,15 @@ class="absolute left-0 mt-2 w-48 bg-white border border-gray-200 rounded-md shad
3131
opacity-0 invisible group-hover:visible group-hover:opacity-100
3232
transition-all duration-150 z-50">
3333

34-
<a href="{{ route('over-ons') }}"
34+
<a href="{{ route('features') }}"
3535
class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">
3636
Features
3737
</a>
3838

39-
<a href="{{ route('over-ons') }}"
39+
<a href="{{ route('demo') }}"
4040
class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">
4141
Demo
4242
</a>
43-
44-
<a href="{{ route('over-ons') }}"
45-
class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">
46-
Updates
47-
</a>
4843
</div>
4944
</div>
5045

@@ -64,24 +59,19 @@ class="absolute left-0 mt-2 w-48 bg-white border border-gray-200 rounded-md shad
6459
opacity-0 invisible group-hover:visible group-hover:opacity-100
6560
transition-all duration-150 z-50">
6661

67-
<a href="{{ route('over-ons') }}"
68-
class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">
69-
Documentatie
70-
</a>
71-
72-
<a href="{{ route('over-ons') }}"
62+
<a href="{{ route('faq') }}"
7363
class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">
7464
FAQ
7565
</a>
7666

77-
<a href="{{ route('over-ons') }}"
67+
<a href="https://status.sanderhd.tech/"
7868
class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">
7969
Status
8070
</a>
8171
</div>
8272
</div>
8373

84-
<x-nav-link :href="route('over-ons')">
74+
<x-nav-link :href="route('contact')">
8575
Contact
8676
</x-nav-link>
8777
</div>

resources/views/tickets/show.blade.php

Lines changed: 51 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -80,22 +80,61 @@
8080
@endif
8181

8282
<div class="bg-white p-6 border border-gray-300 rounded-lg mt-6">
83-
<h4 class="font-bold text-lg text-gray-900 mb-4">Reacties</h4>
84-
85-
@foreach($ticket->comments as $comment)
86-
<div class="mb-2 p-2 bg-gray-100 rounded">
87-
<strong>{{ $comment->user->name }}</strong>
88-
<p>{{ $comment->body }}</p>
89-
<span class="text-xs text-gray-500">{{ $comment->created_at->diffForHumans() }}</span>
83+
<h4 class="font-bold text-lg text-gray-900 mb-6">Reacties</h4>
84+
85+
@if($ticket->comments->isEmpty())
86+
<p class="text-sm text-gray-400 text-center py-6">Nog geen reacties. Wees de eerste!</p>
87+
@else
88+
<div class="space-y-4 mb-6">
89+
@foreach($ticket->comments as $comment)
90+
@php
91+
$isOwn = auth()->check() && auth()->id() === $comment->user_id;
92+
$initials = collect(explode(' ', $comment->user->name))
93+
->map(fn($w) => strtoupper($w[0]))
94+
->take(2)
95+
->implode('');
96+
$colors = ['bg-purple-500','bg-blue-500','bg-green-500','bg-pink-500','bg-orange-500','bg-teal-500'];
97+
$color = $colors[$comment->user_id % count($colors)];
98+
@endphp
99+
<div class="flex gap-4 {{ $isOwn ? 'flex-row-reverse' : '' }}">
100+
<div class="h-9 w-9 rounded-full {{ $color }} flex items-center justify-center text-white text-xs font-bold shrink-0">
101+
{{ $initials }}
102+
</div>
103+
<div class="max-w-[75%] {{ $isOwn ? 'items-end' : 'items-start' }} flex flex-col">
104+
<div class="{{ $isOwn ? 'bg-blue-50 border border-blue-200' : 'bg-gray-50 border border-gray-200' }} rounded-lg px-4 py-3">
105+
<div class="flex items-center gap-2 mb-1 {{ $isOwn ? 'flex-row-reverse' : '' }}">
106+
<span class="text-sm font-semibold text-gray-800">
107+
{{ $comment->user->name }}
108+
@if($isOwn)
109+
<span class="text-xs text-blue-500 font-normal ml-1">(jij)</span>
110+
@endif
111+
</span>
112+
<span class="text-xs text-gray-400">{{ $comment->created_at->diffForHumans() }}</span>
113+
</div>
114+
<p class="text-sm text-gray-700 leading-relaxed">{{ $comment->body }}</p>
115+
</div>
116+
</div>
117+
</div>
118+
@endforeach
90119
</div>
91-
@endforeach
120+
@endif
92121

93122
@auth
94-
<form action="{{ route('comments.store', $ticket) }}" method="POST" class="mt-4">
123+
<form action="{{ route('comments.store', $ticket) }}" method="POST">
95124
@csrf
96-
<textarea name="body" rows="3" class="w-full border rounded p-2" placeholder="Voeg een reactie toe..."></textarea>
97-
<x-input-error :messages="$errors->get('body')" class="mt-1" />
98-
<button type="submit" class="mt-2 px-4 py-2 bg-blue-600 text-white rounded">Plaatsen</button>
125+
<div class="border border-gray-300 rounded-lg p-4 bg-gray-50">
126+
<textarea
127+
name="body"
128+
rows="3"
129+
class="w-full text-sm text-gray-800 bg-transparent resize-none outline-none placeholder-gray-400"
130+
placeholder="Schrijf een reactie..."></textarea>
131+
<x-input-error :messages="$errors->get('body')" class="mt-1" />
132+
<div class="flex justify-end mt-2">
133+
<button type="submit" class="bg-blue-600 hover:bg-blue-700 text-white text-sm font-medium px-4 py-2 rounded transition">
134+
Verstuur reactie
135+
</button>
136+
</div>
137+
</div>
99138
</form>
100139
@endauth
101140
</div>

routes/web.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,18 @@
2424
return view('contact');
2525
})->name('contact');
2626

27+
Route::get('faq', function () {
28+
return view('faq');
29+
})->name('faq');
30+
31+
Route::get('demo', function () {
32+
return view('demo');
33+
})->name('demo');
34+
35+
Route::get('features', function () {
36+
return view('features');
37+
})->name('features');
38+
2739
Route::post('contact', [ContactController::class, 'store'])->name('contact.store');
2840

2941
Route::get('faq', function () {

0 commit comments

Comments
 (0)