Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REFACTOR Bootstrap Templates #215

Open
wants to merge 1 commit into
base: 5
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 0 additions & 48 deletions css/silverstripe-flexslider.css

This file was deleted.

9 changes: 5 additions & 4 deletions templates/Dynamic/FlexSlider/Model/SlideImage_Image.ss
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<% if $SlideLink %><% with $SlideLink %><a href="$LinkURL"{$TargetAttr}$ClassAttr title="$Title"><% end_with %><% end_if %>
<% if $Image %>
<img src="$Image.Fill(1200,600).URL" alt="<% if $Headline %>$Headline<% end_if %>">
<img src="$Image.Fill(1200,600).URL" alt="<% if $Headline %>$Headline<% end_if %>" class="card-img-top">
<% end_if %>
<% if $SlideLink %></a><% end_if %>

<% if $Headline %><h2>$Headline</h2><% end_if %>
<% if $Description %><p>$Description</p><% end_if %>
<div class="card-body">
<% if $Headline %><h2 class="card-title">$Headline</h2><% end_if %>
<% if $Description %><p class="card-text">$Description</p><% end_if %>
<% if $SlideLink %>
<div>
$SlideLink
</div>
<% end_if %>
</div>
14 changes: 8 additions & 6 deletions templates/Includes/FlexSlider.ss
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<% require css('dynamic/flexslider: thirdparty/flexslider/flexslider.css') %>
<% require css('dynamic/flexslider: css/silverstripe-flexslider.css') %>
<% if $SlideShow %>
<div class="slideshow">
<div class="flexslider">
<div class="row slideshow">
<div class="flexslider card col-md-12">
<ul class="slides">
<% loop $SlideShow %>
<li>
Expand All @@ -18,17 +17,20 @@
</ul>
</div>
<% if $ThumbnailNav && $SlideShow.Count > 1 %>
<div class="fs-carousel">
<div class="fs-carousel col-md-12">
<ul class="slides">
<% loop $SlideShow %>
<li>
<% if $Image %>
<img src="$Image.URL" alt="$Image.Title" class="slide">
<img src="$Image.Fill(200,200).URL" alt="$Image.Title" class="slide">
<% end_if %>
</li>
<% end_loop %>
</ul>
</div>
<% end_if %>
</div>
</div>
<% require javascript('//code.jquery.com/jquery-3.6.1.min.js') %>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on our convo, if we can localize this and not call it from the CDN it could then be blocked by developers if they bring their own version.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now just copying it to a thridparty directory is fine, we can look at FE workflows in a later commit.

<% require javascript('dynamic/flexslider: thirdparty/flexslider/jquery.flexslider-min.js') %>
<% end_if %>