@extends('layouts.app') @section('content') @while (have_posts()) @php(the_post()) @php($categories = get_the_category())
@if (has_post_thumbnail()) {!! get_the_post_thumbnail(null, 'large', ['class' => 'post-hero__img', 'loading' => 'eager']) !!} @endif
@if (! empty($categories)) {{ $categories[0]->name }} @else {{ __('Novost', 'elit-gastro') }} @endif · {{ get_the_date() }}

{{ get_the_title() }}

@if (has_excerpt())

{{ get_the_excerpt() }}

@endif
@if (function_exists('get_avatar')) {!! get_avatar(get_the_author_meta('ID'), 44, '', '', ['class' => 'post-hero__avatar']) !!} @endif
{{ get_the_author() }}
@php($readContent = strip_tags(apply_filters('the_content', get_the_content()))) @php($readMinutes = max(1, (int) ceil(str_word_count($readContent) / 200)))
{{ sprintf(__('%d min čitanja', 'elit-gastro'), $readMinutes) }}
@php(the_content()) {!! wp_link_pages(['before' => '', 'echo' => 0]) !!}
@php($tags = get_the_tags()) @if (! empty($tags))
@foreach ($tags as $tag) @endforeach
@endif
@php($prev = get_previous_post()) @php($next = get_next_post()) @if ($prev || $next) @endif @if (comments_open() || get_comments_number()) @php(comments_template()) @endif @endwhile @endsection