@extends('website.layout.main')

@section('meta_title')
  @lang('front.event')
@endsection
@section('content')






 <!-- Page Title -->
        <div class="page-title-area" style="background-image: url({{render_image_path(get_banners('Events')?->image)}})">
            <div class="d-table">
                <div class="d-table-cell">
                    <div class="container">
                        <div class="title-content">
                            <h2>
                                @lang('front.event')

                            </h2>
                            {{-- <ul>
                                <li>
                                    <a href="index.html">
                                        @lang('front.home')
                                    </a>
                                </li>
                                <li>
                                    <span>{{render_post_title($post)}}</span>
                                </li>
                            </ul> --}}
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- End Page Title -->
      <section class="blog-area two pt-100 pb-70">
            <div class="container">

                <div class="row justify-content-center">

                    @foreach ($posts as $item)

                    <div class="col-sm-6 col-lg-4">
                        <div class="blog-item">
                            <div class="top">
                                <img src="{{ render_image_path($item->image) }}" alt="{{render_post_title($item)}}">
                            </div>
                            <div class="bottom">
                                <ul>

                                    <li>
                                        <i class="bx bx-calendar"></i>
                                     {{ \Carbon\Carbon::parse($item->date)->format('d F, Y') }}
                                    </li>
                                </ul>
                                <h3>
                                    <a href="{{render_route('event.show',$item->id)}}">
                                        {{render_post_title($item)}}
                                    </a>
                                </h3>
                                <p>
                                    {!!strip_tags(str()->words(render_post_description($item),20   ))!!}


                                </p>
                                <a class="blog-btn" href="{{render_route('event.show',$item->id)}}">

                                    @lang('front.more')
                                </a>
                            </div>
                        </div>
                    </div>
                    @endforeach




                </div>
            </div>
        </section>
        <!--=== End Blog ===-->

    @endsection
