Wähle das Vorschaubild am Medium und nutze es als Standard in der Anzeige und in Modulen.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
f86032cb5f
commit
8e77defaca
18 files changed
+664
-26
No files matched your search
@@ -1,11 +1,12 @@
|
||||
@php
|
||||
$metadata = is_array($version->metadata) ? $version->metadata : [];
|
||||
$class = $version->element->output_class;
|
||||
$poster = \App\Domain\Media\ThumbnailRef::url('editorial.card', 'element', $version->element->id, $version->element->thumbnail_path);
|
||||
@endphp
|
||||
|
||||
@if ($fileUrl)
|
||||
@if ($class === 'film')
|
||||
<video controls preload="metadata" playsinline src="{{ $fileUrl }}" style="width: 100%; max-height: 70vh; background: #111;"></video>
|
||||
<video controls preload="metadata" playsinline @if ($poster) poster="{{ $poster }}" @endif src="{{ $fileUrl }}" style="width: 100%; max-height: 70vh; background: #111;"></video>
|
||||
@elseif ($class === 'audio')
|
||||
<audio controls preload="metadata" src="{{ $fileUrl }}" style="width: 100%;"></audio>
|
||||
@elseif ($class === 'bild')
|
||||
|
||||
@@ -21,6 +21,46 @@
|
||||
<p>{{ $pillars === [] ? 'Keiner Säule zugeordnet.' : implode(' · ', $pillars) }}</p>
|
||||
</section>
|
||||
|
||||
@if ($canRevise || $pictureUrl)
|
||||
<section style="display: grid; gap: 0.75rem; max-width: 40rem;">
|
||||
<h2 style="font-size: 1.125rem; font-weight: 600;">Vorschaubild</h2>
|
||||
<p>Gilt für die Anzeige dieses Mediums und als Vorschlag in Modulen und Programmen, solange die dort kein eigenes Titelbild haben. Eine Inhaltsfassung entsteht dabei nicht.</p>
|
||||
@if ($pictureUrl)
|
||||
<img src="{{ $pictureUrl }}" alt="{{ $element->thumbnail_alt ?: $element->working_title }}" style="width: 100%; max-width: 28rem; height: auto; background: #111;">
|
||||
@else
|
||||
<p>Noch kein Vorschaubild.</p>
|
||||
@endif
|
||||
@if ($pictureCaption !== '')
|
||||
<p>{{ $pictureCaption }}</p>
|
||||
@endif
|
||||
@if ($this->pictureFeedback !== '')
|
||||
<p role="status">{{ $this->pictureFeedback }}</p>
|
||||
@endif
|
||||
@if ($canRevise)
|
||||
<label for="bild-alternativ">Alternativtext</label>
|
||||
<input id="bild-alternativ" type="text" wire:model="thumbnailAlt" placeholder="Was das Bild zeigt">
|
||||
@if ($element->output_class === 'film' && $shown)
|
||||
<div x-data="{ second: {{ json_encode($this->frameSecond) }} }">
|
||||
<label for="filmstelle">Zeitposition in Sekunden</label>
|
||||
<input id="filmstelle" type="range" min="0" max="120" step="0.5" x-model="second" @change="$wire.set('frameSecond', second)">
|
||||
<input type="number" min="0" max="7200" step="0.1" x-model="second" @change="$wire.set('frameSecond', second)" aria-label="Zeitposition als Zahl">
|
||||
</div>
|
||||
<p>Die Vorschau nimmt die kleine Filmstufe, sofern sie vorliegt. Die Filmdatei selbst bleibt unverändert.</p>
|
||||
@if ($frameUrl = $this->framePreviewUrl())
|
||||
<img src="{{ $frameUrl }}" alt="Vorschau der gewählten Filmstelle" style="width: 100%; max-width: 28rem; height: auto;">
|
||||
@endif
|
||||
<button type="button" wire:click="adoptFrame">Diese Stelle übernehmen</button>
|
||||
@endif
|
||||
@if ($element->output_class === 'bild')
|
||||
<button type="button" wire:click="useOwnImage">Die Bilddatei verwenden</button>
|
||||
@endif
|
||||
<label for="vorschau-bild">Eigenes Vorschaubild</label>
|
||||
<input id="vorschau-bild" type="file" accept="image/png,image/jpeg,image/webp" wire:model="previewUpload">
|
||||
<button type="button" wire:click="storePreview">Bild übernehmen</button>
|
||||
@endif
|
||||
</section>
|
||||
@endif
|
||||
|
||||
<section style="display: grid; gap: 0.75rem;">
|
||||
@if ($shown === null)
|
||||
<p>Noch keine Fassung.</p>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
@endif
|
||||
@if ($entry['playable'])
|
||||
<div class="player">
|
||||
<video controls preload="metadata" playsinline @if (($entry['playback'] ?? 'file') === 'hls') data-hls="{{ $entry['url'] }}" @else src="{{ $entry['url'] }}" @endif></video>
|
||||
<video controls preload="metadata" playsinline @if ($poster = \App\Domain\Media\ThumbnailRef::url('member.thumbnail', 'element', $entry['version']->element->id, $entry['version']->element->thumbnail_path)) poster="{{ $poster }}" @endif @if (($entry['playback'] ?? 'file') === 'hls') data-hls="{{ $entry['url'] }}" @else src="{{ $entry['url'] }}" @endif></video>
|
||||
<button class="button button-quiet" type="button" data-fullscreen>Vollbild</button>
|
||||
</div>
|
||||
@elseif ($entry['allowed'] && $entry['url'])
|
||||
|
||||
@@ -74,10 +74,6 @@
|
||||
'href' => route('member.program', $program['composition']),
|
||||
'card' => $program + [
|
||||
'error' => $program['composition']->thumbnail_error,
|
||||
'image' => filled($program['composition']->thumbnail_path) ? ($program['composition']->thumbnail_alt ?: 'Vorschaubild') : null,
|
||||
'image_url' => str_starts_with((string) $program['composition']->thumbnail_path, 'vorschau/')
|
||||
? route('member.thumbnail', ['kind' => 'komposition', 'subject' => $program['composition']->id])
|
||||
: null,
|
||||
],
|
||||
])
|
||||
@endforeach
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
@if ($node['output_class'] === 'audio')
|
||||
<audio controls preload="metadata" src="{{ $node['view_url'] }}"></audio>
|
||||
@else
|
||||
<video controls preload="metadata" playsinline @if (($node['playback'] ?? 'file') === 'hls') data-hls="{{ $node['view_url'] }}" @else src="{{ $node['view_url'] }}" @endif></video>
|
||||
<video controls preload="metadata" playsinline @if ($node['poster_url'] ?? null) poster="{{ $node['poster_url'] }}" @endif @if (($node['playback'] ?? 'file') === 'hls') data-hls="{{ $node['view_url'] }}" @else src="{{ $node['view_url'] }}" @endif></video>
|
||||
<button class="button button-quiet" type="button" data-fullscreen>Vollbild</button>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
<div>
|
||||
<dt>Vorschaubild</dt>
|
||||
<dd>
|
||||
@if (str_starts_with((string) $composition->thumbnail_path, 'vorschau/'))
|
||||
<img src="{{ route('member.thumbnail', ['kind' => 'komposition', 'subject' => $composition->id]) }}" alt="{{ $composition->thumbnail_alt ?: 'Vorschaubild' }}">
|
||||
@if ($picture)
|
||||
<img src="{{ route('member.thumbnail', ['kind' => $picture['kind'], 'subject' => $picture['subject']]) }}" alt="{{ $picture['alt'] ?: 'Vorschaubild' }}">
|
||||
@else
|
||||
Platzhalter
|
||||
@endif
|
||||
|
||||
Reference in new issue
Block a user