@extends('layouts.pmar.theme') @section('title', env('APP_NAME') . ' :: Notícias') @section('content')

Notícias

@php $pathSystem = $_SERVER['DOCUMENT_ROOT'] . "/"; $angraDefault = asset("/pmar/assets/img/angra-default.png"); $noticiasFiltrosPainelAberto = request()->filled('secretaria_id') || request()->filled('ano') || request()->filled('categoria'); @endphp
@php $noticiasFiltroBtnClass = 'btn btn-light border-0 rounded-5 shadow-sm text-secondary flex-shrink-0 px-3 py-3 d-flex align-items-center justify-content-center'; @endphp
{{-- Desktop: filtro à esquerda do campo de busca --}}
{{-- Campo de busca (único name="q") --}}
{{-- Mobile: filtro à esquerda de Buscar; Desktop: só Buscar e Limpar --}}
{{ __('Limpar') }}
@php $i = 0; @endphp @foreach ($noticias->slice(0, 2) as $noticia)
Notícia
{{ html_entity_decode($noticia->title) }}

{{ Str::limit(html_entity_decode($noticia->summary), 100) }}

{{ app(App\Http\Controllers\Controller::class)->formatDateToPortuguese($noticia->created_at) }}

@endforeach @foreach ($noticias->slice(2, 3) as $noticia)
Notícia
{{ html_entity_decode($noticia->title) }}

{{ Str::limit(html_entity_decode($noticia->summary), 100) }}

{{ app(App\Http\Controllers\Controller::class)->formatDateToPortuguese($noticia->created_at) }}

@endforeach
@foreach ($noticias->slice(5, 10) as $noticia)
Notícia
{{ html_entity_decode($noticia->title) }}

{{ Str::limit(html_entity_decode($noticia->summary), 150) }}

{{ app(App\Http\Controllers\Controller::class)->formatDateToPortuguese($noticia->created_at) }}

@endforeach
@forelse($banners as $banner) @empty @endforelse
@php $i = 5; @endphp @foreach ($noticias as $noticia) @if($i >= 5 && $i < 15)
Notícia
{{ html_entity_decode($noticia->title) }}

{{ Str::limit(html_entity_decode($noticia->summary), 100) }}

{{ app(App\Http\Controllers\Controller::class)->formatDateToPortuguese($noticia->created_at) }}

@php $i++; @endphp @else @php break; @endphp @endif @endforeach
@forelse($banners as $banner) {{ $banner->title }} @empty @endforelse
{!! $noticias->appends(request()->query())->links() !!}
@endsection