@extends('layouts.web')
@section('css')
@endsection
@section('content')
@component('web.components.default.section', [
'class' => 'news',
])
@include('web.components.layout.page_title', [
'title' => 'Notícias',
])
@include('web.components.pages.news.menu')
@forelse($news as $post)
@include('web.components.default.publication.publication_item',
[
'media' => [
'path' => $post->cover
? $post->cover->path
: '',
'count' => $post->cover_count,
'alt' =>
'Imagem ilustrativa da notícia: ' .
$post->publication->title,
],
'publication' => [
'title' => $post->publication->title,
'summary' => $post->publication->summary,
'date' => $post->publication->start_date,
],
'link' => [
'href' => route('web.news.show', [
'news' => $post->publication->slug,
]),
'title' => 'Veja mais sobre a notícia ' . $post->publication->title,
],
])
@empty
@include('web.components.default.publication.publication_empty', [
'message' => request()->get('search')
? 'Não foi encontrado nenhum resultado para: ' . request()->get('search')
: 'Não há notícias disponíveis',
])
@endforelse
@endcomponent
@endsection