Files
2026-07-03 17:53:31 +02:00

49 lines
4.8 KiB
HTML

<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:section name="HeaderAssets">
<link rel="preconnect" href="https://www.youtube-nocookie.com">
<link rel="preconnect" href="https://www.youtube.com">
<link rel="preconnect" href="https://i.ytimg.com">
<link rel="preconnect" href="https://i9.ytimg.com">
<link rel="preconnect" href="https://s.ytimg.com">
</f:section>
<f:layout name="Default" />
<f:section name="Main">
<f:if condition="{youtubevideos -> f:count()} < {data.tx_youtubevideo_colcount}">
<f:then><f:variable name="colCount">{youtubevideos -> f:count()}</f:variable></f:then>
<f:else><f:variable name="colCount">{data.tx_youtubevideo_colcount}</f:variable></f:else>
</f:if>
<f:variable name="spaceWidthTotal">{colCount - 1 * settings.colspacewidth}</f:variable>
<f:variable name="itemWidth">{100 - spaceWidthTotal / colCount}</f:variable>
<f:variable name="spaceInPx">{colCount - 1 * settings.colspacewidth / 100 * settings.coverimagewidth}</f:variable>
<f:variable name="coverImageWidth">{settings.coverimagewidth - spaceInPx / colCount}</f:variable>
<f:variable name="coverImageWidth_x2">{coverImageWidth * 2}</f:variable>
<f:if condition="{youtubevideos -> f:count()} > 1">
<div id="youtubevideogallery-{data.uid}" class="youtubevideogallery colcount-{colCount}">
</f:if>
<f:for each="{youtubevideos}" as="item" iteration="iterator">
<f:render partial="Item" arguments="{_all}" />
<f:if condition="{iterator.isLast} != 1"><div class="space" style="width: {settings.colspacewidth}%; padding-bottom: {settings.colspacewidth}%;"></div></f:if>
</f:for>
<f:if condition="{youtubevideos -> f:count()} > 1">
</div>
</f:if>
<f:if condition="{pagination.numberOfPages} > 1">
<f:render partial="Pagination" arguments="{pagination:pagination}" />
</f:if>
<f:if condition="!{gdprnote}">
<f:then><script>disableGdpr = 1;</script></f:then>
<f:else><script>disableGdpr = 0;</script></f:else>
</f:if>
</f:section>
<f:section name="FooterAssets">
<script>
function getCookie(t){var e=("; "+document.cookie).split("; "+t+"=");return 2==e.length?e.pop().split(";").shift():null}function gdprCancel(){var t=event.target||event.srcElement;dataYtUid=0,dataYtUid=t.getAttribute("data-yt-uid"),document.getElementById("gdpr-"+dataYtUid).style.display="none"}function gdprAgree(){document.cookie="youtubevideo-consent=1; path=/;";var t=event.target||event.srcElement;dataYtUid=0,dataYtUid=t.getAttribute("data-yt-uid"),document.getElementById("gdpr-"+dataYtUid).style.display="none",document.getElementById("coverimage-"+dataYtUid).click()}function gdprAgreeOnce(){var t=event.target||event.srcElement;dataYtUid=0,dataYtUid=t.getAttribute("data-yt-uid"),gdprAgreedOnce=dataYtUid,document.getElementById("gdpr-"+dataYtUid).style.display="none",document.getElementById("coverimage-"+dataYtUid).click()}function coverimageClick(t){t||(t=window.event);var e=t.target||t.srcElement;playerId=0,playerId=e.getAttribute("data-yt-id"),dataYtCode=0,dataYtCode=e.getAttribute("data-yt-code"),dataYtVars=0,dataYtVars=JSON.parse("{"+e.getAttribute("data-yt-vars").replace(/,\s*$/,"")+"}"),dataYtHost=0,dataYtHost=e.getAttribute("data-yt-host"),dataYtUid=0,dataYtUid=e.getAttribute("data-yt-uid"),getCookie("youtubevideo-consent")||gdprAgreedOnce==dataYtUid||disableGdpr?(youTubeApiIsLoaded?loadPlayer():loadYouTubeApi(),e.classList.add("play")):document.getElementById("gdpr-"+dataYtUid).style.display="block"}function loadYouTubeApi(){var t=document.createElement("script");t.src="https://www.youtube.com/iframe_api";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e),youTubeApiIsLoaded=1}function loadPlayer(){player=new YT.Player(playerId,{height:"390",width:"640",videoId:dataYtCode,host:dataYtHost,playerVars:dataYtVars,events:{onReady:onPlayerReady,onStateChange:onPlayerStateChange}})}function onYouTubeIframeAPIReady(){loadPlayer()}function onPlayerReady(t){player.setPlaybackRate(1),player.playVideo()}function onPlayerStateChange(t){}function stopVideo(){player.stopVideo()}function youtubevideoDetectWidth(t){for(var e=document.getElementsByClassName(t),a=0;a<e.length;++a){var d=e[a],o=e[a].clientWidth;o<containerBreakpointSmall?d.classList.add("small"):d.classList.remove("small"),o<containerBreakpointTiny?d.classList.add("tiny"):d.classList.remove("tiny")}}youTubeApiIsLoaded=0,gdprAgreedOnce=0,youtubevideoDetectWidth("youtubevideo"),window.addEventListener("resize",function(){youtubevideoDetectWidth("youtubevideo")});
</script>
<f:comment>
<script type="text/javascript" src="{f:uri.resource(path: 'JavaScript/youtubevideo.js', extensionName: 'Youtubevideo')}"></script>
</f:comment>
</f:section>
</html>