@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 --}}
@foreach(['Benzina'=>'๐ŸŸข','Gasolio'=>'๐Ÿ”ต','GPL'=>'๐ŸŸฃ','Metano'=>'๐ŸŸ '] as $type => $icon) {{ $icon }} @endforeach
{{-- FILTRI: comune + self/servito --}}
{{-- TASK 1: Toggle Self/Servito --}}
Self Servito
{{-- TASK 3: Legenda semaforo --}}
โ„น๏ธ Come leggere i colori
{{-- 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