@extends('web.layouts.container')

@section('content')
    <section class="inner_header">
        <img src="{{asset('assets/web/images/icons/inner.svg')}}" alt="" class="inner_shap">
        <div class="container">
            <ul class="links">
                <li>
                    <a href="{{LaravelLocalization::getLocalizedURL($lang, route('home'), [], true)}}">{{__('main.home')}}</a>
                </li>
                <li>
                    <a href="#"> {{__('articles.head')}} </a>
                </li>
            </ul>
            <h4>{{__('articles.head')}}</h4>
        </div>
    </section>
    <section class="blog-pg section_padding">
        <div class="container">
            <div class="row">
                @if(count($news))
                    @foreach($news as $new)
                        <div class="col-md-6">
                            <a href="{{route('news.show', [$new->id, str_slug($new->slug)])}}">
                                <div class="blog_card">
                                    <div class="img-box">
                                        <img src="{{asset($new->image)}}" alt="" class="sec-img"/>
                                        <span class="date"><i class="bi bi-calendar3 me-2"></i>{{date('d/m/Y', strtotime($new->created_at))}}</span>
                                    </div>
                                    <div class="card-body text-center">
                                        <h5 class="title mb-2"><b>{{$new->title}}</b></h5>
                                        <p class="text">{!! stripText($new->description) !!}</p>
                                    </div>
                                </div>
                            </a>
                        </div>
                    @endforeach
                    @else
                    <div class="col-md-12 alert alert-secondary text-danger text-center">{{__('articles.no_data')}}</div>
                @endif
            </div>
        </div>
    </section>
@endsection

@section('inner_js')

@endsection
