mirror of
https://github.com/a2nt/silverstripe-elemental-basics.git
synced 2024-10-22 17:05:54 +02:00
FIX: SlideItem templates
This commit is contained in:
parent
f4b3350361
commit
165c69b757
21
templates/Includes/SlideItem.ss
Executable file
21
templates/Includes/SlideItem.ss
Executable 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 %>
|
26
templates/Includes/SlideItem_media.ss
Executable file
26
templates/Includes/SlideItem_media.ss
Executable 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 %>
|
Loading…
Reference in New Issue
Block a user