@extends('layouts.frontend')

@section('content')

<div class="container" style="min-height: 450px;">
    <div class="row archivio-news">
        <br>
        <div class="title-section col-sm-12">
            <h1 style="width: 90%"><span>Ricerca - {{$search}}</span></h1>                
        </div>

        <div class="col-sm-12">
            <form class="navbar-form navbar-center my-12 my-lg-0" role="search" autocomplete="off" action="/ricerca" method="POST" style="width:100%">
                {{ csrf_field() }}
                <input type="text" id="search" name="search" placeholder="Cerca qui" style="width:100%" value="{{$search}}">
                <button type="submit" id="search-submit"><i class="fa fa-search"></i></button>
            </form><br>
        </div>
    
        @foreach($news as $n)

            <div class="col-sm-3">
                <div class="news-post image-post">
                    <a href="/{{$n->slug}}"><img src="/files/news/{{$n->image}}" alt="" class="img-responsive"></a>

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

    </div>
</div>

@stop