MyHomeCollection/resources/views/homes/view.blade.php
Clement 06e6493664 💄 Ajoute des espaces insécables et formate les prix et surfaces
Ajoute aussi des icônes pour faire joli
Fix #10
Fix #9
2020-07-27 16:16:27 +02:00

122 lines
7.1 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">
<div class="card-header"><a href="{{ $home->url }}">{{ $home->title }}</a></div>
<div class="card-body">
@if (session('status'))
<div class="alert alert-success" role="alert">
{{ session('status') }}
</div>
@endif
<div class="row">
<div class="col-lg-12">
<div id="picturesCarousel" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
@foreach($home->pictures as $i => $pic)
<li data-target="#picturesCarousel" data-slide-to="{{ $i }}" @if($i === 0)class="active"@endif></li>
@endforeach
</ol>
<div class="carousel-inner">
@foreach($home->pictures as $i => $pic)
<div class="carousel-item @if($i === 0) active @endif">
<img class="d-block w-100" src="{{ asset($pic) }}">
</div>
@endforeach
</div>
<a class="carousel-control-prev" href="#picturesCarousel" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#picturesCarousel" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
</div>
@if(!empty($home->comment))
<div class="card mt-4 mb-4">
<div class="card-header">Mon commentaire</div>
<div class="card-body">
{!! nl2br($home->comment) !!}
</div>
</div>
@endif
<div class="row mb-4">
<div class="col-lg-12">
{!! nl2br($home->description) !!}
</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&nbsp;: </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&nbsp;: </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&nbsp;: </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&nbsp;: </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&nbsp;: </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&nbsp;: </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&nbsp;: </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>
<div class="col-lg-3"><a href="{{ $home->url }}" class="btn btn-success">Voir l'origine →</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection