@extends('front.layouts.master')

@section('seo_title', $global_other_page_items->page_blog_seo_title)
@section('seo_meta_description', $global_other_page_items->page_blog_seo_meta_description)

@section('content')
<!-- Banner Section -->
<section class="page-title" style="background-image: url({{ asset('uploads/'.$global_setting->banner) }});">
    <div class="auto-container">
        <div class="title-outer">
            <h1 class="title">{{ $global_other_page_items->page_blog_title }}</h1>
            <ul class="page-breadcrumb">
                <li><a href="{{ url('/') }}">{{ __('Home') }}</a></li>
                <li>{{ $global_other_page_items->page_blog_title }}</li>
            </ul>
        </div>
    </div>
</section>
<!-- // Banner Section -->


<!-- Blog Section -->
<section class="bg-silver-light">
    <div class="container pb-90">
        <div class="row">
            @foreach($posts as $row)
            <div class="news-block col-xl-4 col-lg-6 col-md-6">
                <div class="inner-box">
                    <div class="image-box">
                        <figure class="image">
                            <a href="{{ route('post',$row->slug) }}"><img src="{{ asset('uploads/'.$row->photo) }}" alt=""></a>
                        </figure>
                    </div>
                    <div class="content-box">
                        <span class="date">
                            {{ date('d M, Y', strtotime($row->created_at)) }}
                        </span>
                        <span class="post-info"><i class="fa fa-user-circle"></i> {{ __('By Admin') }}</span>
                        <h5 class="title">
                            <a href="{{ route('post',$row->slug) }}">{{ $row->title }}</a>
                        </h5>
                        <div class="text">
                            {!! nl2br($row->short_description) !!}
                        </div>
                        <a href="{{ route('post',$row->slug) }}" class="read-more"><i class="fa fa-long-arrow-alt-right"></i> {{ __('Read More') }}</a>
                    </div>
                </div>
            </div>
            @endforeach
            <div class="col-md-12">
                {{ $posts->links() }}
            </div>
        </div>
    </div>
</section>
<!-- // Blog Section -->
@endsection