From d150ca0fbd432c3afe41fac67941661a81f4bdc8 Mon Sep 17 00:00:00 2001 From: Helmut Hackbarth Date: Fri, 7 Aug 2020 12:17:05 +0200 Subject: [PATCH] v4.5.1 --- Classes/{Tasks => Command}/CdnToLocal.php | 58 ++++++++++++----- .../Scss.php => Command/CustomScss.php} | 65 ++++++++++++++----- Classes/Controller/ConfigController.php | 7 +- Classes/DataProcessing/ConfigProcessor.php | 31 +++++---- Classes/DataProcessing/GalleryProcessor.php | 2 +- .../T3sbConditionFunctionsProvider.php | 64 ++++++++++++++++++ .../T3sbConditionProvider.php | 22 +++++++ Classes/Helper/ClassHelper.php | 3 +- Classes/UserFunction/CookieCondition.php | 45 ------------- Classes/Utility/BackgroundImageUtility.php | 24 +++---- Classes/Utility/ResponsiveImagesUtility.php | 4 +- Configuration/ExpressionLanguage.php | 18 +++++ Configuration/Services.yaml | 20 ++++++ Configuration/TCA/Overrides/tt_content.php | 10 ++- .../TypoScript/Page/IncludeCdn.typoscript | 11 ---- .../TypoScript/Page/IncludeDefault.typoscript | 18 ++--- .../TypoScript/Page/IncludeLocal.typoscript | 11 ---- .../Private/Templates/Content/Button.html | 2 +- .../Gridelements/BackgroundWrapper.html | 11 ++-- .../Templates/Gridelements/Collapsible.html | 2 +- .../Fontawesome/css/fontawesomeLink.css | 3 +- .../Fontawesome/css/fontawesomeMin.css | 9 ++- .../Fontawesome/css/fontawesomeMinLink.css | 9 ++- .../Fontawesome/css/fontawesomeProLink.css | 3 +- .../Public/Contrib/Modernizr/modernizr.js | 13 +++- Resources/Public/Styles/t3sbootstrap.css | 2 +- ext_emconf.php | 2 +- ext_localconf.php | 14 ---- 28 files changed, 307 insertions(+), 176 deletions(-) rename Classes/{Tasks => Command}/CdnToLocal.php (92%) rename Classes/{Tasks/Scss.php => Command/CustomScss.php} (88%) create mode 100644 Classes/ExpressionLanguage/T3sbConditionFunctionsProvider.php create mode 100644 Classes/ExpressionLanguage/T3sbConditionProvider.php delete mode 100644 Classes/UserFunction/CookieCondition.php create mode 100644 Configuration/ExpressionLanguage.php create mode 100644 Configuration/Services.yaml diff --git a/Classes/Tasks/CdnToLocal.php b/Classes/Command/CdnToLocal.php similarity index 92% rename from Classes/Tasks/CdnToLocal.php rename to Classes/Command/CdnToLocal.php index 2445f8ec..17ca2349 100644 --- a/Classes/Tasks/CdnToLocal.php +++ b/Classes/Command/CdnToLocal.php @@ -1,37 +1,60 @@ configurationManager = $configurationManager; } - public function execute() { + /** + * Defines the allowed options for this command + * + * @inheritdoc + */ + protected function configure() + { + $this->setDescription('Write required CSS and JS to fileadmin/Resources/Private/'); + } + + + /** + * Update all records + * + * @inheritdoc + */ + protected function execute(InputInterface $input, OutputInterface $output) + { $this->configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class); $settings = $this->configurationManager->getConfiguration( - \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS, + ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS, 't3sbootstrap', 'm1' ); @@ -282,9 +305,9 @@ public function execute() { } - return TRUE; - } + return 0; + } private function writeCustomFile($customPath, $customFileName, $cdnPath, $extend=false ) { @@ -313,4 +336,5 @@ private function writeCustomFile($customPath, $customFileName, $cdnPath, $extend GeneralUtility::writeFile($customFile, $customContent); } -} + +} \ No newline at end of file diff --git a/Classes/Tasks/Scss.php b/Classes/Command/CustomScss.php similarity index 88% rename from Classes/Tasks/Scss.php rename to Classes/Command/CustomScss.php index 70f90326..14cd05cb 100644 --- a/Classes/Tasks/Scss.php +++ b/Classes/Command/CustomScss.php @@ -1,43 +1,70 @@ configurationManager = $configurationManager; } - public function execute() { + /** + * Defines the allowed options for this command + * + * @inheritdoc + */ + protected function configure() + { + $this->setDescription('T3SB Custom Scss - write a custom scss file'); + } + + + /** + * Update all records + * + * @inheritdoc + */ + protected function execute(InputInterface $input, OutputInterface $output) + { $this->configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class); $settings = $this->configurationManager->getConfiguration( - \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS, + ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS, 't3sbootstrap', 'm1' ); - if ( $settings['customScss'] ) { + $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('t3sbootstrap'); + + if ( $settings['customScss'] && array_key_exists('customScss', $extConf) && $extConf['customScss'] === '1' && ExtensionManagementUtility::isLoaded('ws_scss' ) ) { # Custom $customDir = $settings['customScssPath'] ? $settings['customScssPath'] : 'fileadmin/T3SB/Resources/Public/SCSS/'; @@ -140,17 +167,18 @@ public function execute() { $tempPath = GeneralUtility::getFileAbsFileName($tempDir); self::deleteFilesFromDirectory($tempPath); - return TRUE; + return 0; } else { - return FALSE; + return 1; } } + private function writeCustomFile($customPath, $customFileName, $settings, $name) { $customFile = $customPath.$customFileName; @@ -367,4 +395,5 @@ private function rollYourOwn($boottstrapFileName, $customPath, $settings){ } -} + +} \ No newline at end of file diff --git a/Classes/Controller/ConfigController.php b/Classes/Controller/ConfigController.php index 414de1be..cfaa0459 100644 --- a/Classes/Controller/ConfigController.php +++ b/Classes/Controller/ConfigController.php @@ -18,6 +18,7 @@ use TYPO3\CMS\Core\Database\ConnectionPool; use TYPO3\CMS\Core\Utility\RootlineUtility; use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; +use TYPO3\CMS\Core\Messaging\FlashMessage; use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface; use TYPO3\CMS\Backend\View\BackendTemplateView; @@ -204,7 +205,7 @@ public function newAction() */ public function createAction(\T3SBS\T3sbootstrap\Domain\Model\Config $newConfig) { - $this->addFlashMessage('The new configuration was created.'); + $this->addFlashMessage('The new configuration was created.', '', FlashMessage::OK); if ( self::isSiteroot() ) { $homepageUid = (int)$_GET['id']; @@ -273,7 +274,7 @@ public function editAction(\T3SBS\T3sbootstrap\Domain\Model\Config $config) */ public function updateAction(\T3SBS\T3sbootstrap\Domain\Model\Config $config) { - $this->addFlashMessage('The configuration was updated.'); + $this->addFlashMessage('The configuration was updated.', '', FlashMessage::OK); if ( self::isSiteroot() ) { $homepageUid = (int)$_GET['id']; @@ -299,7 +300,7 @@ public function updateAction(\T3SBS\T3sbootstrap\Domain\Model\Config $config) */ public function deleteAction(\T3SBS\T3sbootstrap\Domain\Model\Config $config) { - $this->addFlashMessage('The object was deleted.'); + $this->addFlashMessage('The object was deleted.', '', FlashMessage::INFO); $this->configRepository->remove($config); parent::redirect('list'); } diff --git a/Classes/DataProcessing/ConfigProcessor.php b/Classes/DataProcessing/ConfigProcessor.php index 753c5746..db524ebf 100644 --- a/Classes/DataProcessing/ConfigProcessor.php +++ b/Classes/DataProcessing/ConfigProcessor.php @@ -524,7 +524,7 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu } if (!$this->processorConfiguration['disableDefaultCss']) { - self::includeRequiredFiles($processedRecordVariables); + self::includeRequiredFiles($processedRecordVariables, $webp); } return $this->processedData; @@ -569,10 +569,11 @@ protected function getBackgroundImageUtility() * Load required css and js files * * @param array $processedRecordVariables + * @param bool $webp * * @return void */ - private function includeRequiredFiles($processedRecordVariables) { + private function includeRequiredFiles($processedRecordVariables, $webp) { $pageRenderer = GeneralUtility::makeInstance(PageRenderer::class); $frontendController = self::getFrontendController(); @@ -704,7 +705,11 @@ private function includeRequiredFiles($processedRecordVariables) { '/fileadmin/T3SB/Resources/Public/JS/t3sbProject.js'); $pageRenderer->addJsFooterFile($projectJS); } - + if ( $webp ) { + $jsModernizr = 'EXT:t3sbootstrap/Resources/Public/Contrib/Modernizr/modernizr.js'; + $jsModernizr = GeneralUtility::makeInstance(FilePathSanitizer::class)->sanitize($jsModernizr); + $pageRenderer->addJsFooterFile($jsModernizr); + } } @@ -724,26 +729,28 @@ private function writeCustomFile($customPath, $customFileName, $customContent ) $customFile = $customPath.$customFileName; if (file_exists($customFile)) { - + $customFileLength = strlen(file_get_contents($customFile)); $contentLength = strlen(trim($customContent)); - + if ($customFileLength != $contentLength) { - - unlink($customFile); - GeneralUtility::writeFile($customFile, trim($customContent)); + + unlink($customFile); + GeneralUtility::writeFile($customFile, trim($customContent)); } - + } else { - + if (!is_dir($customPath)) { mkdir($customPath, 0777, true); } - - GeneralUtility::writeFile($customFile, trim($customContent)); + + GeneralUtility::writeFile($customFile, trim($customContent)); } } } + + } diff --git a/Classes/DataProcessing/GalleryProcessor.php b/Classes/DataProcessing/GalleryProcessor.php index 2958b6a6..c8391b19 100644 --- a/Classes/DataProcessing/GalleryProcessor.php +++ b/Classes/DataProcessing/GalleryProcessor.php @@ -1071,7 +1071,7 @@ protected function getImagePadding() protected function checkMediaWidth($mediaWidth) { - if ( $this->minimumWidth && $mediaWidth < 575 ) { + if ( $this->minimumWidth && $mediaWidth < 575 ) { // set to 575px and therefore 100% wide on mobile (constant: minimumWidth=1) $mediaWidth = 575; } diff --git a/Classes/ExpressionLanguage/T3sbConditionFunctionsProvider.php b/Classes/ExpressionLanguage/T3sbConditionFunctionsProvider.php new file mode 100644 index 00000000..380b041c --- /dev/null +++ b/Classes/ExpressionLanguage/T3sbConditionFunctionsProvider.php @@ -0,0 +1,64 @@ +extconf(), + $this->browser(), + ]; + } + + protected function extconf(): ExpressionFunction + { + return new ExpressionFunction('t3sbootstrap', function ($str) { + // Not implemented + }, function ($arguments, $str) { + + $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('t3sbootstrap'); + + return $extConf[$str]; + + }); + } + + + protected function browser(): ExpressionFunction + { + return new ExpressionFunction('browser', function ($str) { + // Not implemented + }, function ($arguments, $str) { + + $user_agent = GeneralUtility::getIndpEnv('HTTP_USER_AGENT'); + $browser = 'Other'; + + if (strpos($user_agent, 'Opera') || strpos($user_agent, 'OPR/')) $browser = 'Opera'; + elseif (strpos($user_agent, 'Edge')) $browser = 'Edge'; + elseif (strpos($user_agent, 'Chrome')) $browser = 'Chrome'; + elseif (strpos($user_agent, 'Safari')) $browser = 'Safari'; + elseif (strpos($user_agent, 'Firefox')) $browser = 'Firefox'; + elseif (strpos($user_agent, 'MSIE') || strpos($user_agent, 'Trident/7')) $browser = 'Internet Explorer'; + + return $str === $browser; + }); + + } + +} diff --git a/Classes/ExpressionLanguage/T3sbConditionProvider.php b/Classes/ExpressionLanguage/T3sbConditionProvider.php new file mode 100644 index 00000000..0ce6064c --- /dev/null +++ b/Classes/ExpressionLanguage/T3sbConditionProvider.php @@ -0,0 +1,22 @@ +expressionLanguageProviders = [ + T3sbConditionFunctionsProvider::class + ]; + } +} diff --git a/Classes/Helper/ClassHelper.php b/Classes/Helper/ClassHelper.php index 2dd8c5e4..05f302db 100644 --- a/Classes/Helper/ClassHelper.php +++ b/Classes/Helper/ClassHelper.php @@ -14,6 +14,7 @@ * The TYPO3 project - inspiring people to share! */ use TYPO3\CMS\Core\SingletonInterface; +use TYPO3\CMS\Core\Utility\GeneralUtility; class ClassHelper implements SingletonInterface { @@ -237,7 +238,7 @@ public function getHeaderClass($data) foreach ($textColors as $textColor) { if (strpos($data['tx_t3sbootstrap_header_class'], $textColor) !== false) { $header['hClass'] .= $textColor; - $data['tx_t3sbootstrap_header_class'] = trim(str_replace($textColor, '', $data['tx_t3sbootstrap_header_class'])); + $data['tx_t3sbootstrap_header_class'] = trim(str_replace($textColor, '', $data['tx_t3sbootstrap_header_class'])); break; } } diff --git a/Classes/UserFunction/CookieCondition.php b/Classes/UserFunction/CookieCondition.php deleted file mode 100644 index aa08f07b..00000000 --- a/Classes/UserFunction/CookieCondition.php +++ /dev/null @@ -1,45 +0,0 @@ -findByRelation($table, 'media', $uid); } - if ( $webp ) { - $jsModernizr = 'EXT:t3sbootstrap/Resources/Public/Contrib/Modernizr/modernizr.js'; - $jsModernizr = GeneralUtility::makeInstance(FilePathSanitizer::class)->sanitize($jsModernizr); - $this->pageRenderer()->addJsFooterFile($jsModernizr); - } - if ( count($filesFromRepository) > 1 ) { if ( $flexconf['bgimagePosition'] == 1 || $flexconf['bgimagePosition'] == 2 ) { // bg-images in two-columns @@ -92,13 +86,13 @@ public function getBgImage($uid, $table='tt_content', $jumbotron=FALSE, $bgColor if ($jumbotron) { $css = $this->generateCss('s'.$uid, $file, $image, $webp, $flexconf); } elseif ($body) { - $css = $this->generateCss('page-'.$uid, $file, $image, $webp, $flexconf); + $css = $this->generateCss('page-'.$uid, $file, $image, $webp, $flexconf, TRUE); } else { if ( $flexconf['enableAutoheight'] ) { if ( $flexconf['addHeight'] ) { $this->pageRenderer()->addInlineSetting('ADDHEIGHT', $uid, $flexconf['addHeight']); } - $this->pageRenderer()->addInlineSetting('ENABLEHEIGHT', $uid, $flexconf['enableAutoheight']); + $this->pageRenderer()->addInlineSetting('ENABLEHEIGHT', $uid, $flexconf['enableAutoheight']); $css = $this->generateCss('bg-img-'.$uid, $file, $image, $webp, $flexconf); } else { $css = $this->generateCss('s'.$uid, $file, $image, $webp, $flexconf); @@ -137,7 +131,7 @@ public function getBgImage($uid, $table='tt_content', $jumbotron=FALSE, $bgColor * * @return string $css */ - private function generateCss( $uid, $file, $image, $webp, $flexconf=[] ) { + private function generateCss( $uid, $file, $image, $webp, $flexconf=[], $body=FALSE ) { $imageRaster = $flexconf['imageRaster'] ? 'url(/typo3conf/ext/t3sbootstrap/Resources/Public/Images/raster.png), ' : ''; @@ -166,8 +160,16 @@ private function generateCss( $uid, $file, $image, $webp, $flexconf=[] ) { $css .= '@media (max-width: '.$querie.'px) {'; if ($webp) { - $css .= '.no-webp #'.$uid.' {background-image:'.$imageRaster.' url("'.$this->imageService()->getImageUri($processedImage).'");}'; - $css .= '.webp #'.$uid.' {background-image:'.$imageRaster.' url("'.$this->imageService()->getImageUri($processedImage).'.webp");}'; + + if ($body) { + $css .= '#'.$uid.'.no-webp {background-image:'.$imageRaster.' url("'.$this->imageService()->getImageUri($processedImage).'");}'; + $css .= '#'.$uid.'.webp {background-image:'.$imageRaster.' url("'.$this->imageService()->getImageUri($processedImage).'.webp");}'; + } else { + $css .= '.no-webp #'.$uid.' {background-image:'.$imageRaster.' url("'.$this->imageService()->getImageUri($processedImage).'");}'; + $css .= '.webp #'.$uid.' {background-image:'.$imageRaster.' url("'.$this->imageService()->getImageUri($processedImage).'.webp");}'; + } + + } else { $css .= '#'.$uid.' {background-image:'.$imageRaster.' url("'.$this->imageService()->getImageUri($processedImage).'");}'; } diff --git a/Classes/Utility/ResponsiveImagesUtility.php b/Classes/Utility/ResponsiveImagesUtility.php index 9523d7b7..a97e8416 100644 --- a/Classes/Utility/ResponsiveImagesUtility.php +++ b/Classes/Utility/ResponsiveImagesUtility.php @@ -171,7 +171,7 @@ public function createPictureTag( $referenceWidth, $breakpoint['srcset'], $breakpoint['media'], - $breakpoint['sizes'], + $breakpoint['sizes'], $cropArea, $absoluteUri, $lazyload, @@ -352,7 +352,7 @@ public function addMetadataToImageTag( * @param Area $cropArea * @param bool $absoluteUri * @param bool $webpIsLoaded - * @param string $type + * @param string $type * * @return array */ diff --git a/Configuration/ExpressionLanguage.php b/Configuration/ExpressionLanguage.php new file mode 100644 index 00000000..af755e98 --- /dev/null +++ b/Configuration/ExpressionLanguage.php @@ -0,0 +1,18 @@ + [ + T3sbConditionProvider::class + ] +]; diff --git a/Configuration/Services.yaml b/Configuration/Services.yaml new file mode 100644 index 00000000..814fe690 --- /dev/null +++ b/Configuration/Services.yaml @@ -0,0 +1,20 @@ +services: + _defaults: + autowire: true + autoconfigure: true + public: false + + T3SBS\T3sbootstrap\: + resource: '../Classes/*' + + T3SBS\T3sbootstrap\Command\CdnToLocal: + tags: + - name: 'console.command' + command: 't3sbootstrap:cdnToLocal' + schedulable: true + + T3SBS\T3sbootstrap\Command\CustomScss: + tags: + - name: 'console.command' + command: 't3sbootstrap:customScss' + schedulable: true \ No newline at end of file diff --git a/Configuration/TCA/Overrides/tt_content.php b/Configuration/TCA/Overrides/tt_content.php index 61033417..63c57967 100644 --- a/Configuration/TCA/Overrides/tt_content.php +++ b/Configuration/TCA/Overrides/tt_content.php @@ -152,7 +152,15 @@ ['ml-3 (margin-left)', 'ml-3'], ['mr-3 (margin-right)', 'mr-3'], ['mx-3 (margin-left and -right)', 'mx-3'], - ['my-3 (margin-top and -bottom)', 'my-3'] + ['my-3 (margin-top and -bottom)', 'my-3'], + ['text-primary', 'text-primary'], + ['text-secondary', 'text-secondary'], + ['text-danger', 'text-danger'], + ['text-success', 'text-success'], + ['text-warning', 'text-warning'], + ['text-info', 'text-info'], + ['text-black', 'text-black'], + ['text-white', 'text-white'] ], ], ], diff --git a/Configuration/TypoScript/Page/IncludeCdn.typoscript b/Configuration/TypoScript/Page/IncludeCdn.typoscript index c6656859..681c4367 100644 --- a/Configuration/TypoScript/Page/IncludeCdn.typoscript +++ b/Configuration/TypoScript/Page/IncludeCdn.typoscript @@ -66,19 +66,16 @@ page { jqueryCDN = https://code.jquery.com/jquery-{$bootstrap.cdn.jquery}.min.js jqueryCDN.integrity = {$bootstrap.cdn.jqueryIntegrity} - jqueryCDN.type = text/javascript jqueryCDN.external = 1 jqueryCDN.forceOnTop = 1 popperCDN = https://cdnjs.cloudflare.com/ajax/libs/popper.js/{$bootstrap.cdn.popperjs}/umd/popper.min.js popperCDN.integrity = {$bootstrap.cdn.popperjsIntegrity} - popperCDN.type = text/javascript popperCDN.external = 1 bootstrapCDN = https://stackpath.bootstrapcdn.com/bootstrap/{$bootstrap.cdn.bootstrap}/js/bootstrap.min.js bootstrapCDN.integrity = {$bootstrap.cdn.bootstrapJsIntegrity} - bootstrapCDN.type = text/javascript bootstrapCDN.external = 1 } @@ -93,7 +90,6 @@ page { t3sblightboxCDN = https://cdnjs.cloudflare.com/ajax/libs/baguettebox.js/{$bootstrap.cdn.baguetteBox}/baguetteBox.min.js t3sblightboxCDN.integrity = {$bootstrap.cdn.baguetteBoxIntegrity} - t3sblightboxCDN.type = text/javascript t3sblightboxCDN.external = 1 t3sblightboxCDN.if { value = 1 @@ -108,7 +104,6 @@ page { cookieconsentJsCDN = https://cdn.jsdelivr.net/npm/cookieconsent@{$bootstrap.cdn.cookieconsent}/build/cookieconsent.min.js cookieconsentJsCDN.integrity = {$bootstrap.cdn.cookieconsentIntegrity} - cookieconsentJsCDN.type = text/javascript cookieconsentJsCDN.external = 1 cookieconsentJsCDN.if.isTrue = {$bootstrap.extconf.cookieconsent} @@ -120,7 +115,6 @@ page { t3sbjqueryeasingCDN = https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/{$bootstrap.cdn.jqueryEasing}/jquery.easing.min.js t3sbjqueryeasingCDN.integrity = {$bootstrap.cdn.jqueryEasingIntegrity} - t3sbjqueryeasingCDN.type = text/javascript t3sbjqueryeasingCDN.external = 1 t3sbjqueryeasingCDN.forceOnTop = 1 @@ -132,13 +126,11 @@ page { codesnippetCDN = https://cdnjs.cloudflare.com/ajax/libs/highlight.js/{$bootstrap.cdn.highlight}/highlight.min.js codesnippetCDN.integrity = {$bootstrap.cdn.highlightIntegrity} - codesnippetCDN.type = text/javascript codesnippetCDN.external = 1 codesnippetCDN.if.isTrue = {$bootstrap.extconf.codesnippet} heighlightCDN = https://cdnjs.cloudflare.com/ajax/libs/highlight.js/{$bootstrap.cdn.highlight}/languages/php.min.js heighlightCDN.integrity = {$bootstrap.cdn.highlightIntegrity} - heighlightCDN.type = text/javascript heighlightCDN.external = 1 heighlightCDN.if.isTrue = {$bootstrap.extconf.codesnippet} @@ -150,7 +142,6 @@ page { lazyloadCDN = https://cdn.jsdelivr.net/npm/vanilla-lazyload@{$bootstrap.cdn.lazyload}/dist/lazyload.min.js lazyloadCDN.integrity = {$bootstrap.cdn.lazyloadIntegrity} - lazyloadCDN.type = text/javascript lazyloadCDN.external = 1 lazyloadCDN.if.isTrue = {$bootstrap.extconf.lazyLoad} @@ -162,7 +153,6 @@ page { picturefillCDN = https://cdnjs.cloudflare.com/ajax/libs/picturefill/{$bootstrap.cdn.picturefill}/picturefill.min.js picturefillCDN.integrity = {$bootstrap.cdn.picturefillIntegrity} - picturefillCDN.type = text/javascript picturefillCDN.external = 1 picturefillCDN.if.isTrue = {$bootstrap.image.picturefill} @@ -174,7 +164,6 @@ page { viewportcheckerCDN = https://cdnjs.cloudflare.com/ajax/libs/jQuery-viewport-checker/{$bootstrap.cdn.viewportchecker}/jquery.viewportchecker.min.js viewportcheckerCDN.integrity = {$bootstrap.cdn.viewportcheckerIntegrity} - viewportcheckerCDN.type = text/javascript viewportcheckerCDN.external = 1 viewportcheckerCDN.if.isTrue = {$bootstrap.extconf.animateCss} diff --git a/Configuration/TypoScript/Page/IncludeDefault.typoscript b/Configuration/TypoScript/Page/IncludeDefault.typoscript index 29c8d259..1860fcd2 100644 --- a/Configuration/TypoScript/Page/IncludeDefault.typoscript +++ b/Configuration/TypoScript/Page/IncludeDefault.typoscript @@ -57,7 +57,7 @@ new LazyLoad({ if ( imgwidth ) { zoomOverlay.css('max-width', imgwidth); } - if ( imgwidth ) { + if ( imgheight ) { zoomOverlay.css('max-height', imgheight); } } @@ -92,15 +92,21 @@ temp.jsFooterInline > # ########################################################################################################## +# Bugfix for Safari browser if using webp with lazyload +[browser('Safari') && {$bootstrap.extconf.webp} == 1 && {$bootstrap.extconf.lazyLoad} > 0] +page.cssInline { + 124 = TEXT + 124.value = picture img.lazy {opacity:1 !important;} +} +[GLOBAL] + # Ajax Pagination for EXT:news [{$bootstrap.ext.news} == 1 && {$bootstrap.ext.typoscriptRendering} == 1] page.includeJSFooter.ajaxPagination = EXT:t3sbootstrap/Resources/Public/Scripts/AjaxPagination.js -page.includeJSFooter.ajaxPagination.type = text/javascript plugin.tx_news.settings.list.paginate.templatePath = EXT:t3sbootstrap/Resources/Private/Extensions/news/Resources/Private/Templates/ViewHelpers/Widget/Paginate/IndexAjax.html [END] [{$bootstrap.ext.news} == 1 && {$bootstrap.ext.typoscriptRendering} == 1 && {$bootstrap.extconf.lazyLoad} == 1] page.includeJSFooter.ajaxPagination = EXT:t3sbootstrap/Resources/Public/Scripts/AjaxLazyPagination.js -page.includeJSFooter.ajaxPagination.type = text/javascript [END] ########################################################################################################## @@ -171,7 +177,6 @@ page.includeCSS.t3sblightboxCDN.external = 1 page.includeJSFooter.t3sblightboxCDN > page.includeJSFooter.t3sblightboxCDN = https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/{$bootstrap.cdn.ekkoLightbox}/ekko-lightbox.min.js page.includeJSFooter.t3sblightboxCDN.integrity = {$bootstrap.cdn.ekkoLightboxIntegrity} -page.includeJSFooter.t3sblightboxCDN.type = text/javascript page.includeJSFooter.t3sblightboxCDN.external = 1 [END] @@ -186,7 +191,6 @@ page.includeCSS.t3sblightboxCDN.external = 1 page.includeJSFooter.t3sblightboxCDN > page.includeJSFooter.t3sblightboxCDN = https://cdn.jsdelivr.net/npm/lightcase@{$bootstrap.cdn.lightcase}/src/js/lightcase.min.js page.includeJSFooter.t3sblightboxCDN.integrity = {$bootstrap.cdn.lightcaseIntegrity} -page.includeJSFooter.t3sblightboxCDN.type = text/javascript page.includeJSFooter.t3sblightboxCDN.external = 1 [END] @@ -195,7 +199,6 @@ page.includeJSFooter.t3sblightboxCDN.external = 1 page.includeJSFooterlibs.jqueryCDN > page.includeJSLibs { jqueryCDN = https://code.jquery.com/jquery-{$bootstrap.cdn.jquery}.slim.min.js - jqueryCDN.type = text/javascript jqueryCDN.external = 1 jqueryCDN.forceOnTop = 1 } @@ -217,7 +220,6 @@ page.includeCSS.t3sblightbox > page.includeCSS.t3sblightbox = fileadmin/T3SB/Resources/Public/CSS/ekko-lightbox.css page.includeJSFooter.t3sblightbox > page.includeJSFooter.t3sblightbox = fileadmin/T3SB/Resources/Public/JS/ekko-lightbox.min.js -page.includeJSFooter.t3sblightbox.type = text/javascript [END] ########################################################################################################## @@ -229,7 +231,6 @@ page.includeCSS.t3sblightbox > page.includeCSS.t3sblightbox = fileadmin/T3SB/Resources/Public/CSS/lightcase.css page.includeJSFooter.t3sblightbox > page.includeJSFooter.t3sblightbox = fileadmin/T3SB/Resources/Public/JS/lightcase.min.js -page.includeJSFooter.t3sblightbox.type = text/javascript [END] # load jquery into the header @@ -237,7 +238,6 @@ page.includeJSFooter.t3sblightbox.type = text/javascript page.includeJSFooterlibs.jquery > page.includeJSLibs { jquery = fileadmin/T3SB/Resources/Public/JS/jquery.min.js - jquery.type = text/javascript jquery.forceOnTop = 1 } [END] diff --git a/Configuration/TypoScript/Page/IncludeLocal.typoscript b/Configuration/TypoScript/Page/IncludeLocal.typoscript index 0538e12e..e6bf8e22 100644 --- a/Configuration/TypoScript/Page/IncludeLocal.typoscript +++ b/Configuration/TypoScript/Page/IncludeLocal.typoscript @@ -55,14 +55,11 @@ page { ########################################################################################################## jquery = fileadmin/T3SB/Resources/Public/JS/jquery.min.js - jquery.type = text/javascript jquery.forceOnTop = 1 popper = fileadmin/T3SB/Resources/Public/JS/popper.js - popper.type = text/javascript bootstrap = fileadmin/T3SB/Resources/Public/JS/bootstrap.min.js - bootstrap.type = text/javascript } @@ -75,7 +72,6 @@ page { ########################################################################################################## t3sblightbox = fileadmin/T3SB/Resources/Public/JS/baguetteBox.min.js - t3sblightbox.type = text/javascript t3sblightbox.if { value = 1 equals = {$bootstrap.config.lightboxSelection} @@ -88,7 +84,6 @@ page { ########################################################################################################## cookieconsentJs = fileadmin/T3SB/Resources/Public/JS/cookieconsent.min.js - cookieconsentJs.type = text/javascript cookieconsentJs.if.isTrue = {$bootstrap.extconf.cookieconsent} ########################################################################################################## @@ -98,7 +93,6 @@ page { ########################################################################################################## t3sbjqueryeasing = fileadmin/T3SB/Resources/Public/JS/jquery.easing.min.js - t3sbjqueryeasing.type = text/javascript t3sbjqueryeasing.forceOnTop = 1 ########################################################################################################## @@ -108,11 +102,9 @@ page { ########################################################################################################## codesnippet = fileadmin/T3SB/Resources/Public/JS/highlight.min.js - codesnippet.type = text/javascript codesnippet.if.isTrue = {$bootstrap.extconf.codesnippet} heighlight = fileadmin/T3SB/Resources/Public/JS/highlight.php.min.js - heighlight.type = text/javascript heighlight.if.isTrue = {$bootstrap.extconf.codesnippet} ########################################################################################################## @@ -122,7 +114,6 @@ page { ########################################################################################################## lazyload = fileadmin/T3SB/Resources/Public/JS/lazyload.min.js - lazyload.type = text/javascript lazyload.if.isTrue = {$bootstrap.extconf.lazyLoad} ########################################################################################################## @@ -133,7 +124,6 @@ page { # Local picturefill = fileadmin/T3SB/Resources/Public/JS/picturefill.min.js - picturefill.type = text/javascript picturefill.if.isTrue = {$bootstrap.image.picturefill} ########################################################################################################## @@ -143,7 +133,6 @@ page { ########################################################################################################## viewportchecker = fileadmin/T3SB/Resources/Public/JS/jquery.viewportchecker.min.js - viewportchecker.type = text/javascript viewportchecker.if.isTrue = {$bootstrap.extconf.animateCss} } diff --git a/Resources/Private/Templates/Content/Button.html b/Resources/Private/Templates/Content/Button.html index 1dd99e34..3865cbb0 100644 --- a/Resources/Private/Templates/Content/Button.html +++ b/Resources/Private/Templates/Content/Button.html @@ -18,7 +18,7 @@ + additionalAttributes="{role: 'button'}"> {f:if(condition: '{data.tx_t3sbootstrap_header_fontawesome}', then: ' ')} {data.header -> f:format.raw()} diff --git a/Resources/Private/Templates/Gridelements/BackgroundWrapper.html b/Resources/Private/Templates/Gridelements/BackgroundWrapper.html index 35e5f92b..8adcf973 100644 --- a/Resources/Private/Templates/Gridelements/BackgroundWrapper.html +++ b/Resources/Private/Templates/Gridelements/BackgroundWrapper.html @@ -33,8 +33,9 @@ BG-Image : overlay and autoheight
background-image by css -
+
@@ -42,9 +43,9 @@ BG-Image : default background-image by css - -
+
diff --git a/Resources/Private/Templates/Gridelements/Collapsible.html b/Resources/Private/Templates/Gridelements/Collapsible.html index 90ccf329..30d5fcf9 100644 --- a/Resources/Private/Templates/Gridelements/Collapsible.html +++ b/Resources/Private/Templates/Gridelements/Collapsible.html @@ -13,7 +13,7 @@
-