diff --git a/Classes/Controller/ConfigController.php b/Classes/Controller/ConfigController.php index 71e862b3..b4f1e42a 100644 --- a/Classes/Controller/ConfigController.php +++ b/Classes/Controller/ConfigController.php @@ -246,7 +246,7 @@ public function newAction(): void /** * action create * - * @param \T3SBS\T3sbootstrap\Domain\Model\Config $newConfig + * @param Config $newConfig * @return void */ public function createAction(Config $newConfig): void @@ -263,7 +263,7 @@ public function createAction(Config $newConfig): void /** * action edit * - * @param \T3SBS\T3sbootstrap\Domain\Model\Config $config + * @param Config $config * @param bool $updated * @return void */ @@ -290,7 +290,7 @@ public function editAction(Config $config, $updated = FALSE): void /** * action update * - * @param \T3SBS\T3sbootstrap\Domain\Model\Config $config + * @param Config $config * @return void */ public function updateAction(Config $config): void @@ -306,7 +306,7 @@ public function updateAction(Config $config): void /** * action delete * - * @param \T3SBS\T3sbootstrap\Domain\Model\Config $config + * @param Config $config * @return void */ public function deleteAction(Config $config): void @@ -400,8 +400,8 @@ public function getFieldsOptions(): array /** * take over $rootConfig settings * - * @param \T3SBS\T3sbootstrap\Domain\Model\Config $rootConfig - * @return \T3SBS\T3sbootstrap\Domain\Model\Config $newConfig + * @param Config $rootConfig + * @return Config $newConfig */ public function getNewConfig(Config $rootConfig): Config { @@ -422,7 +422,7 @@ public function getNewConfig(Config $rootConfig): Config /** * Compare config with rootconfig * - * @param \T3SBS\T3sbootstrap\Domain\Model\Config $config + * @param Config $config * @return array */ protected function compareConfig(Config $config): array @@ -647,7 +647,7 @@ public function writeConstants(): void /** * Get the data from DB * - * @param \T3SBS\T3sbootstrap\Domain\Model\Config $config + * @param Config $config * @param bool $isRoot * @return string */ @@ -681,7 +681,7 @@ private function getConstants(Config $config, $isRoot): string /** * Get the Tca Columns * - * @param \T3SBS\T3sbootstrap\Domain\Model\Config $config + * @param Config $config * @return array */ private function getTcaColumns(): array @@ -780,8 +780,8 @@ private function getUtilityColors(): array /** * Returns some default settings for new root configuration * - * @param \T3SBS\T3sbootstrap\Domain\Model\Config $newConfig - * @return \T3SBS\T3sbootstrap\Domain\Model\Config $newConfig + * @param Config $newConfig + * @return Config $newConfig */ protected function setDefaults($newConfig): Config { diff --git a/Classes/DataProcessing/BootstrapProcessor.php b/Classes/DataProcessing/BootstrapProcessor.php index 91a9a3ec..9510dcc0 100644 --- a/Classes/DataProcessing/BootstrapProcessor.php +++ b/Classes/DataProcessing/BootstrapProcessor.php @@ -24,6 +24,7 @@ use T3SBS\T3sbootstrap\Utility\BackgroundImageUtility; use TYPO3\CMS\Core\Database\ConnectionPool; use TYPO3\CMS\Core\Resource\FileRepository; +use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController; class BootstrapProcessor implements DataProcessorInterface @@ -353,7 +354,7 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu if ( $processedData['data']['CType'] == 't3sbs_carousel' ) { $processedData['dimensions']['width'] = $parentflexconf['width'] ?: ''; $processedData['carouselLink'] = $parentflexconf['link']; - + $processedData['mobileNoRatio'] = $parentflexconf['mobileNoRatio']; if ($parentflexconf['link'] == 'button' && $processedData['data']['header_link']){ $processedData['data']['button_link'] = $processedData['data']['header_link']; $processedData['data']['header_link'] = ''; @@ -547,17 +548,12 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu /** * Toasts */ - if ( $processedData['data']['CType'] == 't3sbs_toast' ) { + if ( $processedData['data']['CType'] == 't3sbs_toast' || $processedData['data']['CType'] == 'toast_container' ) { $processedData['animation'] = $flexconf['animation'] ? 'true' : 'false'; $processedData['autohide'] = $flexconf['autohide'] ? 'true' : 'false'; $processedData['delay'] = $flexconf['delay']; - if ( $flexconf['placement'] == 'left' ) { - $processedData['placement'] = 'position: absolute; top: 0; left: 0;'; - } elseif ( $flexconf['placement'] == 'right' ) { - $processedData['placement'] = 'position: absolute; top: 0; right: 0;'; - } else { - $processedData['placement'] = ''; - } + $processedData['toastwidth'] = $flexconf['toastwidth']; + $processedData['placement'] = $flexconf['placement']; } // if media @@ -685,11 +681,25 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu # CSS-class for container only if ( $processedData['isTxContainer'] ) { $containerClass = $classHelper->getTxContainerClass($processedData['data'], $flexconf, $processedData['isVideo'], $extConf); - - $processedData['class'] .= $containerClass ? ' '.$containerClass : ''; } + # Flip Card + if ( $processedData['data']['CType'] == 't3sbs_card' && $flexconf['flipcard'] ) { + if ( $processedData['data']['tx_t3sbootstrap_textcolor'] ) { + $backclass = 'text-'.$processedData['data']['tx_t3sbootstrap_textcolor']; + } + if ( $processedData['data']['tx_t3sbootstrap_bgcolor'] ) { + $backstyle = $processedData['data']['tx_t3sbootstrap_bgcolor']; + } else { + if ( $processedData['data']['tx_t3sbootstrap_contextcolor'] ) { + $backclass .= ' bg-'.$processedData['data']['tx_t3sbootstrap_contextcolor']; + } + } + $processedData['backclass'] = trim((string)$backclass); + $processedData['backstyle'] = $backstyle; + } + $processedData['style'] .= ' '.$processedData['data']['tx_t3sbootstrap_extra_style']; $processedData['style'] = trim($processedData['style']); $processedData['class'] = trim($processedData['class']); @@ -703,7 +713,7 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu * * @return TypoScriptFrontendController */ - protected function getFrontendController(): \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController + protected function getFrontendController(): TypoScriptFrontendController { return $GLOBALS['TSFE']; } diff --git a/Classes/DataProcessing/CardProcessor.php b/Classes/DataProcessing/CardProcessor.php index b5fa22f0..6420e01f 100644 --- a/Classes/DataProcessing/CardProcessor.php +++ b/Classes/DataProcessing/CardProcessor.php @@ -159,7 +159,15 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu // class $cardClass = 'card'; $cardClass .= $parentflexconf['equalHeight'] ? ' h-100' : ''; - $cardClass .= $processedData['data']['tx_t3sbootstrap_header_position'] ? ' '.$processedData['data']['tx_t3sbootstrap_header_position']:''; + + if ( $flexconf['flipcard'] ) { + $cardClass .= ' flip-card border-0'; + $cardData['flipcard'] = TRUE; + $cardData['rotateY'] = $flexconf['rotateY']; + } else { + $cardClass .= $processedData['data']['tx_t3sbootstrap_header_position'] ? ' '.$processedData['data']['tx_t3sbootstrap_header_position']:''; + } + if ( $processedData['data']['header_position'] ) { $headerPosition = $processedData['data']['header_position']; if ( $headerPosition == 'left' ) $headerPosition = 'start'; diff --git a/Classes/DataProcessing/GalleryProcessor.php b/Classes/DataProcessing/GalleryProcessor.php index f9821e25..14eafbfd 100644 --- a/Classes/DataProcessing/GalleryProcessor.php +++ b/Classes/DataProcessing/GalleryProcessor.php @@ -189,6 +189,11 @@ class GalleryProcessor implements DataProcessorInterface */ protected $disableAutoRow; + /** + * @var string + */ + protected $parentflexconf; + /** * @var array */ diff --git a/Classes/Helper/ClassHelper.php b/Classes/Helper/ClassHelper.php index 34bbc3ad..7705f88b 100644 --- a/Classes/Helper/ClassHelper.php +++ b/Classes/Helper/ClassHelper.php @@ -12,6 +12,7 @@ use TYPO3\CMS\Core\SingletonInterface; use TYPO3\CMS\Core\Utility\GeneralUtility; +use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController; class ClassHelper implements SingletonInterface { @@ -99,6 +100,15 @@ public function getAllClass($data, $flexconf, $extConf): string $class .= $flexconf['alignSelf'] ? ' align-self-'.$flexconf['alignSelf'] : ''; } + //Flip Card + if ( $data['CType'] == 't3sbs_card' && $flexconf['flipcard'] ) { + if ( $data['tx_t3sbootstrap_contextcolor'] ) { + $data['tx_t3sbootstrap_contextcolor'] = ''; + } + if ( $data['tx_t3sbootstrap_textcolor'] ) { + $data['tx_t3sbootstrap_textcolor'] = ''; + } + } $class .= $data['tx_t3sbootstrap_textcolor'] ? ' text-'.$data['tx_t3sbootstrap_textcolor'] : ''; $class .= $data['tx_t3sbootstrap_contextcolor'] ? ' bg-'.$data['tx_t3sbootstrap_contextcolor'] : ''; @@ -363,7 +373,7 @@ public function getContainerClass($parentflexconf, $flexconf): string * * @return TypoScriptFrontendController */ - protected function getFrontendController(): \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController + protected function getFrontendController(): TypoScriptFrontendController { return $GLOBALS['TSFE']; } diff --git a/Classes/Helper/WrapperHelper.php b/Classes/Helper/WrapperHelper.php index 12925ca2..eae42089 100644 --- a/Classes/Helper/WrapperHelper.php +++ b/Classes/Helper/WrapperHelper.php @@ -96,6 +96,7 @@ public function getBackgroundWrapper($processedData, $flexconf, $cdnEnable=null, $processedData['alignItem'] = $flexconf['alignVideoItem'] != 'none' ? ' '.$flexconf['alignVideoItem'] :''; // aspect ratio $processedData['aspectRatio'] = $flexconf['aspectRatio']; + $processedData['shift'] = $flexconf['shift']; // prepare needed javascript $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tt_content'); $overlayChild = $queryBuilder @@ -246,7 +247,7 @@ public function getCardWrapper($processedData, $flexconf): array case 6: $processedData['flipper']['class'] = 'col-xs-12 col-sm-6 col-md-2'; break; - default: + default: $processedData['flipper']['class'] = 'col-xs-12 col-sm-6 col-md-4'; } } @@ -407,6 +408,7 @@ public function getCollapsible($processedData, $flexconf, $parentflexconf): arra $processedData['show'] = $flexconf['active'] ? ' show' : ''; $processedData['collapsed'] = $flexconf['active'] ? '' : ' collapsed'; $processedData['expanded'] = $flexconf['active'] ? 'true' : 'false'; + $processedData['alwaysOpen'] = $parentflexconf['alwaysOpen'] ? 'true' : 'false'; $processedData['buttonstyle'] = $flexconf['style'] ? $flexconf['style'] : 'primary'; $processedData['collapsibleByPid'] = $flexconf['collapsibleByPid'] ?: ''; $processedData['media'] = $file ? $file : ''; diff --git a/Classes/ViewHelpers/DummyImageViewHelper.php b/Classes/ViewHelpers/DummyImageViewHelper.php new file mode 100644 index 00000000..7a64e9cc --- /dev/null +++ b/Classes/ViewHelpers/DummyImageViewHelper.php @@ -0,0 +1,48 @@ +registerArgument('uid', 'string', 'Uid of tt_content with custom dummy image for EXT:news', false); + } + + /** + * @param array $arguments + * @param \Closure $renderChildrenClosure + * @param RenderingContextInterface $renderingContext + */ + public static function renderStatic( + array $arguments, + \Closure $renderChildrenClosure, + RenderingContextInterface $renderingContext + ) { + + $fileRepository = GeneralUtility::makeInstance(FileRepository::class); + $fileObjects = $fileRepository->findByRelation('tt_content', 'image', (int)$arguments['uid']); + if (empty($fileObjects)) { + $fileObjects = $fileRepository->findByRelation('tt_content', 'assets', (int)$arguments['uid']); + } + + return $fileObjects[0]; + } + +} diff --git a/Classes/ViewHelpers/GifbuilderViewHelper.php b/Classes/ViewHelpers/GifbuilderViewHelper.php index 590e6c49..27d503aa 100644 --- a/Classes/ViewHelpers/GifbuilderViewHelper.php +++ b/Classes/ViewHelpers/GifbuilderViewHelper.php @@ -127,8 +127,4 @@ private function generateSrcsetImages( $file, $image ) { return $bgImages; } - - - - } diff --git a/Classes/ViewHelpers/MediaViewHelper.php b/Classes/ViewHelpers/MediaViewHelper.php index c3c18a27..0c642cc1 100644 --- a/Classes/ViewHelpers/MediaViewHelper.php +++ b/Classes/ViewHelpers/MediaViewHelper.php @@ -52,6 +52,7 @@ public function initializeArguments() $this->registerArgument('picturefill', 'bool', 'Use rendering suggested by picturefill.js', false, true); $this->registerArgument('lazyload', 'int', 'Generate markup that supports lazyloading', false, 0); $this->registerArgument('ratio', 'string', 'Image ratio', false, ''); + $this->registerArgument('mobileNoRatio', 'bool', 'no aspect ratio for mobile', false, ''); $this->registerArgument('shift', 'string', 'Image shift', false, ''); $this->registerArgument('columns', 'int', 'Columns for Image Gallery', false, 0); $this->registerArgument('placeholderSize', 'int', 'Size of the placeholder image for lazyloading (0 = disabled)', false, 0); @@ -103,8 +104,16 @@ protected function renderPicture(FileInterface $image, $width, $height) // Get crop variants $cropString = $image instanceof FileReference ? $image->getProperty('crop') : ''; + if ( $this->arguments['mobileNoRatio'] && $this->arguments['ratio'] ) { + $mobileImgManipulation = json_decode($cropString)->mobile; + } if ( $this->arguments['ratio'] ) { - $cropString = self::getCropString($image); + $cropString = self::getCropString($image, $cropString); + if ( $this->arguments['mobileNoRatio'] ) { + $cropObject = json_decode($cropString); + $cropObject->mobile = $mobileImgManipulation; + $cropString = json_encode($cropObject); + } } $cropVariantCollection = CropVariantCollection::create((string) $cropString); @@ -116,7 +125,6 @@ protected function renderPicture(FileInterface $image, $width, $height) // Generate fallback image $fallbackImage = $this->generateFallbackImage($image, $width, $cropArea); - if ( $GLOBALS['_GET']['type'] == '98' ) { $lazyload = 0; } else { @@ -157,7 +165,6 @@ protected function renderPicture(FileInterface $image, $width, $height) $placeholderInline ); - return $this->tag->render(); } @@ -175,8 +182,17 @@ protected function renderImageSrcset(FileInterface $image, $width, $height) // Get crop variants $cropString = $image instanceof FileReference ? $image->getProperty('crop') : ''; + if ( $this->arguments['mobileNoRatio'] && $this->arguments['ratio'] ) { + $mobileImgManipulation = json_decode($cropString)->mobile; + } + if ( $this->arguments['ratio'] ) { - $cropString = self::getCropString($image); + $cropString = self::getCropString($image, $cropString); + if ( $this->arguments['mobileNoRatio'] ) { + $cropObject = json_decode($cropString); + $cropObject->mobile = $mobileImgManipulation; + $cropString = json_encode($cropObject); + } } $cropVariantCollection = CropVariantCollection::create((string) $cropString); @@ -266,8 +282,17 @@ protected function renderImageTag(FileInterface $image, $width, $height) $cropVariant = 'default'; $cropString = $image instanceof FileReference ? $image->getProperty('crop') : ''; + if ( $this->arguments['mobileNoRatio'] && $this->arguments['ratio'] ) { + $mobileImgManipulation = json_decode($cropString)->mobile; + } + if ( $this->arguments['ratio'] ) { - $cropString = self::getCropString($image); + $cropString = self::getCropString($image, $cropString); + if ( $this->arguments['mobileNoRatio'] ) { + $cropObject = json_decode($cropString); + $cropObject->mobile = $mobileImgManipulation; + $cropString = json_encode($cropObject); + } } $cropVariantCollection = CropVariantCollection::create((string)$cropString); @@ -330,48 +355,43 @@ protected function renderImageTag(FileInterface $image, $width, $height) * * @return string */ - protected function getCropString($image) + protected function getCropString($image, $cropString) { - $rArr = explode(':',$this->arguments['ratio']); - $l = $rArr[0] / $rArr[1]; - $p = $rArr[1] / $rArr[0]; - $w = $image->getProperties()['height']/$image->getProperties()['width'] *$l; - $h = 1; - $x = $this->arguments['shift'] ? $this->arguments['shift'] : (1 - $w) / 2; - $y = 0; - if ( $w > 1 ) { - $h = $image->getProperties()['width']/$image->getProperties()['height'] *$p; - $w = 1; - $x = 0; - $y = $this->arguments['shift'] ? $this->arguments['shift'] : (1 - $h) / 2; + $cropObject = json_decode($cropString); + + foreach($this->arguments['breakpoints'] as $cv) { + $cropVariant = $cv['cropVariant']; + $cropObject->$cropVariant->selectedRatio = $this->arguments['ratio']; + $cropObject->$cropVariant->cropArea->y = $this->arguments['shift'] ? $this->arguments['shift'] : $cropObject->$cropVariant->cropArea->y; + $cropedWidth = $image->getProperties()['width'] * $cropObject->$cropVariant->cropArea->width; + $cropedHeight = $image->getProperties()['height'] * $cropObject->$cropVariant->cropArea->height; + $rArr = explode(':',$this->arguments['ratio']); + + if ( $rArr[0] > $rArr[1] ) { + // landscape + $pxHeight = $cropedWidth / $rArr[0] * $rArr[1]; + $cHeight = $pxHeight / $image->getProperties()['height']; + $cropObject->$cropVariant->cropArea->height = $cHeight; + } elseif ($rArr[0] == $rArr[1]) { + // square + if ( $image->getProperties()['width'] > $image->getProperties()['height'] ) { + $pxWidth = $cropedHeight / $rArr[1] * $rArr[0]; + $cWidth = $pxWidth / $image->getProperties()['width']; + $cropObject->$cropVariant->cropArea->width = $cWidth; + } else { + $pxHeight = $cropedWidth / $rArr[0] * $rArr[1]; + $cHeight = $pxHeight / $image->getProperties()['height']; + $cropObject->$cropVariant->cropArea->height = $cHeight; + } + } else { + // portrait + $pxWidth = $cropedHeight / $rArr[1] * $rArr[0]; + $cWidth = $pxWidth / $image->getProperties()['width']; + $cropObject->$cropVariant->cropArea->width = $cWidth; + } } - $cropArray['default']['cropArea']['x'] = $x; - $cropArray['default']['cropArea']['y'] = $y; - $cropArray['default']['cropArea']['width'] = $w; - $cropArray['default']['cropArea']['height'] = $h; - $cropArray['default']['selectedRatio'] = $this->arguments['ratio']; - $cropArray['default']['focusArea'] = null; - - $cropArray['tablet']['cropArea']['x'] = $x; - $cropArray['tablet']['cropArea']['y'] = $y; - $cropArray['tablet']['cropArea']['width'] = $w; - $cropArray['tablet']['cropArea']['height'] = $h; - $cropArray['tablet']['selectedRatio'] = $this->arguments['ratio']; - $cropArray['tablet']['focusArea'] = null; - - $cropArray['mobile']['cropArea']['x'] = $x; - $cropArray['mobile']['cropArea']['y'] = $y; - $cropArray['mobile']['cropArea']['width'] = $w; - $cropArray['mobile']['cropArea']['height'] = $h; - $cropArray['mobile']['selectedRatio'] = $this->arguments['ratio']; - $cropArray['mobile']['focusArea'] = null; - - $object = (object)$cropArray; - - return json_encode($object); - + return json_encode($cropObject); } - } diff --git a/Configuration/FlexForms/CardSetting.xml b/Configuration/FlexForms/CardSetting.xml index 05e667f9..bacc37ae 100644 --- a/Configuration/FlexForms/CardSetting.xml +++ b/Configuration/FlexForms/CardSetting.xml @@ -55,6 +55,43 @@ + + + + Frontside with image - Backside with text (if "Text Top" available) or image (second image) + reload + + check + + + + + + + + FIELD:flipcard:=:1 + + select + selectSingle + + + 180deg + 180deg + + + 540deg + 540deg + + + 900deg + 900deg + + + 180deg + + + + diff --git a/Configuration/FlexForms/Container/BackgroundWrapper.xml b/Configuration/FlexForms/Container/BackgroundWrapper.xml index df2443d3..ebafd514 100644 --- a/Configuration/FlexForms/Container/BackgroundWrapper.xml +++ b/Configuration/FlexForms/Container/BackgroundWrapper.xml @@ -380,28 +380,42 @@ selectSingle - 21by9 - 21x9 + 48by9 + 9/48 - 16by9 - 16x9 + 37by9 + 9/37 - 4by3 - 4x3 + 21by9 + 9/21 - 1by1 - 1x1 + 16by9 + 9/16 - 16x9 + 9/37 1 + + + + USER:T3SBS\T3sbootstrap\UserFunction\TcaMatcher->isLocalVideo + e.g.: 100 or -100 + + input + 5 + 0 + int + + + + diff --git a/Configuration/FlexForms/Container/CardWrapper.xml b/Configuration/FlexForms/Container/CardWrapper.xml index 21545336..df25b664 100644 --- a/Configuration/FlexForms/Container/CardWrapper.xml +++ b/Configuration/FlexForms/Container/CardWrapper.xml @@ -146,7 +146,7 @@ - + FIELD:sDEF.card_wrapper:=:slider input diff --git a/Configuration/FlexForms/Container/CarouselContainer.xml b/Configuration/FlexForms/Container/CarouselContainer.xml index ae094a1c..7e4237e0 100644 --- a/Configuration/FlexForms/Container/CarouselContainer.xml +++ b/Configuration/FlexForms/Container/CarouselContainer.xml @@ -76,7 +76,7 @@ - + input 4 @@ -87,6 +87,15 @@ + + + + + check + + + + @@ -258,7 +267,6 @@ - diff --git a/Configuration/FlexForms/Container/CollapseContainer.xml b/Configuration/FlexForms/Container/CollapseContainer.xml index d8cab80f..14125587 100644 --- a/Configuration/FlexForms/Container/CollapseContainer.xml +++ b/Configuration/FlexForms/Container/CollapseContainer.xml @@ -60,6 +60,16 @@ + + + + stay open when another item is opened + + check + + + + @@ -84,7 +94,8 @@ - + + to remove default background-color, borders etc. FIELD:sDEF.appearance:=:accordion check diff --git a/Configuration/FlexForms/Container/SwiperContainer.xml b/Configuration/FlexForms/Container/SwiperContainer.xml index c3f6c1a1..73e16714 100644 --- a/Configuration/FlexForms/Container/SwiperContainer.xml +++ b/Configuration/FlexForms/Container/SwiperContainer.xml @@ -102,7 +102,7 @@ - + input 4 @@ -248,7 +248,6 @@ - diff --git a/Configuration/FlexForms/Container/ToastContainer.xml b/Configuration/FlexForms/Container/ToastContainer.xml new file mode 100644 index 00000000..2518a8cd --- /dev/null +++ b/Configuration/FlexForms/Container/ToastContainer.xml @@ -0,0 +1,115 @@ + + + + + array + + General + + + + + + + + check + 1 + + + + + + + + + check + 1 + + + + + + + + + input + 5 + 5000 + int + + + + + + + + + select + selectSingle + + + default + top-0 start-50 translate-middle-x + + + Top left + top-0 start-0 + + + Top center + top-0 start-50 translate-middle-x + + + Top right + top-0 end-0 + + + + Middle left + top-50 start-0 translate-middle-y + + + Middle center + top-50 start-50 translate-middle + + + Middle right + top-50 end-0 translate-middle-y + + + + Bottom left + bottom-0 start-0 + + + Bottom center + bottom-0 start-50 translate-middle-x + + + Bottom right + bottom-0 end-0 + + + + top-0 start-50 translate-middle-x + + + + + + + + + input + 5 + 350 + int + + + + + + + + + \ No newline at end of file diff --git a/Configuration/FlexForms/ToastSetting.xml b/Configuration/FlexForms/ToastSetting.xml index d92404f6..f45912f5 100644 --- a/Configuration/FlexForms/ToastSetting.xml +++ b/Configuration/FlexForms/ToastSetting.xml @@ -49,26 +49,64 @@ default - 0 + top-0 start-50 translate-middle-x - left - left + Top left + top-0 start-0 - right - right + Top center + top-0 start-50 translate-middle-x - center - center + Top right + top-0 end-0 + + + Middle left + top-50 start-0 translate-middle-y + + + Middle center + top-50 start-50 translate-middle + + + Middle right + top-50 end-0 translate-middle-y + + + + Bottom left + bottom-0 start-0 + + + Bottom center + bottom-0 start-50 translate-middle-x + + + Bottom right + bottom-0 end-0 + + - center + top-0 start-50 translate-middle-x + + + + + input + 5 + 350 + int + + + diff --git a/Configuration/TCA/Overrides/tt_content.php b/Configuration/TCA/Overrides/tt_content.php index 322db979..d0c6d39a 100644 --- a/Configuration/TCA/Overrides/tt_content.php +++ b/Configuration/TCA/Overrides/tt_content.php @@ -448,6 +448,25 @@ ); $GLOBALS['TCA']['tt_content']['types']['swiper_container']['showitem'] = $GLOBALS['TCA']['tt_content']['types']['two_columns']['showitem']; +# TOAST CONTAINER +GeneralUtility::makeInstance(Registry::class)->configureContainer( + ( + new ContainerConfiguration( + 'toast_container', + 'Toast Container', + 'A container for several Toast content', + [ + [ + ['name' => 'Toast Container', 'colPos' => 310, 'disallowed' => ['CType' => 't3sbs_toast, toast_container']] + ] + ] + ) + ) + ->setIcon('EXT:t3sbootstrap/Resources/Public/Icons/Register/ge-modal.svg') + ->setSaveAndCloseInNewContentElementWizard(false) +); +$GLOBALS['TCA']['tt_content']['types']['toast_container']['showitem'] = $GLOBALS['TCA']['tt_content']['types']['two_columns']['showitem']; + /*************** * Add new CTypes @@ -776,6 +795,7 @@ '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', + 'toast_container' => 'FILE:EXT:t3sbootstrap/Configuration/FlexForms/Container/ToastContainer.xml', ] ] ], @@ -1438,7 +1458,7 @@ $GLOBALS['TCA']['tt_content']['ctrl']['previewRenderer'] = 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', 'swiper_container']; + 'modal', 'tabs_container', 'tabs_tab', 'listGroup_wrapper', 'masonry_wrapper', 'swiper_container', 'toast_container']; foreach ($containers as $container) { $GLOBALS['TCA']['tt_content']['types'][trim($container)]['previewRenderer'] = T3sbPreviewRenderer::class; } diff --git a/Configuration/TSConfig/SysFileReference.tsconfig b/Configuration/TSConfig/SysFileReference.tsconfig index c9cdd734..477c5cc4 100644 --- a/Configuration/TSConfig/SysFileReference.tsconfig +++ b/Configuration/TSConfig/SysFileReference.tsconfig @@ -8,6 +8,10 @@ TCEFORM.sys_file_reference.crop.config.cropVariants { title = Free value = 0.0 } + 37:9 { + title = 37:9 + value = 4.1111111 + } 21:9 { title = 21:9 value = 2.3333333 @@ -66,6 +70,10 @@ TCEFORM.sys_file_reference.crop.config.cropVariants { title = Free value = 0.0 } + 37:9 { + title = 37:9 + value = 4.1111111 + } 21:9 { title = 21:9 value = 2.3333333 @@ -124,6 +132,10 @@ TCEFORM.sys_file_reference.crop.config.cropVariants { title = Free value = 0.0 } + 37:9 { + title = 37:9 + value = 4.1111111 + } 21:9 { title = 21:9 value = 2.3333333 diff --git a/Configuration/TypoScript/ContentElement/Container.typoscript b/Configuration/TypoScript/ContentElement/Container.typoscript index 08be0a65..7ec6c115 100644 --- a/Configuration/TypoScript/ContentElement/Container.typoscript +++ b/Configuration/TypoScript/ContentElement/Container.typoscript @@ -343,7 +343,7 @@ tt_content { masonry_wrapper < lib.contentElement masonry_wrapper { - templateName = masonryWrapper + templateName = MasonryWrapper templateRootPaths { 0 = EXT:t3sbootstrap/Resources/Private/Templates/Container/ 1 = {$plugin.tx_t3sbootstrap.view.templateRootPath}Container/ @@ -374,5 +374,21 @@ tt_content { } } } - + + toast_container < lib.contentElement + toast_container { + templateName = ToastContainer + templateRootPaths { + 0 = EXT:t3sbootstrap/Resources/Private/Templates/Container/ + 1 = {$plugin.tx_t3sbootstrap.view.templateRootPath}Container/ + } + dataProcessing { + + 310 = B13\Container\DataProcessing\ContainerProcessor + 310 { + colPos = 310 + as = col_310 + } + } + } } diff --git a/Configuration/TypoScript/constants.typoscript b/Configuration/TypoScript/constants.typoscript index bbd4093b..b1fd1f94 100644 --- a/Configuration/TypoScript/constants.typoscript +++ b/Configuration/TypoScript/constants.typoscript @@ -129,7 +129,7 @@ bootstrap.ext { # cat=bootstrap-extensions/b-ext/10; type=boolean; label=Info (list view): shows the info (date, categories) in list view. news.list.info = 0 # cat=bootstrap-extensions/b-ext/11; type=small; label=Image ratio (list view): e.g.: 16:9 or 4:3 - disabled if empty. - news.list.imageRatio = + news.list.imageRatio = 0 # cat=bootstrap-extensions/b-ext/12; type=options[primary=primary, secondary=secondary, success=success, danger=danger, warning=warning, info=info, light=light, dark=dark]; label=More button (list view): Utility class for the more button in list view. news.list.buttonClass = primary # cat=bootstrap-extensions/b-ext/13; type=boolean; label=Image mobile overlay (list view): if < 576px for Card-Templates only. @@ -139,7 +139,7 @@ bootstrap.ext { # cat=bootstrap-extensions/b-ext/20; type=boolean; label=Info (detail view): shows the info (date, categories, tags, author) in detail view. news.detail.info = 1 # cat=bootstrap-extensions/b-ext/21; type=small; label=Image ratio (detail view): e.g.: 16:9 or 4:3 - disabled if empty. - news.detail.imageRatio = + news.detail.imageRatio = 0 # cat=bootstrap-extensions/b-ext/22; type=boolean; label=Lightbox (detail view): enable the lightbox in detail view. news.detail.enableLightbox = 1 # cat=bootstrap-extensions/b-ext/23; type=options[primary=primary, secondary=secondary, success=success, danger=danger, warning=warning, info=info, light=light, dark=dark]; label=Back button (detail view): utility class for the back button in detail view. @@ -150,8 +150,10 @@ bootstrap.ext { news.detail.carousel = 1 # cat=bootstrap-extensions/b-ext/26; type=options[6=6, 7=7, 8=8, 9=9]; label=Left column width (detail view): news.detail.leftGrid = 7 - # cat=bootstrap-extensions/b-ext/27; type=boolean; label=Media on top (detail view): shows images or carousel on top if enabled. + # cat=bootstrap-extensions/b-ext/27; type=small; label=Media on top (detail view): shows images or carousel on top if enabled. news.detail.mediaOnTop = 0 + # cat=bootstrap-extensions/b-ext/28; type=int+; label=UID of content element with custom dummy image (assets or image). + news.list.dummyImageUid = 0 } diff --git a/Resources/Private/Extensions/news/Configuration/TypoScript/setup.typoscript b/Resources/Private/Extensions/news/Configuration/TypoScript/setup.typoscript index 5802d15c..e2a1aaed 100644 --- a/Resources/Private/Extensions/news/Configuration/TypoScript/setup.typoscript +++ b/Resources/Private/Extensions/news/Configuration/TypoScript/setup.typoscript @@ -68,9 +68,11 @@ plugin.tx_news { magnifying = {$bootstrap.config.magnifying} imgCopyright = {$bootstrap.extconf.imgCopyright} jqueryDisable = {$bootstrap.disable.jquery} + dummyImageUid = {$bootstrap.ext.news.list.dummyImageUid} } _LOCAL_LANG.de.more-link = mehr _LOCAL_LANG.de.back-link = zurück _LOCAL_LANG.de.dateFormat = {$bootstrap.config.dateFormat} + _LOCAL_LANG.de.search-text = Es liegen %1$s Ergebnisse für "%2$s" vor. } diff --git a/Resources/Private/Extensions/news/Resources/Private/Partials/Detail/Custom1.html b/Resources/Private/Extensions/news/Resources/Private/Partials/Detail/Custom1.html index 1dada911..e1634840 100644 --- a/Resources/Private/Extensions/news/Resources/Private/Partials/Detail/Custom1.html +++ b/Resources/Private/Extensions/news/Resources/Private/Partials/Detail/Custom1.html @@ -1,5 +1,5 @@