From d6f1e1c0f771bf9418d086db6bae7e5e89ea2c10 Mon Sep 17 00:00:00 2001 From: Helmut Hackbarth Date: Thu, 3 Jun 2021 17:07:41 +0200 Subject: [PATCH] New version 4.6.0 --- .../Backend/Preview/T3sbPreviewRenderer.php | 16 +- Classes/Command/CdnToLocal.php | 16 + Classes/Controller/ConfigController.php | 57 ++-- Classes/DataProcessing/BootstrapProcessor.php | 45 ++- Classes/DataProcessing/ConfigProcessor.php | 13 +- Classes/Domain/Model/Config.php | 1 - Classes/Helper/WrapperHelper.php | 10 +- Classes/UserFunction/TcaMatcher.php | 65 +++++ Classes/ViewHelpers/MediaViewHelper.php | 8 + Configuration/FlexForms/Carousel.xml | 17 +- .../FlexForms/Container/CarouselContainer.xml | 276 +++++++++++++++++- Configuration/TCA/Overrides/tt_content.php | 31 +- .../TSConfig/NewContentElements.tsconfig | 12 +- .../TSConfig/SysFileReference.tsconfig | 12 + .../TypoScript/Lib/ContentElement.typoscript | 1 + .../TypoScript/Page/BodyTag.typoscript | 4 + .../TypoScript/Page/Template.typoscript | 46 +-- Configuration/TypoScript/constants.typoscript | 2 + Configuration/TypoScript/setup.typoscript | 6 + .../Private/Backend/Layouts/Default.html | 2 - .../Backend/Partials/Config/Check.html | 2 +- .../Backend/Partials/Config/Input.html | 1 - .../Backend/Templates/Config/List.html | 115 ++++---- .../TSconfig/templateLayouts.tsconfig | 1 + .../Private/Partials/List/OwlSlider.html | 195 +++++++++++++ .../Private/Templates/News/List.html | 17 +- .../Partials/Content/Media/Type/Image.html | 1 - Resources/Private/Partials/Page/Assets.html | 105 ++++++- .../Private/Partials/Page/Navbar/Assets.html | 11 +- .../Private/Partials/Page/Navbar/Navbar.html | 35 ++- Resources/Private/Partials/Page/Section.html | 8 +- .../Templates/Container/CardWrapper.html | 2 +- .../Container/CarouselContainer.html | 116 +++++--- Resources/Private/Templates/Content/Card.html | 2 +- .../Private/Templates/Content/Carousel.html | 118 +++++--- .../Templates/Content/MenuSection.html | 10 +- .../Templates/Content/MenuSubpages.html | 2 +- Resources/Private/Templates/Main.html | 6 +- .../{T3sBootstrap.js => Bootstrap.js} | 3 +- Resources/Public/Styles/owlCarousel-1.css | 155 ++++++++++ Resources/Public/Styles/owlCarousel-2.css | 44 +++ Resources/Public/Styles/t3sbootstrap.css | 2 +- Resources/Public/Styles/t3sbootstrapSF.css | 2 +- ext_emconf.php | 2 +- ext_localconf.php | 10 +- 45 files changed, 1333 insertions(+), 272 deletions(-) create mode 100644 Resources/Private/Extensions/news/Resources/Private/Partials/List/OwlSlider.html rename Resources/Public/JavaScript/{T3sBootstrap.js => Bootstrap.js} (99%) create mode 100644 Resources/Public/Styles/owlCarousel-1.css create mode 100644 Resources/Public/Styles/owlCarousel-2.css diff --git a/Classes/Backend/Preview/T3sbPreviewRenderer.php b/Classes/Backend/Preview/T3sbPreviewRenderer.php index fff4647f..4de0a58a 100644 --- a/Classes/Backend/Preview/T3sbPreviewRenderer.php +++ b/Classes/Backend/Preview/T3sbPreviewRenderer.php @@ -23,6 +23,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Fluid\View\StandaloneView; use TYPO3\CMS\Core\Service\FlexFormService; +use TYPO3\CMS\Core\Page\PageRenderer; class T3sbPreviewRenderer extends StandardContentPreviewRenderer { @@ -99,6 +100,11 @@ public function renderPageModulePreviewHeader(GridColumnItem $item): string public function renderPageModulePreviewContent(GridColumnItem $item): string { + $pageRenderer = GeneralUtility::makeInstance(PageRenderer::class); + $pageRenderer->loadRequireJsModule( + 'TYPO3/CMS/T3sbootstrap/Bootstrap', + 'function() { console.log("Loaded bootstrap.js by t3sbootstrap."); }' + ); $content = parent::renderPageModulePreviewContent($item); $context = $item->getContext(); @@ -159,6 +165,12 @@ public function renderPageModulePreviewContent(GridColumnItem $item): string if ( $flexconf['link'] ) { $out .= '
- Link: '.$flexconf['link']; } + if ( $flexconf['owlCarousel'] ) { + $out .= '
- OWL Carousel'; + $out .= '
- OWL Style: '.$flexconf['owlStyle']; + if ($flexconf['owlStyle'] == 1) + $out .= '
- OWL Line: '.$flexconf['owlLine']; + } if ( $flexconf['multislider'] ) { $out .= '
- Multislider'; } @@ -297,7 +309,7 @@ public function renderPageModulePreviewContent(GridColumnItem $item): string $extconf = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class)->get('t3sbootstrap'); if ($extconf['previewClosedCollapsible']) { - $content = '

'.$content . $rendered.'
'; } else { - $content = '

+ $content = '

diff --git a/Classes/Command/CdnToLocal.php b/Classes/Command/CdnToLocal.php index e3a0c51b..d13878d9 100644 --- a/Classes/Command/CdnToLocal.php +++ b/Classes/Command/CdnToLocal.php @@ -232,7 +232,23 @@ protected function execute(InputInterface $input, OutputInterface $output) $cdnPath = 'https://cdn.jsdelivr.net/npm/lightcase@'.$version.'/src/js/lightcase.min.js'; self::writeCustomFile($customPath, $customFileName, $cdnPath); } + if ($key == 'owlCarousel') { + $customDir = 'fileadmin/T3SB/Resources/Public/CSS/'; + $customPath = GeneralUtility::getFileAbsFileName($customDir); + $customFileName = 'owl.carousel.min.css'; + $cdnPath = 'https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/'.$version.'/assets/owl.carousel.min.css'; + self::writeCustomFile($customPath, $customFileName, $cdnPath); + + $customFileName = 'owl.theme.default.css'; + $cdnPath = 'https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/'.$version.'/assets/owl.theme.default.css'; + self::writeCustomFile($customPath, $customFileName, $cdnPath); + $customDir = 'fileadmin/T3SB/Resources/Public/JS/'; + $customPath = GeneralUtility::getFileAbsFileName($customDir); + $customFileName = 'owl.carousel.js'; + $cdnPath = 'https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/'.$version.'/owl.carousel.js'; + self::writeCustomFile($customPath, $customFileName, $cdnPath); + } if ($key == 'cookieconsent') { $customDir = 'fileadmin/T3SB/Resources/Public/CSS/'; diff --git a/Classes/Controller/ConfigController.php b/Classes/Controller/ConfigController.php index 633a17df..82c1d9d4 100644 --- a/Classes/Controller/ConfigController.php +++ b/Classes/Controller/ConfigController.php @@ -24,6 +24,7 @@ use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction; use TYPO3\CMS\Core\Database\Query\QueryHelper; use TYPO3\CMS\Core\Information\Typo3Version; +use TYPO3\CMS\Core\Page\PageRenderer; /** * ConfigController @@ -94,6 +95,12 @@ class ConfigController extends ActionController */ protected $version; + /** + * rootTemplates + * + * @var array + */ + protected $rootTemplates; /** * Inject a configRepository repository to enable DI @@ -117,6 +124,21 @@ public function initializeAction() $this->rootConfig = $this->configRepository->findOneByPid($this->rootPageId); $typo3Version = GeneralUtility::makeInstance(Typo3Version::class); $this->version = (int)$typo3Version->getVersion(); + + $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_template'); + $this->rootTemplates = $queryBuilder + ->select('uid','pid', 'constants') + ->from('sys_template') + ->where( + $queryBuilder->expr()->eq('root', $queryBuilder->createNamedParameter(1, \PDO::PARAM_INT)) + ) + ->execute()->fetchAll(); + + $pageRenderer = GeneralUtility::makeInstance(PageRenderer::class); + $pageRenderer->loadRequireJsModule( + 'TYPO3/CMS/T3sbootstrap/Bootstrap', + 'function() { console.log("Loaded bootstrap.js by t3sbootstrap!"); }' + ); } @@ -147,6 +169,10 @@ public function listAction($deleted = FALSE, $created = FALSE, $updateSss = FALS $assignedOptions['allConfig'] = $allConfig; } + $assignedOptions['template'] = TRUE; + if (count($this->rootTemplates) === 0) { + $assignedOptions['template'] = FALSE; + } $assignedOptions['t3version'] = $this->version; $assignedOptions['rootConfig'] = $this->rootConfig ? TRUE : FALSE; $assignedOptions['config'] = $this->configRepository->findOneByPid($this->currentUid); @@ -567,33 +593,30 @@ public function writeConstants(): void $persistenceManager = $this->objectManager->get("TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager"); $persistenceManager->persistAll(); - $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_template'); - $rootTemplates = $queryBuilder - ->select('uid','pid', 'constants') - ->from('sys_template') - ->where( - $queryBuilder->expr()->eq('root', $queryBuilder->createNamedParameter(1, \PDO::PARAM_INT)) - ) - ->execute()->fetchAll(); + if ( count($this->rootTemplates) ) { + + $configRepository = $this->configRepository->findOneByPid($this->rootPageId); + $navbarBreakpoint = $configRepository->getNavbarBreakpoint(); + $breakpointWidth = $this->settings['breakpoint'][$navbarBreakpoint]; - if ( count($rootTemplates) ) { $filecontent = ''; - foreach ($rootTemplates as $key=>$rootTemplate) { + foreach ($this->rootTemplates as $key=>$rootTemplate) { foreach ( $this->configRepository->findAll() as $config ) { $rootLineArray = GeneralUtility::makeInstance(RootlineUtility::class, $config->getPid())->get(); if ( $config->getPid() == $rootTemplate['pid'] ) { - - if ( count($rootTemplates) == 1 ) { - $filecontent .= self::getConstants($config, TRUE).PHP_EOL; + if ( count($this->rootTemplates) == 1 ) { + $filecontent .= self::getConstants($config, TRUE); + $filecontent .= 'bootstrap.config.navbarBreakpointWidth = '.$breakpointWidth.PHP_EOL.PHP_EOL; } else { if ($rootLineArray[0]['uid'] == $rootTemplate['pid'] ){ $filecontent .= '['.$rootTemplate['pid'].' in tree.rootLineIds]'.PHP_EOL; $filecontent .= self::getConstants($config, TRUE); + $filecontent .= 'bootstrap.config.navbarBreakpointWidth = '.$breakpointWidth.PHP_EOL; $filecontent .= '[END]'.PHP_EOL.PHP_EOL; } } } else { - if ( count($rootTemplates) == 1 ) { + if ( count($this->rootTemplates) == 1 ) { if ($rootLineArray[0]['uid'] == $rootTemplate['pid'] ){ if ($config->getGeneralRootline() || $config->getNavbarMegamenu()) { $filecontent .= '['.$config->getPid().' in tree.rootLineIds]'.PHP_EOL; @@ -601,6 +624,7 @@ public function writeConstants(): void $filecontent .= '[page["uid"] == '.$config->getPid().']'.PHP_EOL; } $filecontent .= self::getConstants($config, FALSE); + $filecontent .= 'bootstrap.config.navbarBreakpointWidth = '.$breakpointWidth.PHP_EOL; $filecontent .= '[END]'.PHP_EOL.PHP_EOL; } } else { @@ -613,6 +637,7 @@ public function writeConstants(): void $filecontent .= '['.$rootTemplate['pid'].' in tree.rootLineIds && page["uid"] == '.$config->getPid().']'.PHP_EOL; } $filecontent .= self::getConstants($config, FALSE); + $filecontent .= 'bootstrap.config.navbarBreakpointWidth = '.$breakpointWidth.PHP_EOL; $filecontent .= '[END]'.PHP_EOL.PHP_EOL; } } @@ -912,8 +937,4 @@ protected function getTreeList($id, $depth, $begin = 0, $permsClause = ''): stri return (string)$theList; } - - - - } diff --git a/Classes/DataProcessing/BootstrapProcessor.php b/Classes/DataProcessing/BootstrapProcessor.php index 2618ca6c..f406c5b2 100644 --- a/Classes/DataProcessing/BootstrapProcessor.php +++ b/Classes/DataProcessing/BootstrapProcessor.php @@ -60,6 +60,9 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu $parentContainer = $statement['tx_container_parent']; } + $processedData['dataAnimate'] = FALSE; + $processedData['isAnimateCss'] = FALSE; + $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('t3sbootstrap'); $defaultHelper = GeneralUtility::makeInstance(DefaultHelper::class); @@ -67,8 +70,11 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu $styleHelper = GeneralUtility::makeInstance(StyleHelper::class); $wrapperHelper = GeneralUtility::makeInstance(WrapperHelper::class); - # used for js-conditions + # used for js-conditions - deprecated $processedData['winWidth'] = (int)$processorConfiguration['breakpoint.'][$contentObjectConfiguration['settings.']['breakpoint']]; + // used for js-conditions + $navbarBreakpointWidth = (int)$processorConfiguration['breakpoint.'][$contentObjectConfiguration['settings.']['breakpoint']]; + $processedData['navbarBreakpointWidth'] = $navbarBreakpointWidth; // class $class = $classHelper->getAllClass($processedData['data'], $flexconf, $extConf); @@ -79,7 +85,6 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu $style = $styleHelper->getBgColor($processedData['data']); $processedData['style'] = $processedData['style'] ? $processedData['style'].' '.$style : $style; - /** * Grid System */ @@ -169,6 +174,7 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu foreach($statement as $element) { $filesFromRepository[$element['uid']] = $fileRepository->findByRelation('tt_content', 'image', $element['uid']); } + $processedData['carouselSlides'] = $filesFromRepository; } } @@ -337,21 +343,31 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu $processedData['style'] .= ' min-height:'.$noImgHeight.'px;'; $processedData['style'] .= $flexconf['captionVAlign'] == 'end' ? ' padding-bottom:50px;' : ''; } + $processedData['zoom'] = $parentflexconf['zoom']; + if ( $parentflexconf['multislider'] ) { $processedData['multislider'] = TRUE; } - - $processedData['zoom'] = $parentflexconf['zoom']; - $carouselRatioArr = explode(':', $parentflexconf['ratio']); - if ( !empty($carouselRatioArr[0]) ) { - $processedData['ratio'] = $parentflexconf['ratio']; - if ($flexconf['shift']){ - $processedData['shift'] = (int)$flexconf['shift'] / 100; - } else { - $processedData['shift'] = ''; + if ( $parentflexconf['owlCarousel'] ) { + $processedData['owlCarousel'] = TRUE; + $processedData['owlStyle'] = $parentflexconf['owlStyle']; + $processedData['style'] = ''; + if ( (int) $parentflexconf['owlStyle'] == 1 && $flexconf['bgOverlayOwl'] ) { + $processedData['style'] = $styleHelper->getBgColor($processedData['data']); + } + $processedData['owlLine'] = $parentflexconf['owlLine']; + $processedData['zoom'] = ''; + } + $processedData['ratio'] = ''; + if ($parentflexconf['ratio']) { + $carouselRatioArr = explode(':', (string) $parentflexconf['ratio']); + if ( !empty($carouselRatioArr[0]) ) { + $processedData['ratio'] = $parentflexconf['ratio']; } - } else { - $processedData['ratio'] = ''; + } + $processedData['shift'] = ''; + if ($flexconf['shift']){ + $processedData['shift'] = (int)$flexconf['shift'] / 100; } } @@ -383,7 +399,6 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu */ if ($processedData['data']['CType']) { if ( substr($processedData['data']['CType'], 0, 4) == 'menu' ) { - $processedData['menudirection'] = ' '.$flexconf['menudirection']; $processedData['menupills'] = $flexconf['menupills'] ? ' nav-pills' :''; $processedData['menuHorizontalAlignment'] = $flexconf['menudirection'] == 'flex-row' @@ -562,8 +577,6 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu // disable animateCss (conflict) $processedData['data']['tx_t3sbootstrap_animateCss'] = FALSE; } - $processedData['dataAnimate'] = FALSE; - $processedData['isAnimateCss'] = FALSE; if ($processedData['data']['tx_t3sbootstrap_animateCss'] && $extConf['animateCss'] ) { // add to class if( $processedData['data']['tx_t3sbootstrap_animateCssRepeat'] ) { diff --git a/Classes/DataProcessing/ConfigProcessor.php b/Classes/DataProcessing/ConfigProcessor.php index 967aea11..43146003 100644 --- a/Classes/DataProcessing/ConfigProcessor.php +++ b/Classes/DataProcessing/ConfigProcessor.php @@ -180,11 +180,17 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu $processedData['config']['navbar']['enable'] = $processedRecordVariables['navbarEnable']; $processedData['config']['navbar']['sectionMenu'] = $processedRecordVariables['navbarSectionmenu'] ? ' section-menu' : ''; $processedData['config']['navbar']['brand'] = $processedRecordVariables['navbarBrand']; + if ( $frontendController->rootLine[1]['doktype'] == 4) { $processedData['config']['navbar']['clickableparent'] = 1; } else { $processedData['config']['navbar']['clickableparent'] = $processedRecordVariables['navbarClickableparent']; } + if ( $processedData['config']['navbar']['clickableparent'] && $processedRecordVariables['navbarPlusicon']) { + $processedData['config']['navbar']['navbarPlusicon'] = 0; + } else { + $processedData['config']['navbar']['navbarPlusicon'] = $processedRecordVariables['navbarPlusicon']; + } $processedData['config']['navbar']['image'] = $processedRecordVariables['navbarImage'] ? $processedRecordVariables['navbarImage'] : $contentObjectConfiguration['settings.']['navbar.']['image.']['defaultPath']; $processedData['config']['navbar']['toggler'] = $processedRecordVariables['navbarToggler']; @@ -429,8 +435,11 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu $processedData['config']['expandedcontentBottom']['class'] = trim($processedRecordVariables['expandedcontentClassbottom']); } - // used for js-conditions + // used for js-conditions - deprecated $processedData['winWidth'] = (int)$processorConfiguration['breakpoint.'][$processedRecordVariables['navbarBreakpoint']]; + // used for js-conditions + $navbarBreakpointWidth = (int)$processorConfiguration['breakpoint.'][$processedRecordVariables['navbarBreakpoint']]; + $processedData['navbarBreakpointWidth'] = $navbarBreakpointWidth; return $processedData; } @@ -542,7 +551,7 @@ function getTreePids($parent = 0): array $childPids = $queryGenerator->getTreeList($parent, 999999, 0, 1); $childPids = explode(',',$childPids ); - return $childPids; + return $childPids; } } diff --git a/Classes/Domain/Model/Config.php b/Classes/Domain/Model/Config.php index 4f3892a8..3a6b3f9b 100644 --- a/Classes/Domain/Model/Config.php +++ b/Classes/Domain/Model/Config.php @@ -169,7 +169,6 @@ class Config extends AbstractEntity */ protected $navbarClickableparent = false; - /** * navbarDropdownAnimate * diff --git a/Classes/Helper/WrapperHelper.php b/Classes/Helper/WrapperHelper.php index 627fe318..c320766a 100644 --- a/Classes/Helper/WrapperHelper.php +++ b/Classes/Helper/WrapperHelper.php @@ -123,8 +123,8 @@ public function getBackgroundWrapper($processedData, $flexconf, $cdnEnable=null, if ($inlineJS) GeneralUtility::makeInstance(AssetCollector::class) ->addInlineJavaScript('background-video-'.$processedData['data']['uid'], $inlineJS); - - + + $events = $flexconf; $events['videoAutoPlay'] = $file->getProperties()['autoplay']; $events['uid'] = $processedData['data']['uid']; @@ -389,7 +389,13 @@ public function getCarouselContainer($processedData, $flexconf): array ->addInlineJavaScript('multisliderinlinejs-'.$processedData['data']['uid'], $inlineJS); $processedData['multislider'] = TRUE; + } + if ( $flexconf['owlCarousel'] ) { + $processedData['owlCarousel'] = TRUE; + $processedData['owlAnimation'] = $flexconf['owlAnimation']; + $processedData['owlNumber'] = $flexconf['owlNumber']; + $processedData['owlStyle'] = $flexconf['owlStyle']; } $processedData['maxWidth'] = $flexconf['width'].'px'; diff --git a/Classes/UserFunction/TcaMatcher.php b/Classes/UserFunction/TcaMatcher.php index 2921cfc0..b8499a90 100644 --- a/Classes/UserFunction/TcaMatcher.php +++ b/Classes/UserFunction/TcaMatcher.php @@ -167,6 +167,71 @@ public function flexContainerParent($arguments): bool return $parent; } + /** + * is child of carousel-container and not owl + * + * @return bool + */ + public function flexCarouselParentNotOwl($arguments): bool + { + $parent = true; + + $flexformService = GeneralUtility::makeInstance(FlexFormService::class); + + if ( $arguments['record']['tx_container_parent'][0] ) { + $uid = (int)$arguments['record']['tx_container_parent'][0]; + $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tt_content'); + $result = $queryBuilder + ->select('*') + ->from('tt_content') + ->where( + $queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($uid, \PDO::PARAM_INT)) + ) + ->execute(); + $parent_rec = $result->fetch(); + $parent_flexconf = $flexformService->convertFlexFormContentToArray($parent_rec['tx_t3sbootstrap_flexform']); + + if ( $parent_rec['CType'] == 'carousel_container' && ((int) $parent_flexconf['owlCarousel'] == 1 || (int) $parent_flexconf['multislider'] == 1) ) { + +# if ( $parent_rec['CType'] == 'carousel_container' && (int) $parent_flexconf['owlCarousel'] == 1 ) { + $parent = false; + } + } + + return $parent; + } + + /** + * is child of carousel-container and is owl style 1 + * + * @return bool + */ + public function flexCarouselParentIsOwl($arguments): bool + { + $parent = false; + + $flexformService = GeneralUtility::makeInstance(FlexFormService::class); + + if ( $arguments['record']['tx_container_parent'][0] ) { + $uid = (int)$arguments['record']['tx_container_parent'][0]; + $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tt_content'); + $result = $queryBuilder + ->select('*') + ->from('tt_content') + ->where( + $queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($uid, \PDO::PARAM_INT)) + ) + ->execute(); + $parent_rec = $result->fetch(); + $parent_flexconf = $flexformService->convertFlexFormContentToArray($parent_rec['tx_t3sbootstrap_flexform']); + + if ( $parent_rec['CType'] == 'carousel_container' && (int) $parent_flexconf['owlCarousel'] == 1 ) { + $parent = true; + } + } + + return $parent; + } /** * isButton diff --git a/Classes/ViewHelpers/MediaViewHelper.php b/Classes/ViewHelpers/MediaViewHelper.php index fcc5d899..4c330f3e 100644 --- a/Classes/ViewHelpers/MediaViewHelper.php +++ b/Classes/ViewHelpers/MediaViewHelper.php @@ -16,6 +16,7 @@ use TYPO3\CMS\Core\Imaging\ImageManipulation\Area; use T3SBS\T3sbootstrap\Utility\ResponsiveImagesUtility; use TYPO3\CMS\Core\Utility\GeneralUtility; +use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; class MediaViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\MediaViewHelper @@ -290,6 +291,13 @@ protected function renderImageTag(FileInterface $image, $width, $height) } $imageService = $this->getImageService(); $processedImage = $imageService->applyProcessingInstructions($image, $processingInstructions); + + $webpIsLoaded = ExtensionManagementUtility::isLoaded('webp'); + if ( $webpIsLoaded ) { + $webpIdentifier = $processedImage->getIdentifier().'.webp'; + $processedImage->setIdentifier($webpIdentifier); + } + $imageUri = $imageService->getImageUri($processedImage); if (!$this->tag->hasAttribute('data-focus-area')) { diff --git a/Configuration/FlexForms/Carousel.xml b/Configuration/FlexForms/Carousel.xml index f8a6d294..9581e7e4 100644 --- a/Configuration/FlexForms/Carousel.xml +++ b/Configuration/FlexForms/Carousel.xml @@ -4,7 +4,7 @@ array - General + General @@ -32,7 +32,8 @@ - + + USER:T3SBS\T3sbootstrap\UserFunction\TcaMatcher->flexCarouselParentNotOwl select selectSingle @@ -54,9 +55,21 @@ + + + + + USER:T3SBS\T3sbootstrap\UserFunction\TcaMatcher->flexCarouselParentIsOwl + + check + + + + + USER:T3SBS\T3sbootstrap\UserFunction\TcaMatcher->flexCarouselParentNotOwl select selectSingle diff --git a/Configuration/FlexForms/Container/CarouselContainer.xml b/Configuration/FlexForms/Container/CarouselContainer.xml index 699c76cb..e7f284a2 100644 --- a/Configuration/FlexForms/Container/CarouselContainer.xml +++ b/Configuration/FlexForms/Container/CarouselContainer.xml @@ -90,6 +90,12 @@ + + + FIELD:general.multislider:=:0 + FIELD:general.owlCarousel:=:0 + + check @@ -99,7 +105,12 @@ - FIELD:general.multislider:=:0 + + + FIELD:general.multislider:=:0 + FIELD:general.owlCarousel:=:0 + + check @@ -123,6 +134,7 @@ reload + FIELD:general.owlCarousel:=:0 select selectSingle @@ -162,6 +174,7 @@ USER:T3SBS\T3sbootstrap\UserFunction\TcaMatcher->animateCss FIELD:general.multislider:=:0 + FIELD:general.owlCarousel:=:0 @@ -223,12 +236,269 @@ + FIELD:general.owlCarousel:!=:1 reload check + + + + + FIELD:general.multislider:!=:1 + reload + + check + + + + + + + + FIELD:general.owlCarousel:=:1 + reload + + select + selectSingle + + + Style 1 + 1 + + + Style 2 + 2 + + + 1 + + + + + + + + + + FIELD:general.owlCarousel:=:1 + FIELD:general.owlStyle:=:1 + + + + check + 1 + + + + + + + + + + FIELD:general.owlCarousel:=:1 + FIELD:general.owlStyle:=:1 + + + + select + selectSingle + + + bounceOut + bounceOut + + + bounceOutDown + bounceOutDown + + + bounceOutLeft + bounceOutLeft + + + bounceOutRight + bounceOutRight + + + bounceOutUp + bounceOutUp + + + fadeOut + fadeOut + + + fadeOutDown + fadeOutDown + + + fadeOutDownBig + fadeOutDownBig + + + fadeOutLeft + fadeOutLeft + + + fadeOutLeftBig + fadeOutLeftBig + + + fadeOutRight + fadeOutRight + + + fadeOutRightBig + fadeOutRightBig + + + fadeOutUp + fadeOutUp + + + fadeOutUpBig + fadeOutUpBig + + + flipOutX + flipOutX + + + flipOutY + flipOutY + + + lightSpeedOut + lightSpeedOut + + + rotateOut + rotateOut + + + rotateOutDownLeft + rotateOutDownLeft + + + rotateOutDownRight + rotateOutDownRight + + + rotateOutUpLeft + rotateOutUpLeft + + + rotateOutUpRight + rotateOutUpRight + + + rollOut + rollOut + + + zoomOut + zoomOut + + + zoomOutDown + zoomOutDown + + + zoomOutLeft + zoomOutLeft + + + zoomOutRight + zoomOutRight + + + zoomOutUp + zoomOutUp + + + slideOutDown + slideOutDown + + + slideOutLeft + slideOutLeft + + + slideOutRight + slideOutRight + + + slideOutUp + slideOutUp + + + slideOutUp + + + + + + + + + FIELD:general.owlCarousel:=:1 + FIELD:general.owlStyle:=:1 + + + + select + selectSingle + + + 1 + 1 + + + 2 + 2 + + + 3 + 3 + + + 4 + 4 + + + 5 + 5 + + + 6 + 6 + + + 7 + 7 + + + 8 + 8 + + + 9 + 9 + + + 10 + 10 + + + 1 + + + + @@ -309,7 +579,6 @@ - @@ -328,8 +597,7 @@ - - + FIELD:general.owlCarousel:=:0 check diff --git a/Configuration/TCA/Overrides/tt_content.php b/Configuration/TCA/Overrides/tt_content.php index c3a8c29b..2c3ff164 100644 --- a/Configuration/TCA/Overrides/tt_content.php +++ b/Configuration/TCA/Overrides/tt_content.php @@ -40,6 +40,7 @@ ) ) ->setIcon('EXT:t3sbootstrap/Resources/Public/Icons/Register/ge-2_col.svg') + ->setSaveAndCloseInNewContentElementWizard(false) ); $GLOBALS['TCA']['tt_content']['types']['two_columns']['showitem'] = ' --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general, @@ -76,6 +77,7 @@ ) ) ->setIcon('EXT:t3sbootstrap/Resources/Public/Icons/Register/ge-3_col.svg') + ->setSaveAndCloseInNewContentElementWizard(false) ); $GLOBALS['TCA']['tt_content']['types']['three_columns']['showitem'] = $GLOBALS['TCA']['tt_content']['types']['two_columns']['showitem']; @@ -96,6 +98,7 @@ ) ) ->setIcon('EXT:t3sbootstrap/Resources/Public/Icons/Register/ge-4_col.svg') + ->setSaveAndCloseInNewContentElementWizard(false) ); $GLOBALS['TCA']['tt_content']['types']['four_columns']['showitem'] = $GLOBALS['TCA']['tt_content']['types']['two_columns']['showitem']; @@ -118,6 +121,7 @@ ) ) ->setIcon('EXT:t3sbootstrap/Resources/Public/Icons/Register/ge-4_col.svg') + ->setSaveAndCloseInNewContentElementWizard(false) ); $GLOBALS['TCA']['tt_content']['types']['six_columns']['showitem'] = $GLOBALS['TCA']['tt_content']['types']['two_columns']['showitem']; @@ -137,6 +141,7 @@ ) ) ->setIcon('EXT:t3sbootstrap/Resources/Public/Icons/Register/ge-card-container.svg') + ->setSaveAndCloseInNewContentElementWizard(false) ); $GLOBALS['TCA']['tt_content']['types']['card_wrapper']['showitem'] = $GLOBALS['TCA']['tt_content']['types']['two_columns']['showitem']; @@ -156,6 +161,7 @@ ) ) ->setIcon('EXT:t3sbootstrap/Resources/Public/Icons/Register/bars.svg') + ->setSaveAndCloseInNewContentElementWizard(false) ); $GLOBALS['TCA']['tt_content']['types']['button_group']['showitem'] = $GLOBALS['TCA']['tt_content']['types']['two_columns']['showitem']; @@ -174,6 +180,7 @@ ) ) ->setIcon('EXT:t3sbootstrap/Resources/Public/Icons/Register/ge-card-container.svg') + ->setSaveAndCloseInNewContentElementWizard(false) ); $GLOBALS['TCA']['tt_content']['types']['autoLayout_row']['showitem'] = $GLOBALS['TCA']['tt_content']['types']['two_columns']['showitem']; @@ -192,6 +199,7 @@ ) ) ->setIcon('EXT:t3sbootstrap/Resources/Public/Icons/Register/ge-background_wrapper.svg') + ->setSaveAndCloseInNewContentElementWizard(false) ); $GLOBALS['TCA']['tt_content']['types']['background_wrapper']['showitem'] = ' --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general, @@ -237,6 +245,7 @@ ) ) ->setIcon('EXT:t3sbootstrap/Resources/Public/Icons/Register/ge-parallax_wrapper.svg') + ->setSaveAndCloseInNewContentElementWizard(false) ); $GLOBALS['TCA']['tt_content']['types']['parallax_wrapper']['showitem'] = $GLOBALS['TCA']['tt_content']['types']['background_wrapper']['showitem']; @@ -255,6 +264,7 @@ ) ) ->setIcon('EXT:t3sbootstrap/Resources/Public/Icons/Register/ge-card-container.svg') + ->setSaveAndCloseInNewContentElementWizard(false) ); $GLOBALS['TCA']['tt_content']['types']['container']['showitem'] = $GLOBALS['TCA']['tt_content']['types']['two_columns']['showitem']; @@ -273,6 +283,7 @@ ) ) ->setIcon('EXT:t3sbootstrap/Resources/Public/Icons/Register/ge-carousel-container.svg') + ->setSaveAndCloseInNewContentElementWizard(false) ); $GLOBALS['TCA']['tt_content']['types']['carousel_container']['showitem'] = $GLOBALS['TCA']['tt_content']['types']['two_columns']['showitem']; @@ -291,6 +302,7 @@ ) ) ->setIcon('EXT:t3sbootstrap/Resources/Public/Icons/Register/ge-accordion-container.svg') + ->setSaveAndCloseInNewContentElementWizard(false) ); $GLOBALS['TCA']['tt_content']['types']['collapsible_container']['showitem'] = $GLOBALS['TCA']['tt_content']['types']['two_columns']['showitem']; @@ -309,6 +321,7 @@ ) ) ->setIcon('EXT:t3sbootstrap/Resources/Public/Icons/Register/ge-accordion-element.svg') + ->setSaveAndCloseInNewContentElementWizard(false) ); $GLOBALS['TCA']['tt_content']['types']['collapsible_accordion']['showitem'] = $GLOBALS['TCA']['tt_content']['types']['background_wrapper']['showitem']; @@ -327,6 +340,7 @@ ) ) ->setIcon('EXT:t3sbootstrap/Resources/Public/Icons/Register/ge-modal.svg') + ->setSaveAndCloseInNewContentElementWizard(false) ); $GLOBALS['TCA']['tt_content']['types']['modal']['showitem'] = $GLOBALS['TCA']['tt_content']['types']['two_columns']['showitem']; @@ -345,6 +359,7 @@ ) ) ->setIcon('EXT:t3sbootstrap/Resources/Public/Icons/Register/ge-tab-container.svg') + ->setSaveAndCloseInNewContentElementWizard(false) ); $GLOBALS['TCA']['tt_content']['types']['tabs_container']['showitem'] = $GLOBALS['TCA']['tt_content']['types']['two_columns']['showitem']; @@ -363,6 +378,7 @@ ) ) ->setIcon('EXT:t3sbootstrap/Resources/Public/Icons/Register/ge-tab-container.svg') + ->setSaveAndCloseInNewContentElementWizard(false) ); $GLOBALS['TCA']['tt_content']['types']['tabs_tab']['showitem'] = $GLOBALS['TCA']['tt_content']['types']['two_columns']['showitem']; @@ -381,6 +397,7 @@ ) ) ->setIcon('EXT:t3sbootstrap/Resources/Public/Icons/Register/ge-accordion-container.svg') + ->setSaveAndCloseInNewContentElementWizard(false) ); $GLOBALS['TCA']['tt_content']['types']['listGroup_wrapper']['showitem'] = $GLOBALS['TCA']['tt_content']['types']['two_columns']['showitem']; @@ -394,7 +411,7 @@ [ 'Bootstrap Media object', 't3sbs_mediaobject', - 'content-textpic' + 'content-beside-text-img-left' ], 'textmedia', 'after' @@ -405,7 +422,7 @@ [ 'Bootstrap Card', 't3sbs_card', - 'bs-card' + 'content-card' ], 't3sbs_mediaobject', 'after' @@ -416,7 +433,7 @@ [ 'Bootstrap Toasts', 't3sbs_toast', - 'content-textpic' + 'content-widget-calltoaction' ], 't3sbs_card', 'after' @@ -427,7 +444,7 @@ [ 'Bootstrap Carousel Item (in carousel container)', 't3sbs_carousel', - 'bs-carousel' + 'content-carousel-item-textandimage' ], 't3sbs_toast', 'after' @@ -438,7 +455,7 @@ [ 'Bootstrap Button', 't3sbs_button', - 'bs-button' + 'form-radio-button' ], 't3sbs_carousel', 'after' @@ -449,7 +466,7 @@ [ 'Fluidtemplate', 't3sbs_fluidtemplate', - 'bs-fluidtemplate' + 'actions-template-new' ], 't3sbs_button', 'after' @@ -460,7 +477,7 @@ [ 'Bootstrap Image Gallery', 't3sbs_gallery', - 'bs-gallery' + 'apps-filetree-folder-media' ], 't3sbs_fluidtemplate', 'after' diff --git a/Configuration/TSConfig/NewContentElements.tsconfig b/Configuration/TSConfig/NewContentElements.tsconfig index 0cd27136..e61f459a 100644 --- a/Configuration/TSConfig/NewContentElements.tsconfig +++ b/Configuration/TSConfig/NewContentElements.tsconfig @@ -11,31 +11,31 @@ mod.wizards { header = LLL:EXT:t3sbootstrap/Resources/Private/Language/locallang_be.xlf:t3sbs_contentelements elements { t3sbsmediaobject { - iconIdentifier = content-textpic + iconIdentifier = content-beside-text-img-left title = BS Media object description = The media object helps build complex and repetitive components where some media is positioned alongside content that doesn’t wrap around said media. tt_content_defValues.CType = t3sbs_mediaobject } t3sbscard { - iconIdentifier = content-beside-text-img-above-center + iconIdentifier = content-card title = BS Card description = A card is a flexible and extensible content container. tt_content_defValues.CType = t3sbs_card } t3sbscarousel { - iconIdentifier = content-carousel-image + iconIdentifier = content-carousel-item-textandimage title = BS Carousel description = A slideshow component for cycling through elements—images or slides of text—like a carousel. tt_content_defValues.CType = t3sbs_carousel } t3sbutton { - iconIdentifier = content-media + iconIdentifier = form-radio-button title = BS Button description = Bootstrap includes several predefined button styles, each serving its own semantic purpose. tt_content_defValues.CType = t3sbs_button } t3sbsfluidtemplate { - iconIdentifier = module-templates + iconIdentifier = actions-template-new title = LLL:EXT:t3sbootstrap/Resources/Private/Language/locallang_be.xlf:t3sbs_fluidtemplate.title description = LLL:EXT:t3sbootstrap/Resources/Private/Language/locallang_be.xlf:t3sbs_fluidtemplate.description tt_content_defValues.CType = t3sbs_fluidtemplate @@ -47,7 +47,7 @@ mod.wizards { tt_content_defValues.CType = t3sbs_gallery } t3sbstoast { - iconIdentifier = content-textpic + iconIdentifier = content-widget-calltoaction title = BS Toasts description = Push notifications to your visitors with a toast, a lightweight and easily customizable alert message. tt_content_defValues.CType = t3sbs_toast diff --git a/Configuration/TSConfig/SysFileReference.tsconfig b/Configuration/TSConfig/SysFileReference.tsconfig index 2a52555b..c9cdd734 100644 --- a/Configuration/TSConfig/SysFileReference.tsconfig +++ b/Configuration/TSConfig/SysFileReference.tsconfig @@ -12,6 +12,10 @@ TCEFORM.sys_file_reference.crop.config.cropVariants { title = 21:9 value = 2.3333333 } + 2:1 { + title = 2:1 + value = 2 + } 16:9 { title = 16:9 value = 1.7777777 @@ -66,6 +70,10 @@ TCEFORM.sys_file_reference.crop.config.cropVariants { title = 21:9 value = 2.3333333 } + 2:1 { + title = 2:1 + value = 2 + } 16:9 { title = 16:9 value = 1.7777777 @@ -120,6 +128,10 @@ TCEFORM.sys_file_reference.crop.config.cropVariants { title = 21:9 value = 2.3333333 } + 2:1 { + title = 2:1 + value = 2 + } 16:9 { title = 16:9 value = 1.7777777 diff --git a/Configuration/TypoScript/Lib/ContentElement.typoscript b/Configuration/TypoScript/Lib/ContentElement.typoscript index 30ef549e..22d4f476 100644 --- a/Configuration/TypoScript/Lib/ContentElement.typoscript +++ b/Configuration/TypoScript/Lib/ContentElement.typoscript @@ -61,6 +61,7 @@ lib.contentElement { fixedButton = {$bootstrap.extconf.fixedButton} animateCss = {$bootstrap.extconf.animateCss} animateVersion = {$bootstrap.cdn.animate} + owlCarouselVersion = {$bootstrap.cdn.owlCarousel} viewportcheckerVersion = {$bootstrap.cdn.viewportchecker} viewportcheckerIntegrity = {$bootstrap.cdn.viewportcheckerIntegrity} cdn = {$bootstrap.cdn.enable} diff --git a/Configuration/TypoScript/Page/BodyTag.typoscript b/Configuration/TypoScript/Page/BodyTag.typoscript index 6fd1503c..60e8625d 100644 --- a/Configuration/TypoScript/Page/BodyTag.typoscript +++ b/Configuration/TypoScript/Page/BodyTag.typoscript @@ -51,6 +51,10 @@ page { 40 = TEXT 40.value = {$bootstrap.config.navbarBreakpoint} 40.noTrimWrap = | data-navbar-breakpoint="|"| + 50 = TEXT + 50.value = {$bootstrap.config.navbarBreakpointWidth} + 50.noTrimWrap = | data-navbar-breakpointWidth="|"| + 50.if.isTrue = {$bootstrap.config.navbarBreakpointWidth} } } diff --git a/Configuration/TypoScript/Page/Template.typoscript b/Configuration/TypoScript/Page/Template.typoscript index 9580360b..f9323b8a 100644 --- a/Configuration/TypoScript/Page/Template.typoscript +++ b/Configuration/TypoScript/Page/Template.typoscript @@ -1,4 +1,31 @@ +["{$bootstrap.config.navbarBreakpoint}" == "sm"] +page.10.settings.navbarBreakpointWidth = {$bootstrap.navbar.breakpoint.sm} +// deprecated +page.10.settings.winwidth = {$bootstrap.navbar.breakpoint.sm} +[END] +["{$bootstrap.config.navbarBreakpoint}" == "md"] +page.10.settings.navbarBreakpointWidth = {$bootstrap.navbar.breakpoint.md} +// deprecated +page.10.settings.winwidth = {$bootstrap.navbar.breakpoint.md} +[END] +["{$bootstrap.config.navbarBreakpoint}" == "lg"] +page.10.settings.navbarBreakpointWidth = {$bootstrap.navbar.breakpoint.lg} +// deprecated +page.10.settings.winwidth = {$bootstrap.navbar.breakpoint.lg} +[END] +["{$bootstrap.config.navbarBreakpoint}" == "xl"] +page.10.settings.navbarBreakpointWidth = {$bootstrap.navbar.breakpoint.xl} +// deprecated +page.10.settings.winwidth = {$bootstrap.navbar.breakpoint.xl} +[END] + +[loaded('indexed_search')] +page.10.settings.indexedsearch.targetPid = {$plugin.tx_indexedsearch.settings.targetPid} +[ELSE] +page.10.settings.indexedsearch.targetPid = 0 +[END] + page { # Page template 10 = FLUIDTEMPLATE @@ -84,6 +111,7 @@ page { navbarMegamenu = {$bootstrap.config.navbarMegamenu} navbarHover = {$bootstrap.config.navbarHover} navbarClickableparent = {$bootstrap.config.navbarClickableparent} + navbarPlusicon = {$bootstrap.config.navbarPlusicon} navbarDropdownAnimate = {$bootstrap.config.navbarDropdownAnimate} navbarBrand = {$bootstrap.config.navbarBrand} navbarImage = {$bootstrap.config.navbarImage} @@ -433,21 +461,3 @@ page { } } -[{$bootstrap.config.navbarBreakpoint} == 'sm'] -page.10.settings.winwidth = {$bootstrap.navbar.breakpoint.sm} -[END] -[{$bootstrap.config.navbarBreakpoint} == 'md'] -page.10.settings.winwidth = {$bootstrap.navbar.breakpoint.md} -[END] -[{$bootstrap.config.navbarBreakpoint} == 'lg'] -page.10.settings.winwidth = {$bootstrap.navbar.breakpoint.lg} -[END] -[{$bootstrap.config.navbarBreakpoint} == 'xl'] -page.10.settings.winwidth = {$bootstrap.navbar.breakpoint.xl} -[END] - -[loaded('indexed_search')] -page.10.settings.indexedsearch.targetPid = {$plugin.tx_indexedsearch.settings.targetPid} -[ELSE] -page.10.settings.indexedsearch.targetPid = 0 -[END] diff --git a/Configuration/TypoScript/constants.typoscript b/Configuration/TypoScript/constants.typoscript index fe8959c6..31ab1516 100644 --- a/Configuration/TypoScript/constants.typoscript +++ b/Configuration/TypoScript/constants.typoscript @@ -56,6 +56,8 @@ bootstrap.cdn { lightcase = 2.5.0 # cat=bootstrap-cdn/b-version/47; type=small; label=YouTube player - jquery.mb.YTPlayer: ytPlayer = 3.3.8 + # cat=bootstrap-cdn/b-version/49; type=small; label=Owl Carousel: + owlCarousel = 2.3.4 # cat=bootstrap-cdn/c-integrity/10; type=small; label=Bootstrap CSS: bootstrapCssIntegrity = sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l # cat=bootstrap-cdn/c-integrity/11; type=small; label=Bootstrap JS: diff --git a/Configuration/TypoScript/setup.typoscript b/Configuration/TypoScript/setup.typoscript index af900de8..4a4f4fc2 100644 --- a/Configuration/TypoScript/setup.typoscript +++ b/Configuration/TypoScript/setup.typoscript @@ -18,6 +18,11 @@ module.tx_t3sbootstrap { wsScss = {$bootstrap.ext.wsScss} enableUtilityColors = {$bootstrap.config.enableUtilityColors} gtm = {$bootstrap.gtm} + navbarBreakpoint = {$bootstrap.config.navbarBreakpoint} + breakpoint.sm = {$bootstrap.navbar.breakpoint.sm} + breakpoint.md = {$bootstrap.navbar.breakpoint.md} + breakpoint.lg = {$bootstrap.navbar.breakpoint.lg} + breakpoint.xl = {$bootstrap.navbar.breakpoint.xl} cdn { // Versions bootstrap = {$bootstrap.cdn.bootstrap} @@ -36,6 +41,7 @@ module.tx_t3sbootstrap { lightcase = {$bootstrap.cdn.lightcase} cookieconsent = {$bootstrap.cdn.cookieconsent} ytPlayer = {$bootstrap.cdn.ytPlayer} + owlCarousel = {$bootstrap.cdn.owlCarousel} } } diff --git a/Resources/Private/Backend/Layouts/Default.html b/Resources/Private/Backend/Layouts/Default.html index 329bed5a..e3d76cd9 100644 --- a/Resources/Private/Backend/Layouts/Default.html +++ b/Resources/Private/Backend/Layouts/Default.html @@ -7,8 +7,6 @@ - -

diff --git a/Resources/Private/Backend/Partials/Config/Check.html b/Resources/Private/Backend/Partials/Config/Check.html index aa7532bf..e1fe0ee1 100644 --- a/Resources/Private/Backend/Partials/Config/Check.html +++ b/Resources/Private/Backend/Partials/Config/Check.html @@ -20,7 +20,7 @@
{field.info -> f:format.raw()}
-
bootstrap.config.{field.property} + bootstrap.config.{field.property}
diff --git a/Resources/Private/Backend/Partials/Config/Input.html b/Resources/Private/Backend/Partials/Config/Input.html index 7b1ba4b3..03a02b3f 100644 --- a/Resources/Private/Backend/Partials/Config/Input.html +++ b/Resources/Private/Backend/Partials/Config/Input.html @@ -19,7 +19,6 @@ {field.info -> f:format.raw()} - bootstrap.config.{field.property} diff --git a/Resources/Private/Backend/Templates/Config/List.html b/Resources/Private/Backend/Templates/Config/List.html index 12348239..986d8231 100644 --- a/Resources/Private/Backend/Templates/Config/List.html +++ b/Resources/Private/Backend/Templates/Config/List.html @@ -30,73 +30,80 @@

Configuration

- + - - Edit this configuration - - + - - - -

- -

-
-
- - - - - - - - - - + + Edit this configuration + + + + + + +

+ +

+
+
+
uidpage uidpage title
+ - - - + + + - - -
{config.confUid}{config.uid}{config.title}uidpage uidpage title
-
-
+ + + + + {config.confUid} + {config.uid} + {config.title} + + + + +
+ + + + + + Delete this configuration + + + + - - Delete this configuration - - - - - - - - - - New main configuration - - - + - Override configuration + New main configuration - + + + Override configuration + + + + + - - + + + + + diff --git a/Resources/Private/Extensions/news/Configuration/TSconfig/templateLayouts.tsconfig b/Resources/Private/Extensions/news/Configuration/TSconfig/templateLayouts.tsconfig index 2fba8a26..666cd45f 100644 --- a/Resources/Private/Extensions/news/Configuration/TSconfig/templateLayouts.tsconfig +++ b/Resources/Private/Extensions/news/Configuration/TSconfig/templateLayouts.tsconfig @@ -8,5 +8,6 @@ tx_news.templateLayouts { 73 = BS4: Card Groups (list view) 74 = BS4: Card Columns (list view) 75 = BS4: 2 Columns (list view) + 76 = BS4: OWL Slider - Fullscreen (list view) - experimental 81 = BS4: Detail view } \ No newline at end of file diff --git a/Resources/Private/Extensions/news/Resources/Private/Partials/List/OwlSlider.html b/Resources/Private/Extensions/news/Resources/Private/Partials/List/OwlSlider.html new file mode 100644 index 00000000..2e9d619b --- /dev/null +++ b/Resources/Private/Extensions/news/Resources/Private/Partials/List/OwlSlider.html @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + // NEWS OWL Carousel - Resources/Private/Extensions/news/Resources/Private/Partials/List/OwlSlider.html + $(".owl-carousel").on("initialized.owl.carousel", () => { + setTimeout(() => { + $(".owl-item.active .owl-slide-animated").addClass("is-transitioned"); + }, 200); + }); + + var $owlCarousel = $(".owl-carousel").owlCarousel({ + items: 1, + loop: true, + nav: true, + navText: [ + '', + '' /* icons from https://iconmonstr.com */ + ] + }); + + $owlCarousel.on("changed.owl.carousel", e => { + $(".owl-slide-animated").removeClass("is-transitioned"); + var $currentOwlItem = $(".owl-item").eq(e.item.index); + $currentOwlItem.find(".owl-slide-animated").addClass("is-transitioned"); + var $target = $currentOwlItem.find(".owl-slide-text"); + doDotsCalculations($target); + }); + + $owlCarousel.on("resize.owl.carousel", () => { + setTimeout(() => { + setOwlDotsPosition(); + }, 50); + }); + + /*if there isn't content underneath the carousel*/ + //$owlCarousel.trigger("refresh.owl.carousel"); + + setOwlDotsPosition(); + + function setOwlDotsPosition() { + var $target = $(".owl-item.active .owl-slide-text"); + doDotsCalculations($target); + } + + function doDotsCalculations(el) { + var height = el.height(); + var {top, left} = el.position(); + var res = height + top + 20; + + $(".owl-carousel .owl-dots").css({ + top: `${res}px`, + left: `${left}px` + }); + } + + + +.static { + position: static; +} +.cover { + background-size: cover; + background-position: center; + background-repeat: no-repeat; +} +.owl-carousel .owl-slide { + position: relative; +/* + height: 100vh; +*/ + height: 400px; + background-color: lightgray; +} +.owl-carousel .owl-slide-animated { + transform: translateX(20px); + opacity: 0; + visibility: hidden; + transition: all 0.05s; +} +.owl-carousel .owl-slide-animated.is-transitioned { + transform: none; + opacity: 1; + visibility: visible; + transition: all 0.5s; +} + +.owl-carousel .owl-slide-title.is-transitioned { + transition-delay: 0.2s; +} + +.owl-carousel .owl-slide-subtitle.is-transitioned { + transition-delay: 0.35s; +} + +.owl-carousel .owl-slide-cta.is-transitioned { + transition-delay: 0.5s; +} + +.owl-carousel .owl-dots, +.owl-carousel .owl-nav { + position: absolute; +} + +.owl-carousel .owl-dots .owl-dot, +.owl-carousel .owl-nav [class*="owl-"]:focus { + outline: none; +} + +.owl-carousel .owl-dots .owl-dot span { + background: transparent; + border: 1px solid var(--main-black-color); + transition: all 0.2s ease; +} + +.owl-carousel .owl-dots .owl-dot:hover span, +.owl-carousel .owl-dots .owl-dot.active span { + background: var(--main-black-color); +} + +.owl-carousel .owl-nav { + left: 50%; + top: 10%; + transform: translateX(-50%); + margin: 0; +} + +.owl-carousel .owl-nav svg { + opacity: 0.3; + transition: opacity 0.3s; +} + +.owl-carousel .owl-nav button:hover svg { + opacity: 1; +} + +.owl-carousel .owl-nav [class*="owl-"]:hover { + background: transparent; +} + +@media screen and (max-width: 575px) { + .owl-carousel .owl-nav { + top: 5%; + } + .owl-carousel .owl-nav svg { + width: 24px; + height: 24px; + } + .owl-carousel .owl-slide { + height: 100vh; + } +} + + + + +
+
+
+
+
+

+ + {newsItem.title} + +

+
+ {newsItem.teaser -> f:format.crop(maxCharacters: '{settings.cropMaxCharacters}', respectWordBoundaries:'1') -> f:format.stripTags()} +
+
+
+
+
+
+
+ + diff --git a/Resources/Private/Extensions/news/Resources/Private/Templates/News/List.html b/Resources/Private/Extensions/news/Resources/Private/Templates/News/List.html index 6dfe918c..c2d34249 100644 --- a/Resources/Private/Extensions/news/Resources/Private/Templates/News/List.html +++ b/Resources/Private/Extensions/news/Resources/Private/Templates/News/List.html @@ -25,7 +25,14 @@ - + + + + + + + + @@ -44,6 +51,14 @@ + + + +
diff --git a/Resources/Private/Partials/Content/Media/Type/Image.html b/Resources/Private/Partials/Content/Media/Type/Image.html index 4559b815..782686dd 100644 --- a/Resources/Private/Partials/Content/Media/Type/Image.html +++ b/Resources/Private/Partials/Content/Media/Type/Image.html @@ -82,7 +82,6 @@
-
diff --git a/Resources/Private/Partials/Page/Assets.html b/Resources/Private/Partials/Page/Assets.html index 330d5583..d81690d7 100644 --- a/Resources/Private/Partials/Page/Assets.html +++ b/Resources/Private/Partials/Page/Assets.html @@ -11,6 +11,93 @@ } + +OWL Carousel + + + + + + + + + + + + + + + + + + + + + + + + // OWL Carousel (Style 1 / uid:{data.uid}) - Page/Assets.html + var animateOut = '{owlAnimation}'; + var interval = {interval}; + var number = {owlNumber}; + var owlUid = '#owl-{data.uid}'; + if (!number) number = 1; + $(owlUid).owlCarousel({ + loop:true, + margin:15, + dots:false, + nav:true, + mouseDrag:false, + autoplay:true, + autoplayTimeout:interval, + animateOut:animateOut, + responsive:{ + 0:{ + items:1 + }, + 992:{ + items:number + } + } + }); + + + + + + + // OWL Carousel (Style 2 / uid:{data.uid}) - Page/Assets.html + var interval = {interval}; + var owlUid = '#owl-{data.uid}'; + $(owlUid).owlCarousel({ + loop:true, + center:true, + items:3, + margin:0, + autoplay:true, + dots:true, + autoplayTimeout:interval, + smartSpeed:450, + responsive: { + 0: { + items:1 + }, + 768: { + items:2 + }, + 1170: { + items:3 + } + } + }); + + + + Button.html, Modal.html @@ -91,24 +178,13 @@ }); + MenuSubpages.html, Section.html, MenuSection.html + // Sticky top for section-menu - Page/Assets.html - var breakpoint = $( 'body' ).attr( 'data-navbar-breakpoint' ); - if (breakpoint == 'sm') { - var winWidth = {settings.navbar.sm}; - } - if (breakpoint == 'md') { - var winWidth = {settings.navbar.md}; - } - if (breakpoint == 'lg') { - var winWidth = {settings.navbar.lg}; - } - if (breakpoint == 'xl') { - var winWidth = {settings.navbar.xl}; - } - if ( $(window).width() > winWidth ) { + if ( $(window).width() > navbarBreakpointWidth ) { // only one is supported if ($('#sectionmenu').length || $('.submenu').length || $('.make-me-sticky').length) { var offsetSize = 30; @@ -146,4 +222,5 @@ } + diff --git a/Resources/Private/Partials/Page/Navbar/Assets.html b/Resources/Private/Partials/Page/Navbar/Assets.html index 8b714902..4b8b5271 100644 --- a/Resources/Private/Partials/Page/Navbar/Assets.html +++ b/Resources/Private/Partials/Page/Navbar/Assets.html @@ -56,7 +56,7 @@ /* Offcanvas - Navbar/Assets.html */ -@media (max-width:{f:if(condition:'{winWidth}',then:'{winWidth}', else:'9999')}px){ +@media (max-width:{f:if(condition:'{navbarBreakpointWidth}',then:'{navbarBreakpointWidth}', else:'9999')}px){ html,body{overflow-x:hidden}.offcanvas-collapse{position:fixed;top:56px;bottom:0;width:100%;padding-right:1rem;padding-left:1rem;overflow-y:auto;background-color:var(--gray-dark);transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out;-webkit-transform:translateX(100%);transform:translateX(100%)}.offcanvas-collapse.open{-webkit-transform:translateX(-1rem);transform:translateX(-1rem)}.offcanvas-collapse .navbar-nav .nav-link{color:rgba(255,255,255,.75)}.offcanvas-collapse .navbar-nav .nav-link:hover,.offcanvas-collapse .navbar-nav .nav-link:focus{color:#fff}.dropdown-item.active,.dropdown-item:active{color:#fff}.dropdown-item.active:hover,.dropdown-item:active:hover{color:rgba(0,0,0,.75)}.offcanvas-collapse .navbar-nav .active .nav-link{color:rgba(255,255,255,.75);color:#fff}.navbar > .offcanvas-container{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;width:100%} } @@ -65,7 +65,7 @@ $('[data-toggle="offcanvas"]').on('click', function () { $('.offcanvas-collapse').toggleClass('open') }) - if ( $(window).width() < {f:if(condition:'{winWidth}',then:'{winWidth}', else:'9999')} ) { + if ( $(window).width() < navbarBreakpointWidth ) { $( "#main-navbar" ).children( ".container" ).addClass("offcanvas-container").removeClass("container"); } @@ -78,7 +78,7 @@ $(document).on("click", ".mega-dropdown", function(event) { event.stopPropagation(); }) - if ( $(window).width() < {f:if(condition:'{winWidth}',then:'{winWidth}', else:'9999')} ) { + if ( $(window).width() < navbarBreakpointWidth ) { $(".remove-{settings.config.navbarBreakpoint}").remove(); } else { $(".show-{settings.config.navbarBreakpoint}").remove(); @@ -103,7 +103,7 @@ }); } - if ( $(window).width() > {winWidth} ) { + if ( $(window).width() > navbarBreakpointWidth ) { navbarHover(); } @@ -207,7 +207,7 @@ // Navbar transparent - Navbar/Assets.html - if ( $(window).width() > {settings.navbar.{navbarBreakpoint}} ) { + if ( $(window).width() > navbarBreakpointWidth ) { $(window).on('scroll', function () { if ( $(window).scrollTop() > 60 ) { $('.navbar').css('background-color', '{config.navbar.colorschemes}'); @@ -237,5 +237,4 @@ - diff --git a/Resources/Private/Partials/Page/Navbar/Navbar.html b/Resources/Private/Partials/Page/Navbar/Navbar.html index 8a2e1d0f..0b88c674 100644 --- a/Resources/Private/Partials/Page/Navbar/Navbar.html +++ b/Resources/Private/Partials/Page/Navbar/Navbar.html @@ -72,7 +72,7 @@ -