Skip to content

Commit

Permalink
[TASK] 馃帀 Adding support for TYPO3 v11 and Bootstrap Package v12
Browse files Browse the repository at this point in the history
  • Loading branch information
baschte committed Sep 12, 2021
1 parent 1712f8e commit b0631b2
Show file tree
Hide file tree
Showing 12 changed files with 127 additions and 11 deletions.
1 change: 1 addition & 0 deletions Configuration/TCA/Overrides/sys_template.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

// add static typoscript includes
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('content_animations', 'Configuration/TypoScript', 'Content Animations: Basic Configuration');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('content_animations', 'Configuration/TypoScript/BootstrapPackage/v12', 'Content Animations: Bootstrap Package v12.x');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('content_animations', 'Configuration/TypoScript/BootstrapPackage/v11', 'Content Animations: Bootstrap Package v11.x');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('content_animations', 'Configuration/TypoScript/BootstrapPackage/v10', 'Content Animations: Bootstrap Package v10.x');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('content_animations', 'Configuration/TypoScript/BootstrapPackage/v9', 'Content Animations: Bootstrap Package v9.x');
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# import default constants for content_animations
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:content_animations/Configuration/TypoScript/constants.typoscript">
13 changes: 13 additions & 0 deletions Configuration/TypoScript/BootstrapPackage/v12/setup.typoscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# import default setup for content_animations
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:content_animations/Configuration/TypoScript/setup.typoscript">

# support for bootstrap_package v11
lib.contentElement {
layoutRootPaths.100 = EXT:content_animations/Resources/Private/Layouts/BootstrapPackage/v12/
variables {
aos-easing < plugin.tx_content_animations.variables.aos-easing
aos-once < plugin.tx_content_animations.variables.aos-once
aos-mirror < plugin.tx_content_animations.variables.aos-mirror
}
dataProcessing.78911002 < plugin.tx_content_animations.dataProcessing.78911002
}
8 changes: 8 additions & 0 deletions Documentation/ChangeLog/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

2.2.0 - 2021-09-12
===================

Features
^^^^^^^^
- [FEATURE] adding support for TYPO3 11.*
- [FEATURE] adding support for Bootstrap Package v12.0.*

2.1.0 - 2020-04-13
===================

Expand Down
2 changes: 1 addition & 1 deletion Documentation/Developer/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Developer Corner
================

Content Animations comes with an out of the box **bootstrap_package v11, v10, v9 and v8**, **fluid_styled_content** and **higher_education_package v9** support. Just include the static typoscript of your used extension (for example Bootstrap Package) into the site template and you're good to go.
Content Animations comes with an out of the box **bootstrap_package v12, v11, v10, v9 and v8**, **fluid_styled_content** and **higher_education_package v10** support. Just include the static typoscript of your used extension (for example Bootstrap Package) into the site template and you're good to go.
This extension extends the **Default Fluid Layout** for the necessary data-attributes to get the animation stuff working in the frontend.


Expand Down
3 changes: 2 additions & 1 deletion Documentation/Installation/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ If installed and activated just include the **static typoscript** to your site t
.. note::

You have to choose between these static includes from ``content_animations``.
- Content Animations: Bootstrap Package v12.x
- Content Animations: Bootstrap Package v11.x
- Content Animations: Bootstrap Package v10.x
- Content Animations: Bootstrap Package v9.x
Expand All @@ -31,4 +32,4 @@ If installed and activated just include the **static typoscript** to your site t

Please note that the version info in the inlcude itself isn't based on the TYPO3 version. It's the major version of, for example, the Bootstrap Package itself. You can get that info in the composer.json or the extension manager.

**Example:** If you use the Bootstrap Package in version 10.0.6 in your project you have to include ``Content Animations: Bootstrap Package v10.x``. If it's in version 9 the ``Content Animations: Bootstrap Package v9.x`` and so on.
**Example:** If you use the Bootstrap Package in version 12.0.x in your project you have to include ``Content Animations: Bootstrap Package v12.x``. If it's in version 10 the ``Content Animations: Bootstrap Package v10.x`` and so on.
6 changes: 3 additions & 3 deletions Documentation/Settings.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
; you can use in 'conf.py'

project = content_animations (Content Animations)
version = 2.1
release = 2.1.0
version = 2.2
release = 2.2.0
t3author = Sebastian Richter
copyright = 2020 by Sebastian Richter
copyright = 2021 by Sebastian Richter

description = This extension allows you to set nice animations to your content
elements if they are scrolled into the browsers viewport.
Expand Down
91 changes: 91 additions & 0 deletions Resources/Private/Layouts/BootstrapPackage/v12/Default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:bk2k="http://typo3.org/ns/BK2K/BootstrapPackage/ViewHelpers" data-namespace-typo3-fluid="true">
<f:spaceless>

