This commit is contained in:
parent
ecedeaa484
commit
70bd4f2f2c
7 changed files with 71 additions and 53 deletions
|
|
@ -63,6 +63,13 @@ tabs:
|
|||
width: 1/3
|
||||
when:
|
||||
heroType: video
|
||||
heroCaption:
|
||||
label: Légende du hero
|
||||
type: writer
|
||||
nodes: false
|
||||
marks:
|
||||
- italic
|
||||
help: "Recommandé : 140 caractères max"
|
||||
body:
|
||||
label: Corps
|
||||
type: layout
|
||||
|
|
|
|||
|
|
@ -17,9 +17,6 @@
|
|||
<main>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<header class="page__header">
|
||||
<p class="page__type">Enquête</p>
|
||||
<h2 class="page__title"><?= $page->title()->esc() ?></h2>
|
||||
|
|
@ -39,7 +36,9 @@
|
|||
<figure>
|
||||
<img src="<?= $heroImage->url() ?>" alt="<?= $page->title()->esc() ?>">
|
||||
</figure>
|
||||
<?php if ($heroImage->caption()->isNotEmpty()): ?>
|
||||
<?php if ($page->heroCaption()->isNotEmpty()): ?>
|
||||
<figcaption><?= $page->heroCaption()->inline() ?></figcaption>
|
||||
<?php elseif ($heroImage->caption()->isNotEmpty()): ?>
|
||||
<figcaption><?= $heroImage->caption() ?></figcaption>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
|
@ -50,19 +49,23 @@
|
|||
<div id="summary__hero" class="hero-video">
|
||||
<div class="player-container">
|
||||
|
||||
<?php if ($page->videoExtractUrl()->isNotEmpty()): ?>
|
||||
<?php if ($videoPreview = $page->videoPreview()->toFile()): ?>
|
||||
<div class="extract">
|
||||
<video class="vjs-tech" id="player-element_html5_api" tabindex="-1" loop="" muted="muted" playsinline="playsinline" autoplay="" src="<?= $page->videoExtractUrl() ?>"></video>
|
||||
<video class="vjs-tech" id="player-element_html5_api" tabindex="-1" loop="" muted="muted" playsinline="playsinline" autoplay="" src="<?= $videoPreview->url() ?>"></video>
|
||||
<button id="hero-play-video"><span class="btn--bold"><?= svg('assets/icons/play.svg') ?> <span class="text">play video</span></button>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php if ($page->videoFullUrl()->isNotEmpty()): ?>
|
||||
<?php if ($page->videoUrl()->isNotEmpty()): ?>
|
||||
<div class="video-full">
|
||||
<iframe rel="0" frameborder="0" allowfullscreen="" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" title="<?= $page->title()->esc() ?>" width="480" height="320" src="<?= $page->videoFullUrl() ?>"></iframe>
|
||||
<iframe rel="0" frameborder="0" allowfullscreen="" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" title="<?= $page->title()->esc() ?>" width="480" height="320" src="<?= $page->videoUrl() ?>"></iframe>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
<?php if ($page->heroCaption()->isNotEmpty()): ?>
|
||||
<figcaption><?= $page->heroCaption()->inline() ?></figcaption>
|
||||
<?php endif ?>
|
||||
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue