Skip to content

Commit b606e4d

Browse files
Merge pull request #69 from project-bnb/Feat/Styling
Feat/statistics style
2 parents 599492d + 0d5e3b3 commit b606e4d

File tree

1 file changed

+49
-17
lines changed

1 file changed

+49
-17
lines changed

resources/views/apartments/show.blade.php

Lines changed: 49 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -59,27 +59,59 @@
5959
</div>
6060
@endforeach
6161
</div>
62+
6263
<!-- Statistiche appartamento -->
63-
<div class="py-12">
64-
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
65-
<div class="bg-white dark:bg-gray-800 overflow-hidden shadow-sm sm:rounded-lg">
66-
<div class="p-6 text-gray-900 dark:text-red-200">
67-
{{ __("Statistiche appartamento") }}
68-
</div>
69-
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 mt-3">
70-
{{ $views->count() }} {{ __("visualizzazioni") }}
71-
</div>
72-
<div class="mt-3">
73-
<p>IP visitatori</p>
74-
@foreach ($views as $view)
75-
<p>{{ $view->ip_address }}</p>
76-
<p>{{ $view->created_at }}</p>
77-
<p>{{ $view->id }}</p>
78-
@endforeach
79-
</div>
64+
65+
<!-- Stats Section -->
66+
<div class="p-10 bg-gradient-to-r from-neutral-800 via-neutral-700 to-neutral-800 rounded-lg shadow-xl mt-10 mb-10">
67+
<h2 class="text-3xl font-bold text-white drop-shadow-md mb-6 text-center">
68+
{{ __("Statistiche dell'Appartamento") }}
69+
</h2>
70+
71+
<!-- Visualizzazioni totali -->
72+
<div class="text-center text-white drop-shadow-md text-2xl font-extrabold mb-8">
73+
{{ $views->count() }} <span class="text-2xl font-semibold"> {{ __("Visualizzazioni Totali") }}</span>
8074
</div>
75+
76+
<!-- Lista delle Visualizzazioni -->
77+
<div class="text-white drop-shadow-md text-semibold mb-8 text-center text-xl mt-20">
78+
{{ __("Dettagli delle Visualizzazioni") }}
8179
</div>
80+
81+
@if($views->isNotEmpty())
82+
<div class="overflow-auto bg-neutral-700 rounded-lg p-6 text-gray-100">
83+
<table class="min-w-full divide-y divide-gray-600 text-sm">
84+
<thead class="bg-neutral-800">
85+
<tr>
86+
<th class="px-6 py-3 text-left text-white drop-shadow-md uppercase tracking-wider">
87+
{{ __("Data Visualizzazione") }}
88+
</th>
89+
{{-- <th class="px-6 py-3 text-left text-white drop-shadow-md uppercase tracking-wider">
90+
{{ __("Indirizzo IP") }}
91+
</th> --}}
92+
</tr>
93+
</thead>
94+
<tbody class="divide-y divide-neutral-600">
95+
@foreach ($views as $view)
96+
<tr>
97+
<td class="px-6 py-4 whitespace-nowrap">
98+
{{ $view->created_at->format('d-m-Y H:i:s') }}
99+
</td>
100+
{{-- <td class="px-6 py-4 whitespace-nowrap">
101+
{{ $view->ip_address }}
102+
</td> --}}
103+
</tr>
104+
@endforeach
105+
</tbody>
106+
</table>
107+
</div>
108+
@else
109+
<p class="text-white drop-shadow-md text-center mt-8">
110+
{{ __("Non ci sono visualizzazioni al momento.") }}
111+
</p>
112+
@endif
82113
</div>
114+
83115
<!-- Messaggi ricevuti -->
84116
<div class="bg-neutral-800 p-6 rounded-lg shadow-md mb-10">
85117
<h2 class="text-2xl font-bold text-yellow-500 mb-6">Messaggi ricevuti</h2>

0 commit comments

Comments
 (0)