File manager - Edit - /var/www/html/homologBancodetalentos/resources/views/pages/noticias.blade.php
Back
@extends('layouts.app') @section('title', 'Notícias - Banco de Talentos') @section('content') <main class="bg-fundo py-5 tb-noticias-main"> <div class="container"> <div class="d-flex justify-content-between align-items-center mb-4"> <h1 class="section-title primary-purple mb-0">Notícias</h1> <a href="{{ route('home') }}" class="btn-home-cta px-4 py-2 text-decoration-none">Voltar</a> </div> @if (count($noticias) === 0) <div class="tb-news-empty"> Nenhuma notícia disponível no momento. Tente novamente em instantes. </div> @else <div class="row g-4"> @foreach ($noticias as $noticia) <div class="col-md-6 col-lg-4"> <a href="{{ route('noticias.show', $noticia['slug']) }}" class="noticia-card text-decoration-none h-100"> <div class="noticia-card-image"> <img src="{{ $noticia['imagem'] !== '' ? $noticia['imagem'] : asset('images/images/home_image.png') }}" alt="{{ $noticia['titulo'] }}"> <div class="noticia-card-overlay"></div> </div> <div class="noticia-card-content"> <span class="tb-news-date">{{ $noticia['data'] }}</span> <h2 class="noticia-card-title">{{ $noticia['titulo'] }}</h2> <p class="tb-news-summary">{{ \Illuminate\Support\Str::limit(strip_tags($noticia['resumo']), 120) }}</p> </div> </a> </div> @endforeach </div> @endif @php $currentPage = max(1, (int) ($pagination['current_page'] ?? 1)); $lastPage = max(1, (int) ($pagination['last_page'] ?? 1)); @endphp @if ($lastPage > 1) <nav class="mt-4 d-flex justify-content-center" aria-label="Paginação de notícias"> <ul class="pagination"> <li class="page-item {{ $currentPage <= 1 ? 'disabled' : '' }}"> <a class="page-link" href="{{ route('noticias', ['page' => max(1, $currentPage - 1)]) }}">Anterior</a> </li> @for ($page = 1; $page <= $lastPage; $page++) <li class="page-item {{ $page === $currentPage ? 'active' : '' }}"> <a class="page-link" href="{{ route('noticias', ['page' => $page]) }}">{{ $page }}</a> </li> @endfor <li class="page-item {{ $currentPage >= $lastPage ? 'disabled' : '' }}"> <a class="page-link" href="{{ route('noticias', ['page' => min($lastPage, $currentPage + 1)]) }}">Próxima</a> </li> </ul> </nav> @endif </div> </main> @endsection
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings