@extends('layouts.frontend')

@section('banner_top')

    @include('partials.event_adv', ['advs' => $event->getAdvs(), 'position' => 'Sopra'])

@stop

@section('content')

<section class="block-wrapper" id="{{$event->slug}}">
    <div class="container">
        <div class="row">
            <div class="col-sm-8">
                @if($event->image != '')
                        <div class="row" style="margin-right: 15px;">
                            <img src="/files/news/{{$event->image}}" align="left" style="margin-left: 15px; max-width:60%" class= "img-responsive">
                            <h1 style="font-size:30px; margin-left:15px;" class="red">{{$event->title}}</h1>
                            <p>{!!$event->text!!}</p>
                        </div>
                @endif

                <div class="block-content">
                    <div class="row" style="margin-top: 2em;">
                        @if(is_object($event->big))
                            <div class="col-sm-12">
                                <div class="news-post image-post">
                                    <a href="/{{$event->big->slug}}"><img src="/files/news/{{$event->big->image}}" alt=""></a>
                                    <div class="box-title">
                                        <div class="inner-hover">

                                            <h2><a href="/{{$event->big->slug}}">{{$event->big->title}}</a></h2>
                                            <ul class="post-tags">
                                                <li><i class="fa fa-clock-o"></i><span>{{date("d/m/Y", strtotime($event->big->date))}}</span></li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        @endif

                        <div class="col-sm-12" style="margin-top: 2em;">
                            <div class="row">

                                @if(is_object($event->small1))
                                    <div class="col-sm-6">
                                        <div class="col-sm-5">
                                            <div class="news-post image-post2">
                                                <a href="/{{$event->small1->slug}}"><img src="/files/news/V_{{$event->small1->image}}" alt="" class="img-responsive"></a>
                                            </div>
                                        </div>
                                        <div class="col-sm-7">
                                            <div class="post-content">
                                                <h2><a href="/{{$event->small1->slug}}">{{$event->small1->title}}</a></h2>
                                                    <ul class="post-tags">
                                                        <li><i class="fa fa-clock-o"></i>{{date("d/m/Y", strtotime($event->small1->date))}}</li>
                                                    </ul>
                                            </div>
                                        </div>
                                    </div>
                                @endif

                                @if(is_object($event->small2))
                                    <div class="col-sm-6">
                                        <div class="col-sm-5">
                                            <div class="news-post image-post2">
                                                <a href="/{{$event->small2->slug}}"><img src="/files/news/V_{{$event->small2->image}}" alt="" class="img-responsive"></a>
                                            </div>
                                        </div>
                                        <div class="col-sm-7">
                                            <div class="post-content">
                                                <h2><a href="/{{$event->small2->slug}}">{{$event->small2->title}}</a></h2>
                                                    <ul class="post-tags">
                                                        <li><i class="fa fa-clock-o"></i>{{date("d/m/Y", strtotime($event->small2->date))}}</li>
                                                    </ul>
                                            </div>
                                        </div>
                                    </div>
                                @endif

                            </div>

                            <div class="row" style="margin-top: 1em;">

                                @if(is_object($event->small3))
                                    <div class="col-sm-6">
                                        <div class="col-sm-5">
                                            <div class="news-post image-post2">
                                                <a href="/{{$event->small3->slug}}"><img src="/files/news/V_{{$event->small3->image}}" alt="" class="img-responsive"></a>
                                            </div>
                                        </div>
                                        <div class="col-sm-7">
                                            <div class="post-content">
                                                <h2><a href="/{{$event->small3->slug}}">{{$event->small3->title}}</a></h2>
                                                    <ul class="post-tags">
                                                        <li><i class="fa fa-clock-o"></i>{{date("d/m/Y", strtotime($event->small3->date))}}</li>
                                                    </ul>
                                            </div>
                                        </div>
                                    </div>
                                @endif


                                @if(is_object($event->small4))
                                    <div class="col-sm-6">
                                        <div class="col-sm-5">
                                            <div class="news-post image-post2">
                                                <a href="/{{$event->small4->slug}}"><img src="/files/news/V_{{$event->small4->image}}" alt="" class="img-responsive"></a>
                                            </div>
                                        </div>
                                        <div class="col-sm-7">
                                            <div class="post-content">
                                                <h2><a href="/{{$event->small4->slug}}">{{$event->small4->title}}</a></h2>
                                                    <ul class="post-tags">
                                                        <li><i class="fa fa-clock-o"></i>{{date("d/m/Y", strtotime($event->small4->date))}}</li>
                                                    </ul>
                                            </div>
                                        </div>
                                    </div>
                                @endif

                            </div>
                        </div>
                    </div>
                </div>

            </div>

            <div class="col-sm-4 sidebar">

                <div class="title-section">
                    <h1><span class="no-border">ULTIME NEWS</span></h1>
                </div>

                <div class="item">
                    <ul class="list-posts">

                        @foreach($elements as $e)
                            <li>
                                <div class="row" style="margin-left:0px;margin-right:0px">
                                    <a href="/{{$e->slug}}"><img src="/files/news/{{$e->image}}" alt=""></a>
                                    <div class="post-content">
                                        <h2><a href="/{{$e->slug}}">{{$e->title}}</a></h2>
                                    </div>
                                </div>
                                <div class="row">
                                    <ul class="post-tags">
                                        <li><i class="fa fa-clock-o"></i>{{date("d/m/Y", strtotime($e->date))}}</li>
                                    </ul>
                                </div>
                            </li>
                        @endforeach

                    </ul>
                </div>

                <div class="center-button">
                    <a href="/eventi/{{$event->slug}}/elenco">ARCHIVIO NEWS</a>
                </div>
                <br><br>
                <div class="title-section">
                    <h4><span class="no-border">SEGUI CALCIO A 5 ANTEPRIMA SU</span></h4>
                </div>

                <div class="row">
                    <div class="col-md-2">
                        <a href="https://it-it.facebook.com/calcioa5anteprima/"><img src="/images/facebook.png"></a>
                    </div>
                    <div class="col-md-2">
                        <a href="https://twitter.com/ca5anteprima"><img src="/images/twitter.png"></a>
                    </div>
                    <div class="col-md-2">
                        <a href="#"><img src="/images/instagram.png"></a>
                    </div>
                </div>

            </div>
        </div>
    </div>
</section>
<br><br>
@stop

@section('banner_bottom')

    @include('partials.event_adv', ['advs' => $event->getAdvs(), 'position' => 'Sotto'])

@stop
