@extends('layouts.public.main')

@section('content')
    <div class="page-header header-filter clear-filter purple-filter" data-parallax="true" style="background-image: url({{'"'.$activity->public_header_picture.'"'}});">
        <div class="container">
            <div class="row">
                <div class="col-md-8 ml-auto mr-auto">
                    <div class="brand">
                        <h1 class="title">{{$activity->name}}</h1>
                        <h3>{{$activity->public_slogan}}</h3>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="main main-raised">
        <div class="container">
            <div class="section">
                {{$activity->public_body}}
            </div>
            @if(!$activity->pictures->isEmpty())
                <div class="section">
                    <div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
                        <ol class="carousel-indicators">
                            <li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
                            <li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
                            <li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
                        </ol>
                        <div class="carousel-inner">
                            @foreach($activity->pictures as $pic)
                            <div class="carousel-item active">
                                <img class="d-block w-100" src="{{$pic->url}}" alt="{{$pic->title}}">
                            </div>
                            @endforeach
                        </div>
                        <a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
                            <span class="carousel-control-prev-icon" aria-hidden="true"></span>
                            <span class="sr-only">Suivant</span>
                        </a>
                        <a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
                            <span class="carousel-control-next-icon" aria-hidden="true"></span>
                            <span class="sr-only">Précédant</span>
                        </a>
                    </div>
                </div>
            @endif
        </div>
    </div>
@endsection