diff --git a/Classes/Backend/Preview/T3sbPreviewRenderer.php b/Classes/Backend/Preview/T3sbPreviewRenderer.php index bacaa909..b9965a83 100644 --- a/Classes/Backend/Preview/T3sbPreviewRenderer.php +++ b/Classes/Backend/Preview/T3sbPreviewRenderer.php @@ -126,11 +126,16 @@ public function renderPageModulePreviewContent(GridColumnItem $item): string if ( $flexconf['equalWidth'] ) { $out .= '
- Equal Width'; } - if ( $flexconf['equalHeight'] ) { - $out .= '
- Equal Height'; + if ( $flexconf['horizontalGutters'] ) { + $out .= '
- Horizontal gutters: '.$flexconf['horizontalGutters']; } - if ( $flexconf['noGutters'] ) { - $out .= '
- No Gutters'; + } + if ($record['CType'] == 'two_columns') { + if ($flexconf['bgimages']) { + $out .= '
- Has Background-image'; + } + if ( $flexconf['colHeight'] ) { + $out .= '
- Min.-Height of the Element: '.$flexconf['colHeight'].'px'; } } if ($record['CType'] == 'button_group') { @@ -180,6 +185,20 @@ public function renderPageModulePreviewContent(GridColumnItem $item): string $out .= '
- Zoom'; } } + if ($record['CType'] == 'swiper_container') { + if ( $flexconf['width'] ) { + $out .= '
- Width: '.$flexconf['width'].'px'; + } + if ( $flexconf['ratio'] ) { + $out .= '
- Aspect ratio: '.$flexconf['ratio']; + } + if ( $flexconf['slidesPerView'] ) { + $out .= '
- Slides per view: '.$flexconf['slidesPerView']; + } + if ( $flexconf['delay'] ) { + $out .= '
- Delay between transitions (in ms): '.$flexconf['delay']; + } + } if ($record['CType'] == 'card_wrapper') { $out .= '
- Wrapper: Card '.$flexconf['card_wrapper']; if ( $flexconf['visibleCards'] ) { @@ -228,6 +247,9 @@ public function renderPageModulePreviewContent(GridColumnItem $item): string if ( $flexconf['addHeight'] ) { $out .= '
- Surcharge height to parallax view: '.$flexconf['addHeight'].'px'; } + if ( $flexconf['mobile'] ) { + $out .= '
- Disable on mobile devices!'; + } } if ($record['CType'] === 'modal') { diff --git a/Classes/Command/CdnToLocal.php b/Classes/Command/CdnToLocal.php index b7db81af..33ff5605 100644 --- a/Classes/Command/CdnToLocal.php +++ b/Classes/Command/CdnToLocal.php @@ -330,17 +330,32 @@ protected function execute(InputInterface $input, OutputInterface $output) self::writeCustomFile($customPath, $customFileName, $cdnPath); } - if ($key == 'parallaxVanilla') { + if ($key == 'jarallax') { $customDir = 'fileadmin/T3SB/Resources/Public/JS/'; $customPath = GeneralUtility::getFileAbsFileName($customDir); - $customFileName = 'parallax-vanilla.min.js'; - $cdnPath = 'https://cdn.jsdelivr.net/npm/parallax-vanilla@'.$version.'/dist/'.$customFileName; + $customFileName = 'jarallax.min.js'; + $cdnPath = 'https://unpkg.com/jarallax@'.$version.'/dist/'.$customFileName; + self::writeCustomFile($customPath, $customFileName, $cdnPath); + $customFileName = 'jarallax-video.min.js'; + $cdnPath = 'https://unpkg.com/jarallax@'.$version.'/dist/'.$customFileName; + self::writeCustomFile($customPath, $customFileName, $cdnPath); + } + + if ($key == 'swiper') { + $customDir = 'fileadmin/T3SB/Resources/Public/CSS/'; + $customPath = GeneralUtility::getFileAbsFileName($customDir); + $customFileName = 'swiper-bundle.min.css'; + $cdnPath = 'https://unpkg.com/swiper@'.$version.'/'.$customFileName; + self::writeCustomFile($customPath, $customFileName, $cdnPath); + $customDir = 'fileadmin/T3SB/Resources/Public/JS/'; + $customPath = GeneralUtility::getFileAbsFileName($customDir); + $customFileName = 'swiper-bundle.min.js'; + $cdnPath = 'https://unpkg.com/swiper@'.$version.'/'.$customFileName; self::writeCustomFile($customPath, $customFileName, $cdnPath); } } return 0; - } private function writeCustomFile($customPath, $customFileName, $cdnPath, $extend=false ) { diff --git a/Classes/DataProcessing/BootstrapProcessor.php b/Classes/DataProcessing/BootstrapProcessor.php index 24246e18..3cd94f3b 100644 --- a/Classes/DataProcessing/BootstrapProcessor.php +++ b/Classes/DataProcessing/BootstrapProcessor.php @@ -80,7 +80,7 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu $processedData['style'] = $styleHelper->getBgColor($processedData['data']); $processedData['isTxContainer'] = FALSE; - + /** * Grid System */ @@ -177,6 +177,46 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu } } + + /** + * Swiper container + */ + if ( $processedData['data']['CType'] == 'swiper_container' ) { + $processedData['isTxContainer'] = TRUE; + $processedData['swiperCss'] = $flexconf['swiperCss']; + $processedData['swiperJs'] = $flexconf['swiperJs']; + $processedData['sliderStyle'] = $flexconf['sliderStyle']; + $processedData['width'] = $flexconf['width']; + $processedData['ratio'] = $flexconf['ratio']; + $processedData['slidesPerView'] = (int)$flexconf['slidesPerView'] ?: 4; + $processedData['breakpoints576'] = (int)$flexconf['breakpoints576'] ?: 2; + $processedData['breakpoints768'] = (int)$flexconf['breakpoints768'] ?: 3; + $processedData['breakpoints992'] = (int)$flexconf['breakpoints992'] ?: 4; + $processedData['slidesPerGroup'] = (int)$flexconf['slidesPerGroup']; + $processedData['spaceBetween'] = (int)$flexconf['spaceBetween']; + $processedData['loop'] = (int)$flexconf['loop']; + $processedData['navigation'] = (int)$flexconf['navigation']; + $processedData['pagination'] = (int)$flexconf['pagination']; + $processedData['autoplay'] = (int)$flexconf['autoplay']; + $processedData['delay'] = $flexconf['autoplay'] ? (int)$flexconf['delay'] : 99999999; + $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class); + $queryBuilder = $connectionPool->getQueryBuilderForTable('tt_content'); + $statement = $queryBuilder + ->select('uid') + ->from('tt_content') + ->where( + $queryBuilder->expr()->eq('tx_container_parent', $queryBuilder->createNamedParameter($processedData['data']['uid'], \PDO::PARAM_INT)) + ) + ->execute() + ->fetchAll(); + $fileRepository = GeneralUtility::makeInstance(FileRepository::class); + foreach($statement as $element) { + $filesFromRepository[$element['uid']] = $fileRepository->findByRelation('tt_content', 'image', $element['uid']); + } + $processedData['swiperSlides'] = $filesFromRepository; + } + + /** * Collapse Container */ @@ -384,6 +424,15 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu if ($flexconf['shift']){ $processedData['shift'] = (int)$flexconf['shift'] / 100; } + if ( $parentflexconf['owlCarousel'] ) { + $processedData['owlCarousel'] = TRUE; + + } + + if ( $parentflexconf['swiperJs'] ) { + $processedData['swiper'] = TRUE; + + } } /** diff --git a/Classes/DataProcessing/GalleryProcessor.php b/Classes/DataProcessing/GalleryProcessor.php index ad91899d..f9821e25 100644 --- a/Classes/DataProcessing/GalleryProcessor.php +++ b/Classes/DataProcessing/GalleryProcessor.php @@ -635,11 +635,11 @@ protected function calculateMediaWidthsAndHeights() $bsGridWidth = self::getCalculatedGridWidth($bsGridWidth); } else { -# $bsGridWidth = $bsGridWidth - 30; + #$bsGridWidth = $bsGridWidth - 30; } $galleryWidth = $bsGridWidth / 100 * $rowWidth; - $imagePadding = self::getImagePadding(); + $imagePadding = self::getImagePadding($bsGridWidth); $mediaWidth = ($galleryWidth - $imagePadding ) / $this->galleryData['count']['columns']; } @@ -992,9 +992,11 @@ protected function getGridWidth($bsGridWidth, $suffix) /** * Returns $imagepadding * + * @param int $bsGridWidth + * * @return int $imagepadding */ - protected function getImagePadding() + protected function getImagePadding($bsGridWidth) { if ( $this->cType == 't3sbs_card' && $this->processedData['data']['tx_container_parent'] diff --git a/Classes/Domain/Model/Config.php b/Classes/Domain/Model/Config.php index 81e0f911..c4eb031f 100644 --- a/Classes/Domain/Model/Config.php +++ b/Classes/Domain/Model/Config.php @@ -832,6 +832,13 @@ class Config extends AbstractEntity */ protected $sidebarMenuPosition = ''; + /** + * $sectionmenuIcons + * + * @var bool + */ + protected $sectionmenuIcons = false; + /** * sidebarSectionMobile * @@ -3838,4 +3845,26 @@ public function setSidebarSectionMobile($sidebarSectionMobile) $this->sidebarSectionMobile = $sidebarSectionMobile; } + /** + * Returns the sectionmenuIcons + * + * @return bool $sectionmenuIcons + */ + public function getSectionmenuIcons() + { + return $this->sectionmenuIcons; + } + + /** + * Sets the sectionmenuIcons + * + * @param bool $sectionmenuIcons + * @return void + */ + public function setSectionmenuIcons($sectionmenuIcons) + { + $this->sectionmenuIcons = $sectionmenuIcons; + } + + } diff --git a/Classes/Helper/WrapperHelper.php b/Classes/Helper/WrapperHelper.php index 01dd10ad..12925ca2 100644 --- a/Classes/Helper/WrapperHelper.php +++ b/Classes/Helper/WrapperHelper.php @@ -250,11 +250,23 @@ public function getCardWrapper($processedData, $flexconf): array $processedData['flipper']['class'] = 'col-xs-12 col-sm-6 col-md-4'; } } - + // swiperjs if ($flexconf['card_wrapper'] == 'slider') { - $processedData['class'] .= ' mx-n3'; $processedData['visibleCards'] = (int)$flexconf['visibleCards'] ?: 3; $processedData['cols'] = floor(12 / $processedData['visibleCards']); + $processedData['width'] = $flexconf['width']; + $processedData['ratio'] = $flexconf['ratio']; + $processedData['slidesPerView'] = (int)$flexconf['slidesPerView'] ?: 4; + $processedData['breakpoints576'] = (int)$flexconf['breakpoints576'] ?: 2; + $processedData['breakpoints768'] = (int)$flexconf['breakpoints768'] ?: 3; + $processedData['breakpoints992'] = (int)$flexconf['breakpoints992'] ?: 4; + $processedData['slidesPerGroup'] = (int)$flexconf['slidesPerGroup']; + $processedData['spaceBetween'] = (int)$flexconf['spaceBetween']; + $processedData['loop'] = (int)$flexconf['loop']; + $processedData['navigation'] = (int)$flexconf['navigation']; + $processedData['pagination'] = (int)$flexconf['pagination']; + $processedData['autoplay'] = (int)$flexconf['autoplay']; + $processedData['delay'] = $flexconf['autoplay'] ? (int)$flexconf['delay'] : 99999999; } } $processedData['card_wrapper_layout'] = $flexconf['card_wrapper'] ?: ''; @@ -299,7 +311,7 @@ public function getCarouselContainer($processedData, $flexconf): array $block = '#multiSlider-'.$processedData['data']['uid'].' .MS-content .item {width: '.$flexconf['number'].'}'; $processedData['multislider'] = TRUE; - $processedData['jsOptions'] = '{'.$options.'}'; + $processedData['jsOptions'] = '{'.$options.'}'; $processedData['cssBlock'] = $block; } @@ -313,10 +325,8 @@ public function getCarouselContainer($processedData, $flexconf): array $processedData['maxWidth'] = $flexconf['width'].'px'; $processedData['interval'] = $flexconf['interval']; $processedData['darkVariant'] = $flexconf['darkVariant']; - $processedData['carouselFade'] = $flexconf['carouselFade'] ? ' carousel-fade': ''; $processedData['carouselFade'] .= $flexconf['darkVariant'] ? ' carousel-dark': ''; - $processedData['thumbnails'] = $flexconf['thumbnails'] ? true : false; return $processedData; @@ -336,23 +346,44 @@ public function getParallaxWrapper($processedData, $flexconf, $webp=FALSE): arra $fileRepository = GeneralUtility::makeInstance(FileRepository::class); $file = $fileRepository->findByRelation('tt_content', 'assets', (int)$processedData['data']['uid'])[0]; $processedData['file'] = $file; - if ( $file ) { if ( $file->getType() === 4 ) { $processedData['video'] = TRUE; + if ( $file->getMimeType() === 'video/youtube' || $file->getExtension() === 'youtube' ) { + // youtube video + $processedData['youtube'] = TRUE; + $events = $flexconf; + $events['videoAutoPlay'] = $file->getProperties()['autoplay']; + $events['uid'] = $processedData['data']['uid']; + $processedData['videoId'] = GeneralUtility::makeInstance(YouTubeRenderer::class)->render($file, $events, true); + } elseif ( $file->getMimeType() === 'video/vimeo' || $file->getExtension() === 'vimeo' ) { + // vimeo video + $processedData['vimeo'] = TRUE; + $processedData['videoId'] = GeneralUtility::makeInstance(YouTubeRenderer::class)->render($file, $events, true); + } else { + // local video + $processedData['local'] = TRUE; + if ( $file->getMimeType() == 'video/mp4' ) { + $processedData['mimeType'] = 'mp4' ; + } + if ( $file->getMimeType() == 'video/webm' ) { + $processedData['mimeType'] = 'webm' ; + } + if ( $file->getMimeType() == 'video/ogv' ) { + $processedData['mimeType'] = 'ogv' ; + } + $processedData['file'] = $file; + } } else { $bgImage = GeneralUtility::makeInstance(BackgroundImageUtility::class) ->getBgImage($processedData['data']['uid'], 'tt_content', FALSE, FALSE, [], FALSE, FALSE, $webp); - - $processedData['parallaxImageUid'] = $bgImage[0]; - $processedData['parallaxImage'] = $bgImage[1]; - $processedData['speedFactor'] = $flexconf['speedFactor']; - $processedData['addHeight'] = (int)$flexconf['addHeight'] ?: 0; + $processedData['parallaxImage'] = $bgImage; } - } - if ($flexconf['paddingTopBottom']) { - $processedData['style'] .= ' padding: '.$flexconf['paddingTopBottom'].'rem 1rem;'; + $processedData['width'] = $flexconf['width']; + $processedData['speedFactor'] = $flexconf['speedFactor'] ?: 1; + $processedData['addHeight'] = (int)$flexconf['addHeight'] ?: 0; + $processedData['no-mobile'] = $flexconf['mobile'] ? '/iPad|iPhone|iPod|Android/' : '-'; } return $processedData; @@ -374,7 +405,6 @@ public function getCollapsible($processedData, $flexconf, $parentflexconf): arra $processedData['appearance'] = $parentflexconf['appearance']; $processedData['show'] = $flexconf['active'] ? ' show' : ''; - $processedData['expanded'] = $flexconf['active'] ? 'true' : 'false'; $processedData['collapsed'] = $flexconf['active'] ? '' : ' collapsed'; $processedData['expanded'] = $flexconf['active'] ? 'true' : 'false'; $processedData['buttonstyle'] = $flexconf['style'] ? $flexconf['style'] : 'primary'; diff --git a/Classes/Utility/YouTubeRenderer.php b/Classes/Utility/YouTubeRenderer.php index 0811e261..fb4a5513 100644 --- a/Classes/Utility/YouTubeRenderer.php +++ b/Classes/Utility/YouTubeRenderer.php @@ -78,7 +78,7 @@ protected function getOnlineMediaHelper(FileInterface $file) * @param array $events * @return string */ - public function render(FileInterface $file, $events) + public function render(FileInterface $file, $events, $idOnly=false) { if ($file instanceof FileReference) { $orgFile = $file->getOriginalFile(); @@ -99,6 +99,10 @@ public function render(FileInterface $file, $events) $addEvents .= $events['videoRaster'] ? ', addRaster: true' : ''; $addEvents .= $events['videoGaTrack'] ? '' : ', gaTrack: false'; + if ($idOnly) { + return $videoId; + } + return "{videoURL:'".$videoId."', containment:'#dom".$events['uid']."', showControls:".$showControls.", ratio:'".$ratio."', quality: '".$quality."', opacity:1, autoPlay:".$autoPlay.", mute:".$mute.", startAt:0".$addEvents."}"; } diff --git a/Configuration/FlexForms/Container/CardWrapper.xml b/Configuration/FlexForms/Container/CardWrapper.xml index 57240110..0a5b7438 100644 --- a/Configuration/FlexForms/Container/CardWrapper.xml +++ b/Configuration/FlexForms/Container/CardWrapper.xml @@ -74,14 +74,18 @@ group - Deck + Grid Cards (Deck) deck - Columns + Masonry (Columns) columns + Slider (swiper) + slider + + Flipper flipper @@ -125,6 +129,170 @@ + + + + FIELD:sDEF.card_wrapper:=:slider + + input + 4 + 4 + 576 + int + 0 + + + + + + + + FIELD:sDEF.card_wrapper:=:slider + + input + 4 + 5 + 16:9 + 0 + + + + + + + + FIELD:sDEF.card_wrapper:=:slider + + input + 4 + 4 + 0 + + + + + + + + FIELD:sDEF.card_wrapper:=:slider + + input + 4 + 2 + 0 + + + + + + + FIELD:sDEF.card_wrapper:=:slider + + input + 4 + 3 + 0 + + + + + + + FIELD:sDEF.card_wrapper:=:slider + + input + 4 + 4 + 0 + + + + + + + + FIELD:sDEF.card_wrapper:=:slider + + input + 4 + 1 + 0 + + + + + + + + FIELD:sDEF.card_wrapper:=:slider + + input + 4 + 20 + 0 + + + + + + + + FIELD:sDEF.card_wrapper:=:slider + + check + + + + + + + + FIELD:sDEF.card_wrapper:=:slider + + check + + + + + + + FIELD:sDEF.card_wrapper:=:slider + + check + + + + + + + + FIELD:sDEF.card_wrapper:=:slider + reload + + check + + + + + + + + + + FIELD:sDEF.card_wrapper:=:slider + FIELD:sDEF.autoplay:=:1 + + + + input + 4 + 5000 + 0 + + + + + diff --git a/Configuration/FlexForms/Container/ParallaxWrapper.xml b/Configuration/FlexForms/Container/ParallaxWrapper.xml index 91ca1ed2..6b577c7b 100644 --- a/Configuration/FlexForms/Container/ParallaxWrapper.xml +++ b/Configuration/FlexForms/Container/ParallaxWrapper.xml @@ -60,14 +60,28 @@ + + + + + input + 4 + 4 + 576 + int + 0 + + + + - + input 6 - 3 + 1 @@ -84,6 +98,16 @@ + + + + + check + 0.5 + + + + diff --git a/Configuration/FlexForms/Container/SwiperContainer.xml b/Configuration/FlexForms/Container/SwiperContainer.xml new file mode 100644 index 00000000..c3f6c1a1 --- /dev/null +++ b/Configuration/FlexForms/Container/SwiperContainer.xml @@ -0,0 +1,282 @@ + + + + + array + + General + + + + + + + select + selectSingle + + + none + 0 + + + Hidden only on xs + d-none d-sm-block + + + Hidden on sm and down + d-none d-md-block + + + Hidden on md and down + d-none d-lg-block + + + Hidden on lg and down + d-none d-xl-block + + + Hidden only on xl + d-xl-none + + + Visible only on xs + d-block d-sm-none + + + Visible sm and down + d-block d-md-none + + + Visible md and down + d-block d-lg-none + + + Visible lg and down + d-block d-xl-none + + + 0 + + + + + + + + reload + + select + selectSingle + + + Default + Default + + + Custom one + CustomOne + + + Custom two + CustomTwo + + + Default + + + + + + + + + input + 4 + 4 + 576 + int + 0 + + + + + + + + + input + 4 + 5 + 16:9 + 0 + + + + + + + + FIELD:general.sliderStyle:=:Default + + input + 4 + 4 + 0 + + + + + + + + FIELD:general.sliderStyle:=:Default + + input + 4 + 2 + 0 + + + + + + + FIELD:general.sliderStyle:=:Default + + input + 4 + 3 + 0 + + + + + + + FIELD:general.sliderStyle:=:Default + + input + 4 + 4 + 0 + + + + + + + + FIELD:general.sliderStyle:=:Default + + input + 4 + 1 + 0 + + + + + + + + FIELD:general.sliderStyle:=:Default + + input + 4 + 20 + 0 + + + + + + + + FIELD:general.sliderStyle:=:Default + + check + + + + + + + + FIELD:general.sliderStyle:=:Default + + check + + + + + + + FIELD:general.sliderStyle:=:Default + + check + + + + + + + + + FIELD:general.sliderStyle:=:Default + reload + + check + + + + + + + + + + FIELD:general.sliderStyle:=:Default + FIELD:general.autoplay:=:1 + + + + input + 4 + 5000 + 0 + + + + + + + + + FIELD:general.sliderStyle:!=:Default + + text + 500 + 9999 + + + + + + + + + FIELD:general.sliderStyle:!=:Default + + text + 500 + 9999 + + + + + + + + + + \ No newline at end of file diff --git a/Configuration/TCA/Overrides/tt_content.php b/Configuration/TCA/Overrides/tt_content.php index a0d774de..53711088 100644 --- a/Configuration/TCA/Overrides/tt_content.php +++ b/Configuration/TCA/Overrides/tt_content.php @@ -420,6 +420,25 @@ ); $GLOBALS['TCA']['tt_content']['types']['masonry_wrapper']['showitem'] = $GLOBALS['TCA']['tt_content']['types']['two_columns']['showitem']; +# SWIPE CONTAINER +\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\B13\Container\Tca\Registry::class)->configureContainer( + ( + new \B13\Container\Tca\ContainerConfiguration( + 'swiper_container', + 'Swiper Container', + 'A container for several Swipe slides (CE:t3sb_carousel)', + [ + [ + ['name' => 'Swipe Container', 'colPos' => 300, 'allowed' => ['CType' => 't3sbs_carousel']] + ] + ] + ) + ) + ->setIcon('EXT:t3sbootstrap/Resources/Public/Icons/Register/ge-carousel-container.svg') + ->setSaveAndCloseInNewContentElementWizard(false) +); +$GLOBALS['TCA']['tt_content']['types']['swiper_container']['showitem'] = $GLOBALS['TCA']['tt_content']['types']['two_columns']['showitem']; + /*************** * Add new CTypes @@ -461,7 +480,7 @@ 'tt_content', 'CType', [ - 'Bootstrap Carousel Item (in carousel container)', + 'Bootstrap Carousel Item (in carousel- or swiper-container)', 't3sbs_carousel', 'content-carousel-item-textandimage' ], @@ -747,6 +766,7 @@ 'tabs_container' => 'FILE:EXT:t3sbootstrap/Configuration/FlexForms/Container/Tabs.xml', 'tabs_tab' => 'FILE:EXT:t3sbootstrap/Configuration/FlexForms/Container/TabsTab.xml', 'masonry_wrapper' => 'FILE:EXT:t3sbootstrap/Configuration/FlexForms/Container/MasonryWrapper.xml', + 'swiper_container' => 'FILE:EXT:t3sbootstrap/Configuration/FlexForms/Container/SwiperContainer.xml', ] ] ], @@ -1409,7 +1429,7 @@ $GLOBALS['TCA']['tt_content']['ctrl']['previewRenderer'] = T3SBS\T3sbootstrap\Backend\Preview\DefaultPreviewRenderer::class; $containers = ['two_columns', 'three_columns', 'four_columns', 'six_columns', 'card_wrapper', 'button_group', 'autoLayout_row', 'background_wrapper','parallax_wrapper',' container', 'carousel_container', 'collapsible_container', 'collapsible_accordion', - 'modal', 'tabs_container', 'tabs_tab', 'listGroup_wrapper', 'masonry_wrapper']; + 'modal', 'tabs_container', 'tabs_tab', 'listGroup_wrapper', 'masonry_wrapper', 'swiper_container']; foreach ($containers as $container) { $GLOBALS['TCA']['tt_content']['types'][trim($container)]['previewRenderer'] = T3SBS\T3sbootstrap\Backend\Preview\T3sbPreviewRenderer::class; } diff --git a/Configuration/TCA/tx_t3sbootstrap_domain_model_config.php b/Configuration/TCA/tx_t3sbootstrap_domain_model_config.php index d98f62d4..613ab91d 100644 --- a/Configuration/TCA/tx_t3sbootstrap_domain_model_config.php +++ b/Configuration/TCA/tx_t3sbootstrap_domain_model_config.php @@ -273,6 +273,20 @@ ] ] ], + 'sectionmenu_icons' => [ + 'exclude' => false, + 'label' => 'FA icons', + 'accordion_id' => 1, + 'accordion_sub' => '1-5', + 'config' => [ + 'type' => 'check', + 'items' => [ + '1' => [ + '0' => 'Shows FA icons in section menu' + ] + ] + ] + ], 'sidebar_section_mobile' => [ 'exclude' => false, 'label' => 'Section mobile', diff --git a/Configuration/TypoScript/ContentElement/Container.typoscript b/Configuration/TypoScript/ContentElement/Container.typoscript index 2619f739..08be0a65 100644 --- a/Configuration/TypoScript/ContentElement/Container.typoscript +++ b/Configuration/TypoScript/ContentElement/Container.typoscript @@ -358,4 +358,21 @@ tt_content { } } + swiper_container < lib.contentElement + swiper_container { + templateName = SwiperContainer + templateRootPaths { + 0 = EXT:t3sbootstrap/Resources/Private/Templates/Container/ + 1 = {$plugin.tx_t3sbootstrap.view.templateRootPath}Container/ + } + dataProcessing { + + 300 = B13\Container\DataProcessing\ContainerProcessor + 300 { + colPos = 300 + as = col_300 + } + } + } + } diff --git a/Configuration/TypoScript/Lib/ContentElement.typoscript b/Configuration/TypoScript/Lib/ContentElement.typoscript index 2e9fc28b..77147b4d 100644 --- a/Configuration/TypoScript/Lib/ContentElement.typoscript +++ b/Configuration/TypoScript/Lib/ContentElement.typoscript @@ -62,11 +62,12 @@ lib.contentElement { animateVersion = {$bootstrap.cdn.animate} masonryVersion = {$bootstrap.cdn.masonry} masonryIntegrity = {$bootstrap.cdn.masonryIntegrity} - parallaxVanillaVersion = {$bootstrap.cdn.parallaxVanilla} + jarallaxVersion = {$bootstrap.cdn.jarallax} baguetteBoxVersion = {$bootstrap.cdn.baguetteBox} lightcaseVersion = {$bootstrap.cdn.lightcase} magnificpopupVersion = {$bootstrap.cdn.magnificpopup} owlCarouselVersion = {$bootstrap.cdn.owlCarousel} + swiperVersion = {$bootstrap.cdn.swiper} ytPlayerVersion = {$bootstrap.cdn.ytPlayer} viewportcheckerVersion = {$bootstrap.cdn.viewportchecker} viewportcheckerIntegrity = {$bootstrap.cdn.viewportcheckerIntegrity} @@ -93,7 +94,7 @@ lib.contentElement { breakpoint = {$bootstrap.config.navbarBreakpoint} lightboxSelection = {$bootstrap.config.lightboxSelection} cardFlipperOnClick = {$bootstrap.config.cardFlipperOnClick} - + sectionmenuIcons = {$bootstrap.config.sectionmenuIcons} // used also with config config { sectionmenuAnchorOffset = {$bootstrap.config.sectionmenuAnchorOffset} diff --git a/Configuration/TypoScript/Page/Template.typoscript b/Configuration/TypoScript/Page/Template.typoscript index b1b09e7f..d0229f63 100644 --- a/Configuration/TypoScript/Page/Template.typoscript +++ b/Configuration/TypoScript/Page/Template.typoscript @@ -40,6 +40,7 @@ page { backToTopForAllPages = {$bootstrap.backToTopForAllPages} gtm = {$bootstrap.gtm} bgMediaQueries = {$bootstrap.image.bgMediaQueries} + sectionmenuIcons = {$bootstrap.config.sectionmenuIcons} navbar { image.defaultPath = {$bootstrap.navbar.image.defaultPath} image.width = {$bootstrap.navbar.image.width} diff --git a/Configuration/TypoScript/constants.typoscript b/Configuration/TypoScript/constants.typoscript index bf478da3..3bab0d8a 100644 --- a/Configuration/TypoScript/constants.typoscript +++ b/Configuration/TypoScript/constants.typoscript @@ -60,8 +60,11 @@ bootstrap.cdn { ytPlayer = 3.3.9 # cat=bootstrap-cdn/b-version/49; type=small; label=Owl Carousel: owlCarousel = 2.3.4 - # cat=bootstrap-cdn/b-version/50; type=small; label=Parallax-vanilla: - parallaxVanilla = 1.2.3 + # cat=bootstrap-cdn/b-version/50; type=small; label=Jarallax: + jarallax = 1 + # cat=bootstrap-cdn/b-version/60; type=small; label=Swiper: + swiper = 7 + # cat=bootstrap-cdn/c-integrity/10; type=small; label=Bootstrap CSS: bootstrapCssIntegrity = sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU # cat=bootstrap-cdn/c-integrity/11; type=small; label=Bootstrap JS: @@ -185,8 +188,8 @@ bootstrap.backToTopForAllPages = 0 # GTM Account ID - include the Google Tag Manager if entered bootstrap.gtm = -# disable jQuery & jQuer easing if activated -bootstrap.disable.jquery = 0 +# disable jQuery by default +bootstrap.disable.jquery = 1 bootstrap.navbar { image.defaultPath = /typo3conf/ext/t3sbootstrap/Resources/Public/Images/bootstrap-logo-white.svg diff --git a/Configuration/TypoScript/setup.typoscript b/Configuration/TypoScript/setup.typoscript index 1f77e679..3dcb7dde 100644 --- a/Configuration/TypoScript/setup.typoscript +++ b/Configuration/TypoScript/setup.typoscript @@ -40,7 +40,8 @@ module.tx_t3sbootstrap { ytPlayer = {$bootstrap.cdn.ytPlayer} owlCarousel = {$bootstrap.cdn.owlCarousel} masonry = {$bootstrap.cdn.masonry} - parallaxVanilla = {$bootstrap.cdn.parallaxVanilla} + jarallax = {$bootstrap.cdn.jarallax} + swiper = {$bootstrap.cdn.swiper} } } } diff --git a/Resources/Private/Extensions/news/Configuration/TSconfig/templateLayouts.tsconfig b/Resources/Private/Extensions/news/Configuration/TSconfig/templateLayouts.tsconfig index 1d0f69f5..450d09c9 100644 --- a/Resources/Private/Extensions/news/Configuration/TSconfig/templateLayouts.tsconfig +++ b/Resources/Private/Extensions/news/Configuration/TSconfig/templateLayouts.tsconfig @@ -10,4 +10,4 @@ tx_news.templateLayouts { 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/Partials/Content/Swiper/CustomOne.html b/Resources/Private/Partials/Content/Swiper/CustomOne.html new file mode 100644 index 00000000..76dc4876 --- /dev/null +++ b/Resources/Private/Partials/Content/Swiper/CustomOne.html @@ -0,0 +1,68 @@ + + + +{swiperCss -> f:format.raw()} + + + + +{swiperJs -> f:format.raw()} + + + + + + + + + +Example from Default.html: +
+
+ +
+ + + +
+
+
+ +
+
+
+ +
+
+
+
+ + + + + +
+ +
+
diff --git a/Resources/Private/Partials/Content/Swiper/CustomTwo.html b/Resources/Private/Partials/Content/Swiper/CustomTwo.html new file mode 100644 index 00000000..5a9ff829 --- /dev/null +++ b/Resources/Private/Partials/Content/Swiper/CustomTwo.html @@ -0,0 +1,68 @@ + + + +{swiperCss -> f:format.raw()} + + + + +{swiperJs -> f:format.raw()} + + + + + + + + + +Example from Default.html: +
+
+ +
+ + + +
+
+
+ +
+
+
+ +
+
+
+
+ + + + + +
+ +
+
diff --git a/Resources/Private/Partials/Content/Swiper/Default.html b/Resources/Private/Partials/Content/Swiper/Default.html new file mode 100644 index 00000000..072d9715 --- /dev/null +++ b/Resources/Private/Partials/Content/Swiper/Default.html @@ -0,0 +1,201 @@ + + +#swiper-{data.uid} { + width: 100%; + height: auto; +} +#swiper-{data.uid} .swiper-wrapper { + height: auto; +} +#swiper-{data.uid} .swiper-slide { + text-align: center; + flex-direction: column; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: start; + -ms-flex-pack: start; + -webkit-justify-content: start; + justify-content: start; + -webkit-box-align: stretch; + -ms-flex-align: stretch; + -webkit-align-items: stretch; + align-items: stretch; +} +#swiper-{data.uid} .swiper-slide img { + display: block; + width: 100%; + height: 100%; + object-fit: cover; +} +#swiper-{data.uid} .swiper-button-next, +#swiper-{data.uid} .swiper-button-prev { + color: white; + text-shadow: 1px 1px 2px #000,0 0 25px #000,0 0 5px #000; +} + + + // Swiper Slider - Partials/Content/Swiper/Default.html + var spv = {slidesPerView}, + spb = {spaceBetween}, + spg = {slidesPerGroup}, + del = {delay}, + b576 = {breakpoints576}, + b768 = {breakpoints768}, + b992 = {breakpoints992}, + lop = {loop}, + uid = {data.uid}; + var swiper = new Swiper('#swiper-{data.uid}', { + slidesPerView: spv, + spaceBetween: spb, + slidesPerGroup: spg, + loop: lop, + disableOnInteraction: false, + pagination: { + el: ".swiper-pagination", + clickable: true, + }, + autoplay: { + delay: del, + }, + navigation: { + nextEl: '.next-'+uid, + prevEl: '.prev-'+uid, + }, + breakpoints: { + 10: { + slidesPerView: 1, + }, + 576: { + slidesPerView: b576, + }, + 768: { + slidesPerView: b768, + }, + 992: { + slidesPerView: b992, + }, + }, + }); + + var swi = document.getElementById('swiper-{data.uid}'), + pag = swi.querySelector('.swiper-pagination'), + next = swi.getElementsByClassName('swiper-button-next'), + prev = swi.getElementsByClassName('swiper-button-prev'), + offset = pag.clientHeight - 5; + next[0].style.top = 'calc(50% - '+offset+'px)'; + prev[0].style.top = 'calc(50% - '+offset+'px)'; + + +
+
+ + +
+
+ + + + + + +
+ + {card.bodytext -> f:format.html()} +
+
+
+
+
+
+
+ +
+
+
+ +
+
+
+ + + + + +
+ +
+
+ + + + + + + + + + + + + + + + +

+ {card.hFa -> f:format.raw()}{card.header -> f:format.raw()}

+
{card.subheader -> f:format.raw()}
+ +
+ +

+ {card.hFa -> f:format.raw()}{card.header -> f:format.raw()}

+
+ +

+ {card.hFa -> f:format.raw()}{card.subheader -> f:format.raw()}

+
+
+
+ + + + + +

+ {card.hFa -> f:format.raw()}{card.header -> f:format.raw()} +

+
{card.subheader -> f:format.raw()}
+ +
+ +

+ + {card.hFa -> f:format.raw()}{card.header -> f:format.raw()} +

+
+ +

+ + {card.hFa -> f:format.raw()}{card.subheader -> f:format.raw()} +

+
+
+
diff --git a/Resources/Private/Partials/Page/Assets.html b/Resources/Private/Partials/Page/Assets.html index 049be550..8078d200 100644 --- a/Resources/Private/Partials/Page/Assets.html +++ b/Resources/Private/Partials/Page/Assets.html @@ -131,7 +131,7 @@ document.body.style.overflowY = 'unset'; } event.preventDefault(); - t3sbScrollToAnchor({t3sb:intval(number: '{settings.config.sectionmenuAnchorOffset}')}, fixedNavbar, navbarHeight, l.currentTarget.getAttribute('href')) + t3sbScrollToAnchor({t3sb:intval(number: '{settings.config.sectionmenuAnchorOffset}')}, fixedNavbar, navbarHeight, l.currentTarget.getAttribute('href')); }); }); @@ -142,10 +142,7 @@ let sticky = sectionmenu.offsetTop; function stickyFunction() { if (window.pageYOffset + navbarHeight >= sticky) { - sectionmenu.classList.add("sticky"); sectionmenu.style.top = navbarHeight+'px'; - } else { - sectionmenu.classList.remove("sticky"); } } diff --git a/Resources/Private/Partials/Page/Navbar/Assets.html b/Resources/Private/Partials/Page/Navbar/Assets.html index a516dded..5701d904 100644 --- a/Resources/Private/Partials/Page/Navbar/Assets.html +++ b/Resources/Private/Partials/Page/Navbar/Assets.html @@ -55,7 +55,7 @@ }, true); - + // Navbar mega-menu - Navbar/Assets.html var megaDropdown = document.querySelectorAll('.mega-dropdown'), @@ -78,7 +78,6 @@ } - // Shrinking Navbar on scrolling - Navbar/Assets.html @@ -86,7 +85,6 @@ t3sbShrinkingNavbar(navbar, {settings.config.shrinkingNavPadding}); - // Navbar sticky-top - Navbar/Assets.html @@ -106,7 +104,6 @@ {config.navbar.navColorCSS} - // Navbar transparent - Navbar/Assets.html @@ -117,5 +114,4 @@ } - diff --git a/Resources/Private/Partials/Page/Navbar/Language.html b/Resources/Private/Partials/Page/Navbar/Language.html index b0f8a426..ccd977a1 100644 --- a/Resources/Private/Partials/Page/Navbar/Language.html +++ b/Resources/Private/Partials/Page/Navbar/Language.html @@ -42,4 +42,4 @@ - + \ No newline at end of file diff --git a/Resources/Private/Partials/Page/Section.html b/Resources/Private/Partials/Page/Section.html index de13e573..815765fd 100644 --- a/Resources/Private/Partials/Page/Section.html +++ b/Resources/Private/Partials/Page/Section.html @@ -8,29 +8,27 @@ - - - - - - - - -
+
+ + + + {f:if(condition: '{settings.sectionmenuIcons} && {element.data.tx_t3sbootstrap_header_fontawesome}', then:'')} + \ No newline at end of file diff --git a/Resources/Private/Partials/Page/Sub.html b/Resources/Private/Partials/Page/Sub.html index 8a46bf4c..4aa48f07 100644 --- a/Resources/Private/Partials/Page/Sub.html +++ b/Resources/Private/Partials/Page/Sub.html @@ -1,40 +1,56 @@ + + + // Clickableparent - Page/Sub.html + document.querySelectorAll('.submenu .nav [data-bs-toggle="collapse"]').forEach(function(sub) { + sub.addEventListener('click', function(e) { + if ( e.currentTarget.classList.contains('collapsed') ) { + href = e.currentTarget.getAttribute('href'); + if(href != '#') { + location.href = href; + } + } else { + e.preventDefault(); + } + }); + }); + + - + @@ -37,27 +74,40 @@ -
-
- - -
-
- - {row.renderedContent -> f:format.raw()} - -
-
-
- -
- - {row.renderedContent -> f:format.raw()} - -
-
-
+ + +
+
+ + {row.renderedContent -> f:format.raw()} + +
-
+ + +
+
+ + {row.renderedContent -> f:format.raw()} + +
+
+
+ + + + + diff --git a/Resources/Private/Templates/Container/SwiperContainer.html b/Resources/Private/Templates/Container/SwiperContainer.html new file mode 100644 index 00000000..43b6cd93 --- /dev/null +++ b/Resources/Private/Templates/Container/SwiperContainer.html @@ -0,0 +1,23 @@ + + + +no header here + + + + + + + + + + + + + + + + + diff --git a/Resources/Private/Templates/Container/TwoColumns.html b/Resources/Private/Templates/Container/TwoColumns.html index 70eca4a2..816a3942 100644 --- a/Resources/Private/Templates/Container/TwoColumns.html +++ b/Resources/Private/Templates/Container/TwoColumns.html @@ -3,7 +3,7 @@ -
f:format.raw()}')}> +
f:format.raw()}')}>
diff --git a/Resources/Private/Templates/Content/Carousel.html b/Resources/Private/Templates/Content/Carousel.html index 3a216172..c9e8b9ae 100644 --- a/Resources/Private/Templates/Content/Carousel.html +++ b/Resources/Private/Templates/Content/Carousel.html @@ -1,83 +1,95 @@ - - + - + + + + + + + + + + -
-
- -
-
-
-
- -
-
+ + +
+
+ +
+
+
+
+ +
+
+ + {data.bodytext -> f:format.html()} +
+
+
+
+
+ +
+
+
+ +
{data.bodytext -> f:format.html()}
-
-
- - -
-
-
- -
- - {data.bodytext -> f:format.html()} -
-
-
- - - - - -
- - - - - - -
+
+ - + + @@ -109,9 +121,10 @@ + - + @@ -73,9 +72,11 @@ + {f:if(condition: '{settings.sectionmenuIcons} && {element.data.tx_t3sbootstrap_header_fontawesome}', then:'')} {element.data.tx_t3sbootstrap_header_sectionMenu} + {f:if(condition: '{settings.sectionmenuIcons} && {element.data.tx_t3sbootstrap_header_fontawesome}', then:'')} {f:if(condition:'{element.data.header}',then:'{element.data.header}',else:'* No Header for this Link *')} @@ -86,6 +87,3 @@ {page.title -> f:format.raw()} - - - diff --git a/Resources/Private/Templates/Content/MenuSectionPages.html b/Resources/Private/Templates/Content/MenuSectionPages.html index d3401879..a96b8827 100644 --- a/Resources/Private/Templates/Content/MenuSectionPages.html +++ b/Resources/Private/Templates/Content/MenuSectionPages.html @@ -10,19 +10,19 @@ then:' target="{page.target}"')} title="{page.title}" class="nav-link{f:if(condition:'{data.pid} == {page.data.uid}',then:' active')}"> - {page.nav_title} + {f:if(condition: '{page.data.tx_t3sbootstrap_fontawesome_icon}', then:'')}{page.nav_title} - {page.title} + {f:if(condition: '{page.data.tx_t3sbootstrap_fontawesome_icon}', then:'')}{page.title} -