post.blade.php 4.44 KB
@extends('layout.site', ['title' => $news->title ])

@section('content')
    <section class="news-one">
        <div class="news-one-top" style="
        @if ($news->foto)
            background-image:url({{ asset($news->foto)}})
        @else
            background-image:url({{ asset('images/news-one-bg.jpg')}})
        @endif

         ">
            <div class="container">
                <div class="news-one-top__wrap">
                    <div class="breadcrumbs">
                        <ul class="breadcrumbs__list">
                            <li class="breadcrumbs__item"><a class="breadcrumbs__link" href="{{ route('index') }}">Главная</a></li>
                            <li class="breadcrumbs__item"><a class="breadcrumbs__link" href="{{ route('news') }}">Новости</a></li>
                            <li class="breadcrumbs__item"><span class="breadcrumbs__link">{{ $news->title }}</span></li>
                        </ul>
                    </div>
                    <h1 class="news-one__title title-main">{{ $news->title }}</h1>
                    <div class="news-one__date"><span>{{ $news->created_at->format('d') }}</span><span>{{ \App\Classes\RusDate::russian_month($news->created_at->format('m')) }} {{$news->created_at->format('Y')}}</span></div>
                </div>
            </div>
        </div>
        <div class="container">
            <div class="news-one__inner">
                <div class="news-one__social social">
                    <div class="social__title">Поделиться новостью:</div>
                    <ul class="social__list">
                        <li class="social__item"><a class="social__link" href="#" target="_blank"><img src="{{ asset('images/tg.svg') }}" alt=""></a></li>
                        <li class="social__item"><a class="social__link" href="#" target="_blank">
                                <svg width="40" height="40">
                                    <use xlink:href="{{ asset('images/sprite.svg#wa')}}"></use>
                                </svg></a></li>
                        <li class="social__item"><a class="social__link" href="#" target="_blank">
                                <svg width="40" height="40">
                                    <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use>
                                </svg></a></li>
                        <li class="social__item"><a class="social__link" href="#" target="_blank">
                                <svg width="40" height="40">
                                    <use xlink:href="{{ asset('images/sprite.svg#fb')}}"></use>
                                </svg></a></li>
                    </ul>
                </div>
                <div class="news-one__descr">
                    {{ $news->text }}
                </div>
            </div>
        </div>
    </section>
    <section class="slider">
        <div class="container">
            <div class="slider__wrap">
                <div class="slider__top">
                    <h2 class="slider__title title">Последние новости</h2>
                    <div class="slider__control">
                        <div class="swiper-button-prev">
                            <svg width="10" height="17">
                                <use xlink:href="{{ asset('images/sprite.svg#slider-arrow')}}"></use>
                            </svg>
                        </div>
                        <div class="swiper-button-next">
                            <svg width="10" height="17">
                                <use xlink:href="{{ asset('images/sprite.svg#slider-arrow')}}"></use>
                            </svg>
                        </div>
                    </div>
                </div>
                <div class="slider__swiper swiper">
                    <div class="swiper-wrapper">
                        @if ($news_list->count())
                            @foreach($news_list as $new)
                                @include('catalogs.new', ['new' => $new])
                            @endforeach
                        @else
                            <h3>Пока здесь нет новостей!</h3>
                        @endif

                    </div>
                </div>
                <div class="swiper-pagination"></div>
            </div>
        </div>
    </section>
@endsection

@section('form_feedback')
    <!-- Форма обратной связи -->
    @include('form.form_feedback')
@endsection