💄 Ajoute des espaces insécables et formate les prix et surfaces
Ajoute aussi des icônes pour faire joli Fix #10 Fix #9
This commit is contained in:
parent
842aae0094
commit
06e6493664
@ -27,5 +27,12 @@ class AppServiceProvider extends ServiceProvider
|
||||
Str::macro('currency', static function ($price) {
|
||||
return sprintf('%s €', number_format($price, 0, ',', ' '));
|
||||
});
|
||||
|
||||
Str::macro('surface', static function ($surface) {
|
||||
if (empty($surface)) {
|
||||
return '';
|
||||
}
|
||||
return sprintf('%s m²', number_format($surface, 0, ',', ' '));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -53,19 +53,61 @@
|
||||
{!! nl2br($home->description) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-4">
|
||||
<div class="col-lg-12"><h3>Informations :</h3></div>
|
||||
<div class="col-lg-3"><strong>Ville : </strong> {{ $home->city }}</div>
|
||||
<div class="col-lg-3"><strong>Prix : </strong> {{ $home->price }}</div>
|
||||
<div class="col-lg-3"><strong>Surface : </strong> {{ $home->surface }} m²</div>
|
||||
<div class="col-lg-3"><strong>Nombre de pièces : </strong>{{ $home->rooms }}</div>
|
||||
</div>
|
||||
<div class="row mb-4">
|
||||
<div class="col-lg-12"><h3>Informations complémentaires :</h3></div>
|
||||
<div class="col-lg-3"><strong>Surface de jardin : </strong> {{ $home->garden_surface ?? '−' }}</div>
|
||||
<div class="col-lg-3"><strong>Énergie : </strong> {{ $home->energy ?? '−' }}</div>
|
||||
<div class="col-lg-3"><strong>GES : </strong> {{ $home->ges ?? '−' }}</div>
|
||||
</div>
|
||||
<div class="row mb-4">
|
||||
<div class="col-lg-12">
|
||||
<h3>
|
||||
<svg class="bi" width="32" height="32" fill="currentColor">
|
||||
<use xlink:href="{{ asset('images/bootstrap-icons.svg') }}#exclamation-circle"/>
|
||||
</svg>
|
||||
Informations
|
||||
</h3>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<svg class="bi" width="16" height="16" fill="currentColor">
|
||||
<use xlink:href="{{ asset('images/bootstrap-icons.svg') }}#bullseye"/>
|
||||
</svg>
|
||||
<strong>Ville : </strong> {{ $home->city }}</div>
|
||||
<div class="col-lg-3">
|
||||
<svg class="bi" width="16" height="16" fill="currentColor">
|
||||
<use xlink:href="{{ asset('images/bootstrap-icons.svg') }}#calculator-fill"/>
|
||||
</svg>
|
||||
<strong>Prix : </strong> {{ Str::currency($home->price) }}</div>
|
||||
<div class="col-lg-3">
|
||||
<svg class="bi" width="16" height="16" fill="currentColor">
|
||||
<use xlink:href="{{ asset('images/bootstrap-icons.svg') }}#house"/>
|
||||
</svg>
|
||||
<strong>Surface : </strong> {{ Str::surface($home->surface) }}</div>
|
||||
<div class="col-lg-3">
|
||||
<svg class="bi" width="16" height="16" fill="currentColor">
|
||||
<use xlink:href="{{ asset('images/bootstrap-icons.svg') }}#grid-3x3"/>
|
||||
</svg>
|
||||
<strong>Pièces : </strong>{{ $home->rooms }}</div>
|
||||
</div>
|
||||
<div class="row mb-4">
|
||||
<div class="col-lg-12">
|
||||
<h3>
|
||||
<svg class="bi" width="32" height="32" fill="currentColor">
|
||||
<use xlink:href="{{ asset('images/bootstrap-icons.svg') }}#info-circle"/>
|
||||
</svg>
|
||||
Informations complémentaires
|
||||
</h3>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<svg class="bi" width="16" height="16" fill="currentColor">
|
||||
<use xlink:href="{{ asset('images/bootstrap-icons.svg') }}#hexagon"/>
|
||||
</svg>
|
||||
<strong>Jardin : </strong> {{ Str::surface($home->garden_surface) }}</div>
|
||||
<div class="col-lg-3">
|
||||
<svg class="bi" width="16" height="16" fill="currentColor">
|
||||
<use xlink:href="{{ asset('images/bootstrap-icons.svg') }}#lightning"/>
|
||||
</svg>
|
||||
<strong>Énergie : </strong> {{ $home->energy ?? '−' }}</div>
|
||||
<div class="col-lg-3">
|
||||
<svg class="bi" width="16" height="16" fill="currentColor">
|
||||
<use xlink:href="{{ asset('images/bootstrap-icons.svg') }}#life-preserver"/>
|
||||
</svg>
|
||||
<strong>GES : </strong> {{ $home->ges ?? '−' }}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@if(!empty($home->slug)) <div class="col-lg-3"><a href="{{ route('public.view', $home->slug) }}" class="btn btn-light">Lien public</a></div>@endif
|
||||
<div class="col-lg-3 offset-3"><a href="{{ route('home.update', $home->id) }}" class="btn btn-light">Mettre à jour</a></div>
|
||||
|
@ -49,17 +49,59 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-4">
|
||||
<div class="col-lg-12"><h3>Informations :</h3></div>
|
||||
<div class="col-lg-3"><strong>Ville : </strong> {{ $home->city }}</div>
|
||||
<div class="col-lg-3"><strong>Prix : </strong> {{ $home->price }}</div>
|
||||
<div class="col-lg-3"><strong>Surface : </strong> {{ $home->surface }} m²</div>
|
||||
<div class="col-lg-3"><strong>Nombre de pièces : </strong>{{ $home->rooms }}</div>
|
||||
<div class="col-lg-12">
|
||||
<h3>
|
||||
<svg class="bi" width="32" height="32" fill="currentColor">
|
||||
<use xlink:href="{{ asset('images/bootstrap-icons.svg') }}#exclamation-circle"/>
|
||||
</svg>
|
||||
Informations
|
||||
</h3>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<svg class="bi" width="16" height="16" fill="currentColor">
|
||||
<use xlink:href="{{ asset('images/bootstrap-icons.svg') }}#bullseye"/>
|
||||
</svg>
|
||||
<strong>Ville : </strong> {{ $home->city }}</div>
|
||||
<div class="col-lg-3">
|
||||
<svg class="bi" width="16" height="16" fill="currentColor">
|
||||
<use xlink:href="{{ asset('images/bootstrap-icons.svg') }}#calculator-fill"/>
|
||||
</svg>
|
||||
<strong>Prix : </strong> {{ Str::currency($home->price) }}</div>
|
||||
<div class="col-lg-3">
|
||||
<svg class="bi" width="16" height="16" fill="currentColor">
|
||||
<use xlink:href="{{ asset('images/bootstrap-icons.svg') }}#house"/>
|
||||
</svg>
|
||||
<strong>Surface : </strong> {{ Str::surface($home->surface) }}</div>
|
||||
<div class="col-lg-3">
|
||||
<svg class="bi" width="16" height="16" fill="currentColor">
|
||||
<use xlink:href="{{ asset('images/bootstrap-icons.svg') }}#grid-3x3"/>
|
||||
</svg>
|
||||
<strong>Pièces : </strong>{{ $home->rooms }}</div>
|
||||
</div>
|
||||
<div class="row mb-4">
|
||||
<div class="col-lg-12"><h3>Informations complémentaires :</h3></div>
|
||||
<div class="col-lg-3"><strong>Surface de jardin : </strong> {{ $home->garden_surface ?? '−' }}</div>
|
||||
<div class="col-lg-3"><strong>Énergie : </strong> {{ $home->energy ?? '−' }}</div>
|
||||
<div class="col-lg-3"><strong>GES : </strong> {{ $home->ges ?? '−' }}</div>
|
||||
<div class="col-lg-12">
|
||||
<h3>
|
||||
<svg class="bi" width="32" height="32" fill="currentColor">
|
||||
<use xlink:href="{{ asset('images/bootstrap-icons.svg') }}#info-circle"/>
|
||||
</svg>
|
||||
Informations complémentaires
|
||||
</h3>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<svg class="bi" width="16" height="16" fill="currentColor">
|
||||
<use xlink:href="{{ asset('images/bootstrap-icons.svg') }}#hexagon"/>
|
||||
</svg>
|
||||
<strong>Jardin : </strong> {{ Str::surface($home->garden_surface) }}</div>
|
||||
<div class="col-lg-3">
|
||||
<svg class="bi" width="16" height="16" fill="currentColor">
|
||||
<use xlink:href="{{ asset('images/bootstrap-icons.svg') }}#lightning"/>
|
||||
</svg>
|
||||
<strong>Énergie : </strong> {{ $home->energy ?? '−' }}</div>
|
||||
<div class="col-lg-3">
|
||||
<svg class="bi" width="16" height="16" fill="currentColor">
|
||||
<use xlink:href="{{ asset('images/bootstrap-icons.svg') }}#life-preserver"/>
|
||||
</svg>
|
||||
<strong>GES : </strong> {{ $home->ges ?? '−' }}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-3"><a href="{{ $home->url }}" class="btn btn-success">Voir l'origine →</a></div>
|
||||
|
Loading…
Reference in New Issue
Block a user