<bk2k:data.imageVariants as="variants" variants="{settings.responsiveimages.variants}" />
<f:variable name="backendlayoutConfig">{settings.responsiveimages.backendlayout.{backendlayout}}</f:variable>
<f:variable name="columnConfig">{backendlayoutConfig.{data.colPos}}</f:variable>
<f:if condition="{columnConfig}">
<bk2k:data.imageVariants as="variants" variants="{variants}" multiplier="{columnConfig.multiplier}" gutters="{columnConfig.gutters}" corrections="{columnConfig.corrections}" />
</f:if>

<f:if condition="{containerContext}">
<f:for each="{containerContext}" as="context">
<f:variable name="containerConfig">{settings.responsiveimages.container.{context.CType}}</f:variable>
<f:variable name="containerColumnConfig">{containerConfig.{data.colPos}}</f:variable>
<f:if condition="{containerColumnConfig}">
<bk2k:data.imageVariants as="variants" variants="{variants}" multiplier="{containerColumnConfig.multiplier}" gutters="{containerColumnConfig.gutters}" corrections="{containerColumnConfig.corrections}" />
</f:if>
</f:for>
</f:if>

<f:variable name="frameSize">frame-size-default</f:variable>
<f:variable name="frameClass">frame-{data.frame_class}</f:variable>
<f:variable name="typeClass">frame-type-{data.CType}</f:variable>
<f:variable name="layoutClass">frame-layout-{data.frame_layout}</f:variable>
<f:variable name="backgroundClass">frame-background-{f:if(condition: data.background_color_class, else: 'none', then: data.background_color_class)}</f:variable>
<f:variable name="spaceBeforeClass">frame-space-before-{f:if(condition: data.space_before_class, else: 'none', then: data.space_before_class)}</f:variable>
<f:variable name="spaceAfterClass">frame-space-after-{f:if(condition: data.space_after_class, else: 'none', then: data.space_after_class)}</f:variable>

<f:if condition="{data.frame_class} != none">
<f:then>

<f:variable name="backgroundImageClass">{f:if(condition: backgroundImage.0, then: 'frame-has-backgroundimage', else: 'frame-no-backgroundimage')}</f:variable>
<div id="c{data.uid}" class="frame {frameSize} {frameClass} {typeClass} {layoutClass} {backgroundClass} {backgroundImageClass} {spaceBeforeClass} {spaceAfterClass}"{f:if(condition: animationSettings, then: '{animationSettings -> f:format.raw()}')}>
<div class="frame-group-container">
<div class="frame-group-inner">
<f:render partial="Frame/General/BackgroundImage" arguments="{_all}" />
<div class="frame-container frame-container-default">
<div class="frame-inner">
<f:if condition="{data._LOCALIZED_UID}">
<a id="c{data._LOCALIZED_UID}"></a>
</f:if>
<f:render section="Before" optional="true">
<f:render partial="DropIn/Before/All" arguments="{_all}" />
</f:render>
<f:render section="Header" optional="true">
<f:render partial="Header/All" arguments="{_all}" />
</f:render>
<f:render section="Main" optional="true" />
<f:render section="Footer" optional="true">
<f:render partial="Footer/All" arguments="{_all}" />
</f:render>
<f:render section="After" optional="true">
<f:render partial="DropIn/After/All" arguments="{_all}" />
</f:render>
</div>
</div>
</div>
</div>
</div>

</f:then>
<f:else>

<a id="c{data.uid}"></a>
<f:if condition="{data._LOCALIZED_UID}">
<a id="c{data._LOCALIZED_UID}"></a>
</f:if>
<f:if condition="{data.space_before_class}">
<div class="{spaceBeforeClass}"></div>
</f:if>
<f:render section="Before" optional="true">
<f:render partial="DropIn/Before/All" arguments="{_all}" />
</f:render>
<f:render section="Header" optional="true">
<f:render partial="Header/All" arguments="{_all}" />
</f:render>
<f:render section="Main" optional="true" />
<f:render section="Footer" optional="true">
<f:render partial="Footer/All" arguments="{_all}" />
</f:render>
<f:render section="After" optional="true">
<f:render partial="DropIn/After/All" arguments="{_all}" />
</f:render>
<f:if condition="{data.space_after_class}">
<div class="{spaceAfterClass}"></div>
</f:if>

</f:else>
</f:if>
</f:spaceless>
</html>
2 changes: 1 addition & 1 deletion Resources/Public/Styles/animation-preview.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
position: absolute;
top: 0;
right: 0;
font-size: 1rem;
font-size: 12px;
background: #d1e2bd;
color: #333;
padding: 5px;
Expand Down

0 comments on commit b0631b2

Please sign in to comment.