FIX: SlideItem templates

This commit is contained in:
Tony Air 2021-06-19 20:13:41 +02:00
parent f4b3350361
commit 165c69b757
2 changed files with 47 additions and 0 deletions

21
templates/Includes/SlideItem.ss Executable file
View File

@ -0,0 +1,21 @@
<% include SlideItem_media %>
<% if $Content || $Headline || $CustomTitle || $Description || $SlideLinkID %>
<div class="container">
<div class="carousel-caption">
<div class="carousel-caption-container typography">
<% if $Headline %>
<h2 class="carousel-title">
$Headline
</h2>
<% end_if %>
<% if $Content %>
<div class="carousel-content">$Content</div>
<% else_if $Description %>
<p class="carousel-content">$Description</p>
<% end_if %>
</div>
</div>
</div>
<% end_if %>

View File

@ -0,0 +1,26 @@
<% if $Video || $Image %>
<% if $Video %>
<div class="video">
$Video.EmbedHTML.RAW
</div>
<% else %>
<% if $Image || $ImageURL %>
<span class="img">
<img class="carousel__img"
src="{$EmptyImgSrc}"
data-lazy-src="<% if $ImageURL %>$ImageURL<% else %>$Image.FocusFill($SlideWidth,$SlideHeight).URL<% end_if %>"
alt="<% if $Headline %>$Headline.XML<% end_if %>"
/>
</span>
<% end_if %>
<% if $SlideLinkID %>
<% with $SlideLink %>
<% include NavItem_link MenuTitle=$Title, Link=$LinkURL, LinkClass="stretched-link slide-link slide-link__media" %>
<% end_with %>
<% else_if $SlideLinkURL %>
<% include NavItem_link MenuTitle=$Headline, Link=$SlideLinkURL, LinkClass="stretched-link slide-link slide-link__media" %>
<% end_if %>
<% end_if %>
<% end_if %>