Skip to content

Commit

Permalink
[TASK] provide namespace for TYPO3 core viewHelper
Browse files Browse the repository at this point in the history
  • Loading branch information
freshworkx committed Mar 17, 2024
1 parent e7812a7 commit eeb58d4
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Resources/Private/Layouts/Default.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">

<div class="c-gallery">
<f:render section="main"/>
</div>
</div>

</html>
4 changes: 4 additions & 0 deletions Resources/Private/Partials/Caption.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">

<f:if condition="{caption}">
<figcaption class="c-gallery__figure-caption figure-caption" id="bmimagegallery-caption-{identifier}">{caption}</figcaption>
</f:if>

</html>
4 changes: 4 additions & 0 deletions Resources/Private/Partials/Gallery.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">

<div class="row">
<div class="col-sm-12">
<h2 class="c-gallery__title">{fileCollection.title}</h2>
Expand Down Expand Up @@ -48,3 +50,5 @@ <h2 class="c-gallery__title">{fileCollection.title}</h2>
</f:for>
</figure>
</div>

</html>
4 changes: 4 additions & 0 deletions Resources/Private/Partials/Image.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">

<figure class="c-gallery__figure figure col-sm-12 col-md-6 col-lg-3" role="group"
aria-labelledby="bmimagegallery-caption-{item.uid}">
<a class="{f:if(condition:settings.lightbox.cssClass, then:settings.lightbox.cssClass, else:'c-gallery__link')}"
Expand All @@ -12,3 +14,5 @@
</a>
<f:render partial="Caption" arguments="{caption: item.properties.title, identifier: item.uid}"/>
</figure>

</html>
6 changes: 5 additions & 1 deletion Resources/Private/Partials/Video.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">

<f:switch expression="{item.extension}">
<f:case value="youtube">
<f:render partial="Video/YouTube" arguments="{_all}"/>
</f:case>
<f:case value="vimeo">
<f:render partial="Video/Vimeo" arguments="{_all}"/>
</f:case>
</f:switch>
</f:switch>

</html>
4 changes: 4 additions & 0 deletions Resources/Private/Partials/Video/Vimeo.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">

<figure class="c-gallery__figure figure col-sm-12 col-md-6 col-lg-3" role="group"
aria-labelledby="bmimagegallery-caption-{item.identifier}">
<a class="{f:if(condition:settings.lightbox.cssClass, then:settings.lightbox.cssClass, else:'c-gallery__link c-gallery__link--vimeo')}"
Expand All @@ -11,3 +13,5 @@
</a>
<f:render partial="Caption" arguments="{caption: item.properties.title, identifier: item.identifier}"/>
</figure>

</html>
4 changes: 4 additions & 0 deletions Resources/Private/Partials/Video/YouTube.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">

<figure class="c-gallery__figure figure col-sm-12 col-md-6 col-lg-3" role="group"
aria-labelledby="bmimagegallery-caption-{item.identifier}">
<a class="{f:if(condition:settings.lightbox.cssClass, then:settings.lightbox.cssClass, else:'c-gallery__link c-gallery__link--youtube')}"
Expand All @@ -12,3 +14,5 @@
</a>
<f:render partial="Caption" arguments="{caption: item.properties.title, identifier: item.identifier}"/>
</figure>

</html>
4 changes: 4 additions & 0 deletions Resources/Private/Templates/List/Gallery.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">

<f:layout name="Default"/>

<f:section name="main">
<f:render partial="Gallery" arguments="{_all}" />
</f:section>

</html>
4 changes: 4 additions & 0 deletions Resources/Private/Templates/List/List.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">

<f:layout name="Default"/>

<f:section name="main">
Expand Down Expand Up @@ -79,3 +81,5 @@
{item.title}
</figcaption>
</f:section>

</html>

0 comments on commit eeb58d4

Please sign in to comment.