mirror of
https://github.com/a2nt/silverstripe-elemental-basics.git
synced 2024-10-22 17:05:54 +02:00
Initial Element Templates
This commit is contained in:
parent
b701d85ebc
commit
5d13db9f58
@ -31,7 +31,7 @@ DNADesign\Elemental\Models\ElementalArea:
|
||||
- A2nt\ElementalBasics\Extensions\ElementalArea
|
||||
|
||||
DNADesign\Elemental\Models\BaseElement:
|
||||
default_global_elements: true
|
||||
default_global_elements: false
|
||||
extensions:
|
||||
- A2nt\ElementalBasics\Extensions\BaseElementEx
|
||||
- A2nt\ElementalBasics\Extensions\ElementRows
|
||||
@ -58,4 +58,4 @@ DNADesign\Elemental\Models\ElementContent:
|
||||
Dynamic\Elements\Image\Elements\ElementImage:
|
||||
inline_editable: false
|
||||
extensions:
|
||||
- A2nt\ElementalBasics\Extensions\ElementImageWidget
|
||||
- A2nt\ElementalBasics\Extensions\ElementImageWidget
|
9
templates/A2nt/ElementalBasics/Elements/AccordionElement.ss
Executable file
9
templates/A2nt/ElementalBasics/Elements/AccordionElement.ss
Executable file
@ -0,0 +1,9 @@
|
||||
<% if $ShowTitle %>
|
||||
<h2 class="element__title">$Title</h2>
|
||||
<% end_if %>
|
||||
|
||||
<div class="element__content" data-listelement-count="{$Elements.Elements.Count}">
|
||||
<div id="ElementAccordion{$Elements.ID}" class="accordion">
|
||||
$Accordion
|
||||
</div>
|
||||
</div>
|
25
templates/A2nt/ElementalBasics/Elements/AccordionElement_AccordionArea.ss
Executable file
25
templates/A2nt/ElementalBasics/Elements/AccordionElement_AccordionArea.ss
Executable file
@ -0,0 +1,25 @@
|
||||
<% if $ElementFilteredControllers %>
|
||||
<% loop $ElementFilteredControllers %>
|
||||
<div class="card">
|
||||
<div
|
||||
id="ElementHeader{$ID}"
|
||||
class="card-header accordion-header a h4"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#ElementContent{$ID}"
|
||||
aria-expanded="false"
|
||||
aria-controls="ElementContent{$ID}"
|
||||
>
|
||||
$Title
|
||||
</div>
|
||||
|
||||
<div
|
||||
id="ElementContent{$ID}"
|
||||
class="accordion-content collapse"
|
||||
aria-labelledby="ElementHeader{$ID}"
|
||||
data-bs-parent="#ElementAccordion{$Parent.ID}"
|
||||
>
|
||||
$Me
|
||||
</div>
|
||||
</div>
|
||||
<% end_loop %>
|
||||
<% end_if %>
|
22
templates/A2nt/ElementalBasics/Elements/BlockElement.ss
Executable file
22
templates/A2nt/ElementalBasics/Elements/BlockElement.ss
Executable file
@ -0,0 +1,22 @@
|
||||
<div
|
||||
data-aos="fade-up"
|
||||
class="element__content<% if $BlockLink %> has-blockLink<% end_if %><% if $BlockIcon %> has-blockIcon<% end_if %><% if $Style %> $CssStyle<% end_if %>"
|
||||
>
|
||||
<% if $BlockIcon %>
|
||||
<i class="element__icon $BlockIcon"></i>
|
||||
<% end_if %>
|
||||
|
||||
<% if $ShowTitle %>
|
||||
<h2 class="element__title">$Title</h2>
|
||||
<% end_if %>
|
||||
|
||||
<div class="element__html typography">
|
||||
$HTML
|
||||
</div>
|
||||
|
||||
<% if $BlockLink %>
|
||||
<a href="$BlockLink.LinkURL" class="element__link btn btn-default stretched-link">
|
||||
$BlockLink.Title
|
||||
</a>
|
||||
<% end_if %>
|
||||
</div>
|
15
templates/A2nt/ElementalBasics/Elements/CustomSnippetElement.ss
Executable file
15
templates/A2nt/ElementalBasics/Elements/CustomSnippetElement.ss
Executable file
@ -0,0 +1,15 @@
|
||||
<div class="element__content<% if $Style %> $CssStyle<% end_if %>">
|
||||
<% if $ShowTitle %>
|
||||
<h2 class="element__title">$Title</h2>
|
||||
<% end_if %>
|
||||
|
||||
<div class="element__html typography">
|
||||
$HTML
|
||||
</div>
|
||||
|
||||
<% if $BlockLink %>
|
||||
<a href="$BlockLink.LinkURL" class="element__link btn btn-default stretched-link">
|
||||
$BlockLink.Title
|
||||
</a>
|
||||
<% end_if %>
|
||||
</div>
|
8
templates/A2nt/ElementalBasics/Elements/InstagramElement.ss
Executable file
8
templates/A2nt/ElementalBasics/Elements/InstagramElement.ss
Executable file
@ -0,0 +1,8 @@
|
||||
<% if $ShowTitle %>
|
||||
<h2 class="element__title">$Title</h2>
|
||||
<% end_if %>
|
||||
|
||||
<div class="element__content">
|
||||
<div class="element__feed jsInstagramFeed" $AttributesHTML></div>
|
||||
<div class="feed__link"><a href="{$FeedLink}" target="_blank">{$FeedTitle}</a></div>
|
||||
</div>
|
23
templates/A2nt/ElementalBasics/Elements/MapElement.ss
Executable file
23
templates/A2nt/ElementalBasics/Elements/MapElement.ss
Executable file
@ -0,0 +1,23 @@
|
||||
<% if $ShowTitle %>
|
||||
<h2 class="element__title">$Title</h2>
|
||||
<% end_if %>
|
||||
|
||||
<% if $Content %>
|
||||
<div class="element__html typography">$Content</div>
|
||||
<% end_if %>
|
||||
|
||||
<div class="element__content">
|
||||
<% include Objects\Map %>
|
||||
|
||||
<% if $Locations %>
|
||||
<div class="locations">
|
||||
<div class="row">
|
||||
<% loop $Locations %>
|
||||
<div class="col">
|
||||
$forTemplate
|
||||
</div>
|
||||
<% end_loop %>
|
||||
</div>
|
||||
</div>
|
||||
<% end_if %>
|
||||
</div>
|
24
templates/A2nt/ElementalBasics/Elements/SliderElement.ss
Executable file
24
templates/A2nt/ElementalBasics/Elements/SliderElement.ss
Executable file
@ -0,0 +1,24 @@
|
||||
<% if $ShowTitle || $Content %>
|
||||
<div class="slider-caption">
|
||||
<% if $ShowTitle %>
|
||||
<h2 class="element__title">$Title</h2>
|
||||
<% end_if %>
|
||||
<% if $Content %><div class="element__html typography">$Content</div><% end_if %>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
<% if $SlideShow %>
|
||||
<div class="element__content">
|
||||
<div id="Carousel{$ID}" class="element__carousel carousel slide js-carousel"<% if $SlideShow.count > 1 %><% if $Interval %> data-interval="$Interval"<% end_if %> data-indicators="true" data-arrows="true"<% end_if %>>
|
||||
<div class="carousel-inner">
|
||||
<% loop $SlideShow %>
|
||||
<div class="carousel-item carousel-item-{$SlideType}<% if no $Controls %> carousel-item-nocontrols<% end_if %><% if $First %> active<% end_if %>">
|
||||
<div class="carousel-slide">
|
||||
<% include SlideItem %>
|
||||
</div>
|
||||
</div>
|
||||
<% end_loop %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end_if %>
|
17
templates/A2nt/ElementalBasics/Elements/TeamMembersElement.ss
Executable file
17
templates/A2nt/ElementalBasics/Elements/TeamMembersElement.ss
Executable file
@ -0,0 +1,17 @@
|
||||
<% if $Members %>
|
||||
<div class="element__content<% if $Style %> $CssStyle<% end_if %>">
|
||||
<% if $ShowTitle %>
|
||||
<h2 class="element__title">$Title</h2>
|
||||
<% end_if %>
|
||||
|
||||
<div class="element__content">
|
||||
<div class="row">
|
||||
<% loop $Members %>
|
||||
<div class="col-sm-3">
|
||||
<% include Objects\HCard %>
|
||||
</div>
|
||||
<% end_loop %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end_if %>
|
Loading…
Reference in New Issue
Block a user