204 lines
12 KiB
PHP
204 lines
12 KiB
PHP
<x-guest-layout>
|
|
<x-slot name="header">
|
|
{{ $category }}
|
|
</x-slot>
|
|
|
|
<div class="py-0 md:py-12" id="custom-timebank-style">
|
|
<div class="mx-auto max-w-7xl sm:px-6 lg:px-8">
|
|
<div class="overflow-hidden bg-theme-background shadow-xl sm:rounded-lg">
|
|
<div class="border-b border-theme-primary bg-theme-background p-6 sm:px-20 lg:px-32 lg:py-18">
|
|
|
|
|
|
<div class="mb-2 mt-0 lg:mt-6 flex justify-between">
|
|
<span class="text-xs lg:text-sm text-theme-secondary">{{ $update }}</span>
|
|
</div>
|
|
<h2 class="mt-4 lg:mt-8 text-3xl lg:text-5xl font-semibold leading-tight text-theme-primary">
|
|
{{ $post->translations->first()->title }}
|
|
</h2>
|
|
|
|
@if ($post->category && $post->category->type === 'App\Models\Article' && $post->author)
|
|
<div class="mt-6 flex items-center space-x-4 cursor-pointer hover:opacity-80"
|
|
onclick="window.location='{{ $post->author->profile_url }}'">
|
|
@if ($post->author->profile_photo_path)
|
|
<img class="h-9 w-9 rounded-full profile-photo object-cover outline outline-1 outline-offset-1 outline-theme-secondary"
|
|
src="{{ url(Storage::url($post->author->profile_photo_path)) }}"
|
|
alt="{{ $post->author->full_name ?? $post->author->name }}">
|
|
@endif
|
|
<span class="text-lg">
|
|
{{ $post->author->full_name ?? $post->author->name }}
|
|
</span>
|
|
</div>
|
|
@endif
|
|
|
|
@if (isset($post->meeting->from))
|
|
<h3 class="mt-4 lg:mt-8 text-xl lg:text-4xl font-semibold leading-tight text-theme-primary">
|
|
{{ ucfirst(Illuminate\Support\Carbon::parse($post->meeting->from)->isoFormat('dddd D MMMM, HH:mm')) }}{{ $post->meeting->till ? ' - ' . Illuminate\Support\Carbon::parse($post->meeting->till)->format('H:i') : '' }} {{ __('h.') }}
|
|
</h3>
|
|
@endif
|
|
@if (isset($post->translations->first()->excerpt))
|
|
<div class="mt-6">
|
|
<div class="px-0 py-2 text-xl lg:text-2xl leading-relaxed font-bold text-theme-primary">
|
|
{{ $post->translations->first()->excerpt }}
|
|
</div>
|
|
</div>
|
|
@endif
|
|
|
|
<!-- Image --->
|
|
<div class="my-4 lg:my-12">
|
|
@if ($media != null)
|
|
{{ $media('hero', ['class' => 'w-full h-auto']) }}
|
|
@php
|
|
$locale = App::getLocale();
|
|
$imageCaption = $media->getCustomProperty('caption-' . $locale);
|
|
|
|
// Fallback to other locales if caption not found
|
|
if (!$imageCaption) {
|
|
$fallbackLocales = array_keys(config('laravellocalization.supportedLocales'));
|
|
foreach ($fallbackLocales as $fallbackLocale) {
|
|
$imageCaption = $media->getCustomProperty('caption-' . $fallbackLocale);
|
|
if ($imageCaption) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
$imageOwner = $media->getCustomProperty('owner');
|
|
$captionParts = array_filter([$imageCaption, $imageOwner]);
|
|
$captionText = implode(' ', $captionParts);
|
|
@endphp
|
|
@if ($captionText)
|
|
<div class="mt-1 lg:mt-2 text-right text-3xs lg:text-xs text-theme-secondary">
|
|
{{ $captionText }}
|
|
</div>
|
|
@endif
|
|
@endif
|
|
</div>
|
|
|
|
@if (isset($post->translations->first()->content))
|
|
{{-- Post content with list styling --}}
|
|
<div class="post-content mt-2 lg:mt-6 mb-12 lg:mb-16 md:mx-32 text-base lg:text-lg leading-relaxed lg:leading-loose text-theme-primary">
|
|
{!! \App\Helpers\StringHelper::sanitizeHtml($post->translations->first()->content) !!}
|
|
</div>
|
|
@endif
|
|
|
|
@if (isset($post->meeting))
|
|
<div class="my-12 bg-theme-surface rounded-lg p-6 md:mx-32">
|
|
<table class="w-full">
|
|
<tbody>
|
|
@if($post->meeting->venue)
|
|
<tr>
|
|
<td class="py-2 pr-4 font-semibold text-theme-primary w-1/3">{{ __('Venue') }}</td>
|
|
<td class="py-2 text-theme-primary">{{ $post->meeting->venue }}</td>
|
|
</tr>
|
|
@endif
|
|
|
|
@if($post->meeting->address)
|
|
<tr>
|
|
<td class="py-2 pr-4 font-semibold text-theme-primary w-1/3">{{ __('Address') }}</td>
|
|
<td class="py-2 text-theme-primary">
|
|
<a href="https://www.openstreetmap.org/search?query={{ urlencode($post->meeting->address) }}"
|
|
target="_blank"
|
|
class="underline hover:text-theme-secondary">
|
|
{{ $post->meeting->address }}
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
@endif
|
|
|
|
@if($post->meeting->from)
|
|
<tr>
|
|
<td class="py-2 pr-4 font-semibold text-theme-primary w-1/3">{{ __('Date & Time') }}</td>
|
|
<td class="py-2 text-theme-primary">{{ ucfirst(Illuminate\Support\Carbon::parse($post->meeting->from)->isoFormat('dddd D MMMM YYYY, H:mm')) }}{{ $post->meeting->till ? ' - ' . Illuminate\Support\Carbon::parse($post->meeting->till)->format('H:i') : '' }} {{ __('h.') }}</td>
|
|
</tr>
|
|
@endif
|
|
|
|
@if(isset($post->meeting->meetingable->name))
|
|
<tr>
|
|
<td class="py-2 pr-4 font-semibold text-theme-primary w-1/3">{{ __('Organizer') }}</td>
|
|
<td class="py-2 text-theme-primary">
|
|
<a href="{{ $post->meeting->meetingable->profile_url }}"
|
|
class="flex items-center space-x-3 hover:opacity-80 cursor-pointer">
|
|
@if(isset($post->meeting->meetingable->profile_photo_path))
|
|
<img src="{{ url(Storage::url($post->meeting->meetingable->profile_photo_path)) }}"
|
|
class="w-10 h-10 rounded-full profile-photo object-cover">
|
|
@endif
|
|
<span>{{ $post->meeting->meetingable->name }}</span>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
@endif
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="my-12 flex flex-col md:flex-row justify-between gap-6">
|
|
<!-- Social Share Buttons + Print -->
|
|
<div class="md:self-end">
|
|
<div class="flex flex-wrap gap-2">
|
|
{!! Share::mastodon()
|
|
->bluesky()
|
|
->linkedin()
|
|
->instagram()
|
|
->facebook()
|
|
->whatsapp()
|
|
{{-- ->x() --}}
|
|
{{-- ->telegram() --}}
|
|
->text($post->translations->first()->title)
|
|
->render() !!}
|
|
<a href="{{ route('post.pdf', ['id' => $post->id]) }}"
|
|
target="_blank"
|
|
title="{{ __('Print as PDF') }}"
|
|
class="inline-flex items-center justify-center rounded-md border border-theme-border bg-theme-surface p-2 transition-all duration-200 hover:opacity-80 focus:outline-none focus:ring-2 focus:ring-theme-surface focus:ring-offset-2">
|
|
<span class="inline-flex h-6 w-6 items-center justify-center">
|
|
<x-icon name="printer" class="h-5 w-5" solid />
|
|
</span>
|
|
</a>
|
|
</div>
|
|
<div class="mt-2 text-sm invisible"><!-- Spacer to match reservation count --> </div>
|
|
</div>
|
|
|
|
<!-- Reservation Button -->
|
|
<div>
|
|
<livewire:reserve-button :post="$post" :wire:key="'reserve-guest-'.$post->id" />
|
|
</div>
|
|
</div>
|
|
@else
|
|
<div class="flex flex-col md:flex-row justify-between gap-6">
|
|
<!-- Social Share Buttons + Print -->
|
|
<div class="md:self-end">
|
|
<div class="flex flex-wrap gap-2">
|
|
{!! Share::mastodon()
|
|
->bluesky()
|
|
->linkedin()
|
|
->instagram()
|
|
->facebook()
|
|
->whatsapp()
|
|
{{-- ->x() --}}
|
|
{{-- ->telegram() --}}
|
|
->text($post->translations->first()->title)
|
|
->render() !!}
|
|
<a href="{{ route('post.pdf', ['id' => $post->id]) }}"
|
|
target="_blank"
|
|
title="{{ __('Print as PDF') }}"
|
|
class="inline-flex items-center justify-center rounded-md border border-theme-border bg-theme-surface p-2 transition-all duration-200 hover:opacity-80 focus:outline-none focus:ring-2 focus:ring-theme-surface focus:ring-offset-2">
|
|
<span class="inline-flex h-6 w-6 items-center justify-center">
|
|
<x-icon name="printer" class="h-5 w-5" solid />
|
|
</span>
|
|
</a>
|
|
</div>
|
|
<div class="mt-2 text-sm invisible"><!-- Spacer to match reservation count --> </div>
|
|
</div>
|
|
</div>
|
|
|
|
@endif
|
|
<div class="my-12 flex justify-between">
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</x-guest-layout>
|