@extends('layouts.app')
@section('title', 'RoBenz')
@section('content')
{{-- INTESTAZIONE --}}
Carburanti Rovigo
@if($lastUpdate)
{{ \Carbon\Carbon::parse($lastUpdate)->format('d/m/Y') }}
@endif
{{-- BOTTONI CARBURANTE - TASK 1 --}}
{{-- FILTRI: comune + self/servito --}}
{{-- TASK 3: Legenda semaforo --}}
โน๏ธ Come leggere i colori
-
Prezzo aggiornato nelle ultime 24h
-
Aggiornato ieri (24-48h fa)
-
Non aggiornato da 2+ giorni
{{-- LISTA --}}
@if($stations->isEmpty())
โฝ
Nessun distributore trovato
Prova a cambiare comune o tipo di carburante
@if($municipality)
โ Vedi tutti i comuni
@endif
@else
{{-- Counter + range prezzi --}}
{{ $stations->total() }} distributori
@if($municipality) ยท {{ ucwords(strtolower($municipality)) }} @endif
ยท {{ $fuelType }} {{ $mode === 'self' ? 'Self' : 'Servito' }}
@php
$minP = $stations->min('price');
$maxP = $stations->max('price');
@endphp
@if($minP && $maxP && $minP != $maxP)
{{ number_format($minP,3,',','.') }} โ {{ number_format($maxP,3,',','.') }} โฌ/L
@endif
@foreach($stations as $i => $station)
@php
$globalRank = ($stations->currentPage() - 1) * $stations->perPage() + $i + 1;
$isCheapest = $globalRank === 1;
@endphp
@endforeach
{{-- TASK 4: Paginazione verde --}}
@if($stations->hasPages())
@if($stations->onFirstPage())
โ
@else
โ
@endif
@foreach($stations->getUrlRange(1, $stations->lastPage()) as $page => $url)
@if($page == $stations->currentPage())
{{ $page }}
@elseif(abs($page - $stations->currentPage()) <= 2 || $page === 1 || $page === $stations->lastPage())
{{ $page }}
@elseif(abs($page - $stations->currentPage()) === 3)
โฆ
@endif
@endforeach
@if($stations->hasMorePages())
โ
@else
โ
@endif
Pagina {{ $stations->currentPage() }} di {{ $stations->lastPage() }}
@endif
@endif
@endsection