Files
timebank-cc-public/resources/views/livewire/system-announcement.blade.php
Ronald Huynen 2547717edb Initial commit
2026-03-23 21:37:59 +01:00

34 lines
1.5 KiB
PHP

<div>
@if($posts->isNotEmpty())
@foreach($posts as $post)
@php
// Find the translation for the current locale.
$translation = $post->translations->firstWhere('locale', $locale);
// If no translation is found for the current locale, use the fallback.
if (!$translation) {
$translation = $post->translations->firstWhere('locale', 'like', $fallbackLocale);
}
@endphp
@if ($translation)
<div class="bg-theme-background">
<div class="max-w-full sm:mx-auto mr-16 ml-2 bg-theme-background text-2xs sm:text-sm text-center text-red-700 py-2">
<!-- <div class="max-w-7xl mx-auto bg-white text-2xs sm:text-sm text-center text-red-700 py-2 sm:px-6 lg:px-8"> -->
<span class="font-semibold pr-2">
<!-- Title Static Post-->
@if (isset($translation->title))
{{ $translation->title }}
@endif
</span>
<!-- Excerpt Static Post-->
@if (isset($translation->excerpt) && strlen(trim(strip_tags($translation->excerpt))) > 0)
{{ $translation->excerpt }}
@endif
</div>
</div>
@endif
@endforeach
@endif
</div>