2021-12-02 16:45:41 +00:00
|
|
|
<?= $this->extend('_layout') ?>
|
|
|
|
|
|
|
|
<?= $this->section('pageTitle') ?>
|
2021-12-24 17:55:56 +00:00
|
|
|
<?= lang('VideoClip.form.title') ?>
|
2021-12-02 16:45:41 +00:00
|
|
|
<?= $this->endSection() ?>
|
|
|
|
|
|
|
|
<?= $this->section('content') ?>
|
|
|
|
|
2022-01-02 14:11:05 +00:00
|
|
|
<form id="new-video-clip-form" action="<?= route_to('video-clips-create', $podcast->id, $episode->id) ?>" method="POST" class="flex flex-col items-center gap-4 xl:items-start xl:flex-row">
|
2022-03-04 14:33:48 +00:00
|
|
|
<?= csrf_field() ?>
|
2021-12-02 16:45:41 +00:00
|
|
|
|
2022-01-02 14:11:05 +00:00
|
|
|
<div class="flex-1 w-full rounded-xl border-3 border-subtle">
|
|
|
|
<video-clip-previewer duration="<?= old('duration', 30) ?>">
|
2022-01-21 18:07:43 +00:00
|
|
|
<img slot="preview_image" src="<?= $episode->cover->thumbnail_url ?>" alt="<?= $episode->cover->description ?>" loading="lazy" />
|
2021-12-30 17:09:24 +00:00
|
|
|
</video-clip-previewer>
|
2023-07-01 13:46:03 +00:00
|
|
|
<audio-clipper start-time="<?= old('start_time', 0) ?>" audio-duration="<?= $episode->audio->duration ?>" duration="<?= old('duration', $episode->audio->duration >= 60 ? 60 : $episode->audio->duration) ?>" volume=".5" height="50" trim-start-label="<?= lang('VideoClip.form.trim_start') ?>" trim-end-label="<?= lang('VideoClip.form.trim_end') ?>">
|
2023-03-16 13:00:05 +00:00
|
|
|
<audio slot="audio" src="<?= $episode->audio->file_url ?>" preload="auto">
|
2021-12-28 16:59:19 +00:00
|
|
|
Your browser does not support the <code>audio</code> element.
|
|
|
|
</audio>
|
|
|
|
<input slot="start_time" type="number" name="start_time" placeholder="<?= lang('VideoClip.form.start_time') ?>" step="0.001" />
|
|
|
|
<input slot="duration" type="number" name="duration" placeholder="<?= lang('VideoClip.form.duration') ?>" step="0.001" />
|
|
|
|
</audio-clipper>
|
|
|
|
</div>
|
|
|
|
|
2022-01-02 14:11:05 +00:00
|
|
|
<div class="flex flex-col items-end w-full max-w-xl xl:max-w-sm 2xl:max-w-xl gap-y-4">
|
2024-05-09 17:55:41 +00:00
|
|
|
<x-Forms.Section title="<?= lang('VideoClip.form.params_section_title') ?>" >
|
|
|
|
<x-Forms.Field
|
2022-01-03 13:52:07 +00:00
|
|
|
name="title"
|
2024-01-24 16:48:23 +00:00
|
|
|
label="<?= esc(lang('VideoClip.form.clip_title')) ?>"
|
2024-05-09 17:55:41 +00:00
|
|
|
isRequired="true"
|
2022-01-02 14:11:05 +00:00
|
|
|
/>
|
|
|
|
<fieldset class="flex flex-wrap gap-x-1 gap-y-2">
|
|
|
|
<legend><?= lang('VideoClip.form.format.label') ?></legend>
|
2024-05-09 17:55:41 +00:00
|
|
|
<x-Forms.RadioButton
|
2022-01-02 14:11:05 +00:00
|
|
|
value="landscape"
|
|
|
|
name="format"
|
2024-05-12 18:38:33 +00:00
|
|
|
isSelected="true"
|
2024-05-09 17:55:41 +00:00
|
|
|
isRequired="true"
|
|
|
|
hint="<?= esc(lang('VideoClip.form.format.landscape_hint')) ?>"><?= lang('VideoClip.format.landscape') ?></x-Forms.RadioButton>
|
|
|
|
<x-Forms.RadioButton
|
2022-01-02 14:11:05 +00:00
|
|
|
value="portrait"
|
|
|
|
name="format"
|
2024-05-09 17:55:41 +00:00
|
|
|
isRequired="true"
|
|
|
|
hint="<?= esc(lang('VideoClip.form.format.portrait_hint')) ?>"><?= lang('VideoClip.format.portrait') ?></x-Forms.RadioButton>
|
|
|
|
<x-Forms.RadioButton
|
2022-01-02 14:11:05 +00:00
|
|
|
value="squared"
|
|
|
|
name="format"
|
2024-05-09 17:55:41 +00:00
|
|
|
isRequired="true"
|
|
|
|
hint="<?= esc(lang('VideoClip.form.format.squared_hint')) ?>"><?= lang('VideoClip.format.squared') ?></x-Forms.RadioButton>
|
2022-01-02 14:11:05 +00:00
|
|
|
</fieldset>
|
|
|
|
<fieldset>
|
|
|
|
<legend><?= lang('VideoClip.form.theme') ?></legend>
|
|
|
|
<div class="grid gap-x-4 gap-y-2 grid-cols-colorButtons">
|
2024-04-28 16:39:01 +00:00
|
|
|
<?php foreach (config('MediaClipper')->themes as $themeName => $colors): ?>
|
2024-05-09 17:55:41 +00:00
|
|
|
<x-Forms.ColorRadioButton
|
2022-01-02 14:11:05 +00:00
|
|
|
class="mx-auto"
|
2022-03-25 14:37:14 +00:00
|
|
|
value="<?= esc($themeName) ?>"
|
2022-01-02 14:11:05 +00:00
|
|
|
name="theme"
|
2024-05-09 17:55:41 +00:00
|
|
|
isRequired="true"
|
2024-05-12 18:38:33 +00:00
|
|
|
isSelected="<?= $themeName === 'pine' ? 'true' : 'false' ?>"
|
2024-05-09 17:55:41 +00:00
|
|
|
style="--color-accent-base: <?= $colors['preview']?>; --color-background-preview: <?= $colors['preview-background'] ?>"><?= lang('Settings.theme.' . $themeName) ?></x-Forms.ColorRadioButton>
|
2022-01-02 14:11:05 +00:00
|
|
|
<?php endforeach; ?>
|
|
|
|
</div>
|
|
|
|
</fieldset>
|
2024-05-09 17:55:41 +00:00
|
|
|
</x-Forms.Section>
|
2024-12-17 15:06:08 +00:00
|
|
|
<?php // @icon("arrow-right-fill")?>
|
2024-05-09 17:55:41 +00:00
|
|
|
<x-Button variant="primary" type="submit" iconRight="arrow-right-fill" class="self-end"><?= lang('VideoClip.form.submit') ?></x-Button>
|
2021-12-07 16:58:12 +00:00
|
|
|
</div>
|
2021-12-02 16:45:41 +00:00
|
|
|
</form>
|
|
|
|
|
|
|
|
<?= $this->endSection() ?>
|