FEATURE Adding new style variation 'stacked-background' to custom video block and updating section wrapper attributes for improved flexibility

This commit is contained in:
Antoine M 2025-12-11 15:28:13 +01:00
parent 03bfa6ba7b
commit a7076f1b2e
2 changed files with 9 additions and 1 deletions

View File

@ -17,6 +17,12 @@
"full"
]
},
"styles": [
{
"name": "stacked-background",
"label": "Fond empilé"
}
],
"acf": {
"mode": "auto",
"renderTemplate": "custom-video.php"

View File

@ -3,7 +3,9 @@ $custom_video_id = get_field('custom_video_id');
?>
<section class="block-custom-video custom-video content-section">
<section <?php echo get_block_wrapper_attributes(array('class' => 'block-custom-video custom-video content-section')) ?>>
<div style="position: relative; width: 100%; padding-bottom: 56.25%; height: 0; overflow: hidden;">
<iframe id="ik-vod-<?php echo $custom_video_id; ?>" class="ik-player-1jhvl2upwockr ik-embed" src="https://player.vod2.infomaniak.com/embed/<?php echo $custom_video_id; ?>" width="100%" height="100%" style="position: absolute; top: 0; left: 0; right: 0; bottom: 0" allowfullscreen crossorigin="anonymous" frameborder="0" allow="autoplay; fullscreen; picture-in-picture"></iframe>
</div>