Skip to content

Commit

Permalink
[!!!][TASK] Introduce AssetPathViewHelper
Browse files Browse the repository at this point in the history
The new AssetPathViewHelper can be used inside Content Blocks
templates to get the EXT path of the current block. This can
be used in combination with f:asset and f:uri.resource VH
from Core.

ViewHelpers removed:
- cb:asset.css
- cb:asset.script
- cb:uri.resource
  • Loading branch information
nhovratov committed Aug 1, 2024
1 parent f174be2 commit cd4e1d2
Show file tree
Hide file tree
Showing 25 changed files with 50 additions and 485 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
data-namespace-typo3-fluid="true"
>

<cb:asset.css identifier="cbAccordionCssBackend" file="EditorPreview.css"/>
<f:asset.css identifier="cbAccordionCssBackend" href="{cb:assetPath()}/EditorPreview.css"/>

<div class="cb-accordion">
<f:for each="{data.accordion_item}" as="item">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
data-namespace-typo3-fluid="true"
>

<cb:asset.css identifier="cbAccordionCssFrontend" file="Frontend.css"/>
<cb:asset.script identifier="cbAccordionJsFrontend" file="Frontend.js"/>
<f:asset.css identifier="cbAccordionCssFrontend" href="{cb:assetPath()}/Frontend.css"/>
<f:asset.script identifier="cbAccordionJsFrontend" src="{cb:assetPath()}/Frontend.js"/>

<div class="cb-accordion">
<f:for each="{data.accordion_item}" as="item">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
data-namespace-typo3-fluid="true"
>

<cb:asset.css identifier="cbCardGroupCssBackend" file="EditorPreview.css"/>
<f:asset.css identifier="cbCardGroupCssBackend" href="{cb:assetPath()}/EditorPreview.css"/>

<div class="cb-card-group">
<f:if condition="{data.card_group_item}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
data-namespace-typo3-fluid="true"
>

<cb:asset.css identifier="cbCardGroupCssFrontend" file="Frontend.css"/>
<f:asset.css identifier="cbCardGroupCssFrontend" href="{cb:assetPath()}/Frontend.css"/>

<div class="cb-card-group">
<f:if condition="{data.card_group_item}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
data-namespace-typo3-fluid="true"
>

<cb:asset.css identifier="cbCtaCssBackend" file="EditorPreview.css"/>
<f:asset.css identifier="cbCtaCssBackend" href="{cb:assetPath()}/EditorPreview.css"/>

<div class="cb-cta">
<h2>{data.header}</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
data-namespace-typo3-fluid="true"
>

<cb:asset.css identifier="cbCtaCssFrontend" file="Frontend.css"/>
<f:asset.css identifier="cbCtaCssFrontend" href="{cb:assetPath()}/Frontend.css"/>

<div class="cb-cta">
<f:if condition="{data.background_image}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
data-namespace-typo3-fluid="true"
>

<cb:asset.css identifier="cbIconGroupCssBackend" file="EditorPreview.css"/>
<f:asset.css identifier="cbIconGroupCssBackend" href="{cb:assetPath()}/EditorPreview.css"/>

<div class="cb-icon-group">
<f:if condition="{data.icon_group_item}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
data-namespace-typo3-fluid="true"
>

<cb:asset.css identifier="cbIconGroupCssFrontend" file="Frontend.css"/>
<f:asset.css identifier="cbIconGroupCssFrontend" href="{cb:assetPath()}/Frontend.css"/>

<div class="cb-icon-group">
<f:if condition="{data.icon_group_item}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
data-namespace-typo3-fluid="true"
>

<cb:asset.css identifier="cbImagesliderCssBackend" file="EditorPreview.css"/>
<f:asset.css identifier="cbImagesliderCssBackend" href="{cb:assetPath()}/EditorPreview.css"/>

<div class="cb-imageslider">
<f:for each="{data.assets}" as="asset">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
data-namespace-typo3-fluid="true"
>

<cb:asset.css identifier="cbImagesliderCssSwiffySlider" file="Library/SwiffySlider/swiffy-slider.min.css"/>
<cb:asset.script identifier="cbImagesliderJsSwiffySlider" file="Library/SwiffySlider/swiffy-slider.min.js"/>
<cb:asset.css identifier="cbImagesliderCssFrontend" file="Frontend.css"/>
<f:asset.css identifier="cbImagesliderCssSwiffySlider" href="{cb:assetPath()}/Library/SwiffySlider/swiffy-slider.min.css"/>
<f:asset.script identifier="cbImagesliderJsSwiffySlider" src="{cb:assetPath()}/Library/SwiffySlider/swiffy-slider.min.js"/>
<f:asset.css identifier="cbImagesliderCssFrontend" href="{cb:assetPath()}/Frontend.css"/>

<div class="cb-imageslider">
<div class="swiffy-slider slider-item-ratio slider-item-ratio-16x9 slider-nav-animation slider-nav-animation-fadein slider-item-first-visible" id="swiffy-animation">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
data-namespace-typo3-fluid="true"
>

<cb:asset.css identifier="cbTabsCssFrontend" file="Frontend.css"/>
<cb:asset.script identifier="cbTabsJsFrontend" file="Frontend.js"/>
<f:asset.css identifier="cbTabsCssFrontend" href="{cb:assetPath()}/Frontend.css"/>
<f:asset.script identifier="cbTabsJsFrontend" src="{cb:assetPath()}/Frontend.js"/>

<div class="cb-tabs">
<div class="tab">
Expand Down
141 changes: 0 additions & 141 deletions Classes/ViewHelpers/Asset/CssViewHelper.php

This file was deleted.

139 changes: 0 additions & 139 deletions Classes/ViewHelpers/Asset/ScriptViewHelper.php

This file was deleted.

Loading

0 comments on commit cd4e1d2

Please sign in to comment.