From ff3c8c7a1113e565da35ceea92a84eb03a7e9ba5 Mon Sep 17 00:00:00 2001 From: Helmut Hackbarth Date: Sun, 25 Sep 2022 12:16:41 +0200 Subject: [PATCH] New release v5.2.4 --- .../Backend/Preview/T3sbPreviewRenderer.php | 2 +- Classes/Components/Carousel.php | 7 +- Classes/Controller/ConsentController.php | 1 + Classes/DataProcessing/BootstrapProcessor.php | 1 - Classes/DataProcessing/ConfigProcessor.php | 9 +- Classes/ViewHelpers/MediaViewHelper.php | 90 ++++++++++--------- Classes/Wrapper/CarouselContainer.php | 7 +- Configuration/TCA/Overrides/tt_content.php | 2 +- .../TypoScript/Lib/ContentElement.typoscript | 2 +- .../TypoScript/Page/Template.typoscript | 6 ++ Contrib/scssphp/bin/pscss | 6 +- Contrib/scssphp/composer.json | 37 ++++++++ Contrib/scssphp/src/Compiler.php | 40 ++++++++- Contrib/scssphp/src/Node/Number.php | 3 + Contrib/scssphp/src/Version.php | 2 +- .../Private/Partials/FunctionAssets.html | 28 ++++-- .../Private/Partials/Page/Navbar/Assets.html | 1 - Resources/Private/Templates/Main.html | 52 ++++------- composer.json | 8 +- ext_emconf.php | 7 +- ext_tables.php | 2 +- 21 files changed, 198 insertions(+), 115 deletions(-) diff --git a/Classes/Backend/Preview/T3sbPreviewRenderer.php b/Classes/Backend/Preview/T3sbPreviewRenderer.php index a5be1ce8..e69dfab3 100644 --- a/Classes/Backend/Preview/T3sbPreviewRenderer.php +++ b/Classes/Backend/Preview/T3sbPreviewRenderer.php @@ -238,7 +238,7 @@ public function renderPageModulePreviewContent(GridColumnItem $item): string $out .= '
- Delay between transitions (in ms): '.$flexconf['delay']; } } - if ($record['CType'] == 'card_wrapper') { + if (!empty($flexconf['card_wrapper']) && $record['CType'] == 'card_wrapper') { $out .= '
- Wrapper: Card '.$flexconf['card_wrapper']; if ( !empty($flexconf['visibleCards']) ) { $out .= '
- Visible Cards: '.$flexconf['visibleCards']; diff --git a/Classes/Components/Carousel.php b/Classes/Components/Carousel.php index 1fa3f12b..fc3da1ed 100644 --- a/Classes/Components/Carousel.php +++ b/Classes/Components/Carousel.php @@ -80,10 +80,11 @@ public function getProcessedData(array $processedData, array $flexconf, array $p $processedData['style'] .= self::getCarouselCaptionStyle( $flexconf, $animate ); $fileRepository = GeneralUtility::makeInstance(FileRepository::class); - $file = $fileRepository->findByRelation('tt_content', 'assets', (int)$processedData['data']['uid'])[0]; - + if (!empty($fileRepository->findByRelation('tt_content', 'assets', (int)$processedData['data']['uid']))) { + $file = $fileRepository->findByRelation('tt_content', 'assets', (int)$processedData['data']['uid'])[0]; + } $processedData['localVideoPath'] = ''; - if ($file) { + if (!empty($file)) { if ($file->getMimeType() == 'video/mp4' || $file->getMimeType() == 'video/webm' || $file->getMimeType() == 'video/wav' || $file->getMimeType() == 'video/ogg' || $file->getMimeType() == 'video/flac' || $file->getMimeType() == 'video/opus') { $processedData['localVideoPath'] = '/'.$file->getStorage()->getConfiguration()['basePath'].substr($file->getIdentifier(), 1); diff --git a/Classes/Controller/ConsentController.php b/Classes/Controller/ConsentController.php index 6ce6d171..2689f456 100644 --- a/Classes/Controller/ConsentController.php +++ b/Classes/Controller/ConsentController.php @@ -27,6 +27,7 @@ public function indexAction(): void $consentRecordUid = (int)$this->settings['consent']['contentByUid']; $fileRepository = GeneralUtility::makeInstance(FileRepository::class); $fileObjects = $fileRepository->findByRelation('tt_content', 'assets', $consentRecordUid); + $assignedValues = []; if ( !empty($fileObjects) ) { if ( $fileObjects[0]->getProperties()['mime_type'] == 'video/youtube') { diff --git a/Classes/DataProcessing/BootstrapProcessor.php b/Classes/DataProcessing/BootstrapProcessor.php index fcc5f58c..20fdc2ae 100644 --- a/Classes/DataProcessing/BootstrapProcessor.php +++ b/Classes/DataProcessing/BootstrapProcessor.php @@ -66,7 +66,6 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('t3sbootstrap'); $cType = $processedData['data']['CType']; $parentCType = ''; - $flexFormService = GeneralUtility::makeInstance(FlexFormService::class); $flexconf = $flexFormService->convertFlexFormContentToArray($processedData['data']['tx_t3sbootstrap_flexform']); $parentflexconf = []; diff --git a/Classes/DataProcessing/ConfigProcessor.php b/Classes/DataProcessing/ConfigProcessor.php index f3ce632d..7773547b 100644 --- a/Classes/DataProcessing/ConfigProcessor.php +++ b/Classes/DataProcessing/ConfigProcessor.php @@ -47,7 +47,8 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu } $webp = (bool)$settings['webp']; - if ( is_numeric($contentObjectConfiguration['settings.']['config.']['uid']) ) { + if ( !empty($contentObjectConfiguration['settings.']['config.']['uid']) + && is_numeric($contentObjectConfiguration['settings.']['config.']['uid']) ) { $processedRecordVariables = $contentObjectConfiguration['settings.']['config.']; } else { $processedData['noConfig'] = TRUE; @@ -164,8 +165,8 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu * Navbar */ if ( $processedRecordVariables['navbarEnable'] ) { - // navbar menu + $mainMenu = []; foreach ($processedData['navbarMenu'] as $key=>$navbarMenu) { $mainMenu[$key] = $navbarMenu; if (!empty($navbarMenu['data']['tx_t3sbootstrap_fontawesome_icon'])) { @@ -292,7 +293,7 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu } else { $navbarColor = $processedRecordVariables['navbarColor']; } - $navBarAttr .= ' data-colorschemes="'.'bg-'.$navbarColor.'"'; + $navBarAttr .= ' data-colorschemes="'.$navbarColor.'"'; $navBarAttr .= ' data-color="navbar-'.$processedRecordVariables['navbarEnable'].'"'; } @@ -405,8 +406,6 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu # Image from pages media $hasBgImages = 0; $fileRepository = GeneralUtility::makeInstance(FileRepository::class); - - $fileObjects = []; $processedData['config']['jumbotron']['alignItem'] = 'd-flex align-items-'.$processedRecordVariables['jumbotronAlignitem']; $processedData['config']['jumbotron']['alignment'] = $processedRecordVariables['jumbotronAlignitem']; diff --git a/Classes/ViewHelpers/MediaViewHelper.php b/Classes/ViewHelpers/MediaViewHelper.php index ab72e48d..f0b5551b 100644 --- a/Classes/ViewHelpers/MediaViewHelper.php +++ b/Classes/ViewHelpers/MediaViewHelper.php @@ -301,52 +301,54 @@ protected function renderImageTag(FileInterface $image, $width, $height, $fileEx protected function getCropString($image, $cropString) { $cropObject = json_decode($cropString); - foreach($this->arguments['breakpoints'] as $cv) { - $cropVariant = $cv['cropVariant']; - $cropObject->$cropVariant->selectedRatio = $this->arguments['ratio']; - $cropedWidth = $image->getProperties()['width'] * $cropObject->$cropVariant->cropArea->width; - $cropedHeight = $image->getProperties()['height'] * $cropObject->$cropVariant->cropArea->height; - $rArr = explode(':',$this->arguments['ratio']); - if ( $this->arguments['shift'] ) { - $shift = $this->arguments['shift'] > 0 ? $cropObject->$cropVariant->cropArea->y + $this->arguments['shift'] - : $cropObject->$cropVariant->cropArea->y - ($this->arguments['shift'] * -1); - $cropObject->$cropVariant->cropArea->y = $shift; - } - if ( $rArr[0] > $rArr[1] ) { - // landscape - $pxHeight = ($cropedWidth / $rArr[0]) * $rArr[1]; - if ( $image->getProperties()['height'] > $pxHeight ) { - $cHeight = $pxHeight / $image->getProperties()['height']; - $cropObject->$cropVariant->cropArea->height = $cHeight; - } else { - $cHeight = $image->getProperties()['height'] / $pxHeight; - - $pxWidth = $cropedHeight / $rArr[1] * $rArr[0]; - $cWidth = $pxWidth / $image->getProperties()['width']; - $cropObject->$cropVariant->cropArea->width = $cWidth; + if (!empty($this->arguments['breakpoints'])) { + foreach($this->arguments['breakpoints'] as $cv) { + $cropVariant = $cv['cropVariant']; + $cropObject->$cropVariant->selectedRatio = $this->arguments['ratio']; + $cropedWidth = $image->getProperties()['width'] * $cropObject->$cropVariant->cropArea->width; + $cropedHeight = $image->getProperties()['height'] * $cropObject->$cropVariant->cropArea->height; + $rArr = explode(':',$this->arguments['ratio']); + if ( $this->arguments['shift'] ) { + $shift = $this->arguments['shift'] > 0 ? $cropObject->$cropVariant->cropArea->y + $this->arguments['shift'] + : $cropObject->$cropVariant->cropArea->y - ($this->arguments['shift'] * -1); + $cropObject->$cropVariant->cropArea->y = $shift; } - } 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]; - if ( $image->getProperties()['width'] > $pxWidth ) { - $cWidth = $pxWidth / $image->getProperties()['width']; - $cropObject->$cropVariant->cropArea->width = $cWidth; + if ( $rArr[0] > $rArr[1] ) { + // landscape + $pxHeight = ($cropedWidth / $rArr[0]) * $rArr[1]; + if ( $image->getProperties()['height'] > $pxHeight ) { + $cHeight = $pxHeight / $image->getProperties()['height']; + $cropObject->$cropVariant->cropArea->height = $cHeight; + } else { + $cHeight = $image->getProperties()['height'] / $pxHeight; + + $pxWidth = $cropedHeight / $rArr[1] * $rArr[0]; + $cWidth = $pxWidth / $image->getProperties()['width']; + $cropObject->$cropVariant->cropArea->width = $cWidth; + } + } 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 { - $cWidth = $image->getProperties()['width'] / $pxWidth; - $pxHeight = $cropedWidth / $rArr[1] * $rArr[0]; - $cHeight = $pxHeight / $image->getProperties()['height']; - $cropObject->$cropVariant->cropArea->height = $cHeight; + // portrait + $pxWidth = $cropedHeight / $rArr[1] * $rArr[0]; + if ( $image->getProperties()['width'] > $pxWidth ) { + $cWidth = $pxWidth / $image->getProperties()['width']; + $cropObject->$cropVariant->cropArea->width = $cWidth; + } else { + $cWidth = $image->getProperties()['width'] / $pxWidth; + $pxHeight = $cropedWidth / $rArr[1] * $rArr[0]; + $cHeight = $pxHeight / $image->getProperties()['height']; + $cropObject->$cropVariant->cropArea->height = $cHeight; + } } } } diff --git a/Classes/Wrapper/CarouselContainer.php b/Classes/Wrapper/CarouselContainer.php index 34f502a8..e15cbe0e 100644 --- a/Classes/Wrapper/CarouselContainer.php +++ b/Classes/Wrapper/CarouselContainer.php @@ -42,6 +42,7 @@ public function getProcessedData(array $processedData, array $flexconf): array ->fetchAll(); $fileRepository = GeneralUtility::makeInstance(FileRepository::class); + $carouselSlides = []; foreach($statement as $element) { $file = $fileRepository->findByRelation('tt_content', 'assets', $element['uid']); if ( !empty($file) ) { @@ -50,7 +51,11 @@ public function getProcessedData(array $processedData, array $flexconf): array $processedData['containsVideo'] = TRUE; } } - $carouselSlides[$element['uid']] = $file[0]; + if (!empty($file[0])) { + $carouselSlides[$element['uid']] = $file[0]; + } else { + $carouselSlides[$element['uid']] = ''; + } } $processedData['carouselSlides'] = !empty($carouselSlides) ? $carouselSlides : ''; diff --git a/Configuration/TCA/Overrides/tt_content.php b/Configuration/TCA/Overrides/tt_content.php index f50d778b..8bf610d8 100644 --- a/Configuration/TCA/Overrides/tt_content.php +++ b/Configuration/TCA/Overrides/tt_content.php @@ -65,7 +65,7 @@ ( new \B13\Container\Tca\ContainerConfiguration( 'three_columns', - '3 cols', + 'LLL:EXT:t3sbootstrap/Resources/Private/Language/locallang_be.xlf:tx_container.threeColumns.title', 'description', [ [ diff --git a/Configuration/TypoScript/Lib/ContentElement.typoscript b/Configuration/TypoScript/Lib/ContentElement.typoscript index d2348796..603d8858 100644 --- a/Configuration/TypoScript/Lib/ContentElement.typoscript +++ b/Configuration/TypoScript/Lib/ContentElement.typoscript @@ -108,7 +108,7 @@ lib.contentElement { lg = {$bootstrap.navbar.breakpoint.lg} xl = {$bootstrap.navbar.breakpoint.xl} xxl = {$bootstrap.navbar.breakpoint.xxl} - } + } } variables { be_layout = TEXT diff --git a/Configuration/TypoScript/Page/Template.typoscript b/Configuration/TypoScript/Page/Template.typoscript index fd38ca04..e6cf718f 100644 --- a/Configuration/TypoScript/Page/Template.typoscript +++ b/Configuration/TypoScript/Page/Template.typoscript @@ -80,6 +80,12 @@ page { mobileOrder = {$bootstrap.pages.override.mobileOrder} tx_t3sbootstrap_titlecolor = {$bootstrap.pages.override.titlecolor} tx_t3sbootstrap_subtitlecolor = {$bootstrap.pages.override.subtitlecolor} + tx_t3sbootstrap_smallColumns = {$bootstrap.pages.override.smallColumns} + tx_t3sbootstrap_breakpoint = {$bootstrap.pages.override.breakpoint} + tx_t3sbootstrap_dropdownRight = {$bootstrap.pages.override.dropdownRight} + tx_t3sbootstrap_container = {$bootstrap.pages.override.container} + tx_t3sbootstrap_linkToTop = {$bootstrap.pages.override.linkToTop} + tx_t3sbootstrap_mobileOrder = {$bootstrap.pages.override.mobileOrder} } } config { diff --git a/Contrib/scssphp/bin/pscss b/Contrib/scssphp/bin/pscss index 18c136ac..e6223983 100644 --- a/Contrib/scssphp/bin/pscss +++ b/Contrib/scssphp/bin/pscss @@ -26,7 +26,7 @@ use ScssPhp\ScssPhp\Parser; use ScssPhp\ScssPhp\Version; $style = null; -$loadPaths = null; +$loadPaths = []; $dumpTree = false; $inputFile = null; $changeDir = false; @@ -148,7 +148,7 @@ EOT; $value = parseArgument($i, array('-I', '--load-path')); if (isset($value)) { - $loadPaths = $value; + $loadPaths[] = $value; continue; } @@ -188,7 +188,7 @@ if ($dumpTree) { $scss = new Compiler(); if ($loadPaths) { - $scss->setImportPaths(explode(PATH_SEPARATOR, $loadPaths)); + $scss->setImportPaths($loadPaths); } if ($style) { diff --git a/Contrib/scssphp/composer.json b/Contrib/scssphp/composer.json index e4895871..affee419 100644 --- a/Contrib/scssphp/composer.json +++ b/Contrib/scssphp/composer.json @@ -40,6 +40,7 @@ "sass/sass-spec": "*", "squizlabs/php_codesniffer": "~3.5", "symfony/phpunit-bridge": "^5.1", + "thoughtbot/bourbon": "^7.0", "twbs/bootstrap": "~5.0", "twbs/bootstrap4": "4.6.0", "zurb/foundation": "~6.5" @@ -63,6 +64,42 @@ } } }, + { + "type": "package", + "package": { + "name": "thoughtbot/bourbon", + "version": "v7.0.0", + "source": { + "type": "git", + "url": "https://github.com/thoughtbot/bourbon.git", + "reference": "fbe338ee6807e7f7aa996d82c8a16f248bb149b3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thoughtbot/bourbon/zipball/fbe338ee6807e7f7aa996d82c8a16f248bb149b3", + "reference": "fbe338ee6807e7f7aa996d82c8a16f248bb149b3", + "shasum": "" + } + } + }, + { + "type": "package", + "package": { + "name": "thoughtbot/bourbon", + "version": "v7.0.0", + "source": { + "type": "git", + "url": "https://github.com/thoughtbot/bourbon.git", + "reference": "fbe338ee6807e7f7aa996d82c8a16f248bb149b3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thoughtbot/bourbon/zipball/fbe338ee6807e7f7aa996d82c8a16f248bb149b3", + "reference": "fbe338ee6807e7f7aa996d82c8a16f248bb149b3", + "shasum": "" + } + } + }, { "type": "package", "package": { diff --git a/Contrib/scssphp/src/Compiler.php b/Contrib/scssphp/src/Compiler.php index 76e17f1b..9be47b7b 100644 --- a/Contrib/scssphp/src/Compiler.php +++ b/Contrib/scssphp/src/Compiler.php @@ -3836,10 +3836,46 @@ protected function getFunctionReference($name, $safeCopy = false) return [Type::T_FUNCTION_REFERENCE, 'user', $name, $f, $prototype]; } + $lowercasedName = strtolower($normalizedName); + + // Special functions overriding a CSS function are case-insensitive. We normalize them as lowercase + // to avoid the deprecation warning about the wrong case being used. + if ($lowercasedName === 'min' || $lowercasedName === 'max') { + $normalizedName = $lowercasedName; + } + if (($f = $this->getBuiltinFunction($normalizedName)) && \is_callable($f)) { $libName = $f[1]; $prototype = isset(static::$$libName) ? static::$$libName : null; + + // All core functions have a prototype defined. Not finding the + // prototype can mean 2 things: + // - the function comes from a child class (deprecated just after) + // - the function was found with a different case, which relates to calling the + // wrong Sass function due to our camelCase usage (`fade-in()` vs `fadein()`), + // because PHP method names are case-insensitive while property names are + // case-sensitive. + if ($prototype === null || strtolower($normalizedName) !== $normalizedName) { + $r = new \ReflectionMethod($this, $libName); + $actualLibName = $r->name; + + if ($actualLibName !== $libName || strtolower($normalizedName) !== $normalizedName) { + $kebabCaseName = preg_replace('~(?<=\\w)([A-Z])~', '-$1', substr($actualLibName, 3)); + assert($kebabCaseName !== null); + $originalName = strtolower($kebabCaseName); + $warning = "Calling built-in functions with a non-standard name is deprecated since Scssphp 1.8.0 and will not work anymore in 2.0 (they will be treated as CSS function calls instead).\nUse \"$originalName\" instead of \"$name\"."; + @trigger_error($warning, E_USER_DEPRECATED); + $fname = $this->getPrettyPath($this->sourceNames[$this->sourceIndex]); + $line = $this->sourceLine; + Warn::deprecation("$warning\n on line $line of $fname"); + + // Use the actual function definition + $prototype = isset(static::$$actualLibName) ? static::$$actualLibName : null; + $f[1] = $libName = $actualLibName; + } + } + if (\get_class($this) !== __CLASS__ && !isset($this->warnedChildFunctions[$libName])) { $r = new \ReflectionMethod($this, $libName); $declaringClass = $r->getDeclaringClass()->name; @@ -7461,7 +7497,7 @@ public function toHSL($red, $green, $blue) } } - return [Type::T_HSL, fmod($h, 360), $s * 100, $l / 5.1]; + return [Type::T_HSL, fmod($h + 360, 360), $s * 100, $l / 5.1]; } /** @@ -8148,7 +8184,7 @@ protected function libHsl($args, $kwargs, $funcName = 'hsl') } } - $hueValue = $hue->getDimension() % 360; + $hueValue = fmod($hue->getDimension(), 360); while ($hueValue < 0) { $hueValue += 360; diff --git a/Contrib/scssphp/src/Node/Number.php b/Contrib/scssphp/src/Node/Number.php index 78f86bac..95eb9084 100644 --- a/Contrib/scssphp/src/Node/Number.php +++ b/Contrib/scssphp/src/Node/Number.php @@ -149,6 +149,7 @@ public function getDenominatorUnits() /** * {@inheritdoc} */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { if ($offset === -3) { @@ -174,6 +175,7 @@ public function offsetExists($offset) /** * {@inheritdoc} */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { switch ($offset) { @@ -200,6 +202,7 @@ public function offsetGet($offset) /** * {@inheritdoc} */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { throw new \BadMethodCallException('Number is immutable'); diff --git a/Contrib/scssphp/src/Version.php b/Contrib/scssphp/src/Version.php index 4cc0bb68..62c8006a 100644 --- a/Contrib/scssphp/src/Version.php +++ b/Contrib/scssphp/src/Version.php @@ -19,5 +19,5 @@ */ class Version { - const VERSION = '1.7.0'; + const VERSION = '1.8.1'; } diff --git a/Resources/Private/Partials/FunctionAssets.html b/Resources/Private/Partials/FunctionAssets.html index 673774f0..a3e172ba 100644 --- a/Resources/Private/Partials/FunctionAssets.html +++ b/Resources/Private/Partials/FunctionAssets.html @@ -209,16 +209,30 @@ // Shrinking Navbar on scrolling - Navbar/Assets.html function t3sbShrinkingNavbar(navbar, padding) { let navShrinkColorschemes = navbar.getAttribute('data-shrinkcolorschemes'), - navShrinkColor = navbar.getAttribute('data-shrinkcolor'), + navShrinkColor = 'navbar-'+navbar.getAttribute('data-shrinkcolor'), navColorschemes = navbar.getAttribute('data-colorschemes'), - navColor = navbar.getAttribute('data-color'); + navColor = navbar.getAttribute('data-color'), + gradient = navShrinkColorschemes.split(' '); + if (gradient[1]) { + navShrinkColorschemes = gradient[0]; + } window.addEventListener('scroll', function() { - if ( t3sbOffsetTop(navbar) > 100) { - navbar.classList.remove('py-'+padding, navColorschemes, navColor); - navbar.classList.add('navbar-shrink', navShrinkColor, navShrinkColorschemes); + if (navColor == navShrinkColor) { + if ( t3sbOffsetTop(navbar) > 100) { + navbar.classList.remove('py-'+padding, navColorschemes); + navbar.classList.add('navbar-shrink', navShrinkColorschemes); + } else { + navbar.classList.add('py-'+padding, navColorschemes); + navbar.classList.remove('navbar-shrink', navShrinkColorschemes); + } } else { - navbar.classList.remove('navbar-shrink', navShrinkColor, navShrinkColorschemes); - navbar.classList.add('py-'+padding, navColorschemes, navColor); + if ( t3sbOffsetTop(navbar) > 100) { + navbar.classList.remove('py-'+padding, navColorschemes, navColor); + navbar.classList.add('navbar-shrink', navShrinkColor, navShrinkColorschemes); + } else { + navbar.classList.add('py-'+padding, navColorschemes, navColor); + navbar.classList.remove('navbar-shrink', navShrinkColor, navShrinkColorschemes); + } } }); } diff --git a/Resources/Private/Partials/Page/Navbar/Assets.html b/Resources/Private/Partials/Page/Navbar/Assets.html index 106f2708..19a009b8 100644 --- a/Resources/Private/Partials/Page/Navbar/Assets.html +++ b/Resources/Private/Partials/Page/Navbar/Assets.html @@ -101,7 +101,6 @@ // Shrinking Navbar on scrolling - Navbar/Assets.html - let x; t3sbShrinkingNavbar(navbar, {settings.config.shrinkingNavPadding}); diff --git a/Resources/Private/Templates/Main.html b/Resources/Private/Templates/Main.html index 153f880e..ec622cfd 100644 --- a/Resources/Private/Templates/Main.html +++ b/Resources/Private/Templates/Main.html @@ -106,32 +106,15 @@

The main configuration has to be create - + - - // Default - Main.html - var navbarHeight = 0, - navbarBreakpointWidth = 0, - viewportWidth = 0, - onePageLayout = 0, - fixedNavbar = false; - - // Scroll anchor - Main.html - if (window.location.hash) { - t3sbScrollToAnchor({t3sb:intval(number: '{settings.config.sectionmenuAnchorOffset}')}, fixedNavbar, navbarHeight); - } - - - - - - + // Default - Main.html const navbar = document.getElementById('main-navbar'), - navbarHeight = navbar.clientHeight, - navbarBreakpointWidth = document.body.getAttribute('data-navbar-breakpointwidth'), - viewportWidth = parseFloat(getComputedStyle(document.querySelector('html'), null).width.replace("px", "")), - onePageLayout = navbar.classList.contains('sectionMenu'); + navbarHeight = navbar.clientHeight, + navbarBreakpointWidth = document.body.getAttribute('data-navbar-breakpointwidth'), + viewportWidth = parseFloat(getComputedStyle(document.querySelector('html'), null).width.replace("px", "")), + onePageLayout = navbar.classList.contains('sectionMenu'); var fixedNavbar = false; if ( navbar.classList.contains('fixed-top') || navbar.classList.contains('sticky-top') ) { @@ -142,16 +125,16 @@

The main configuration has to be create if (window.location.hash) { t3sbScrollToAnchor({t3sb:intval(number: '{settings.config.sectionmenuAnchorOffset}')}, fixedNavbar, navbarHeight); } - - - - + + + + // Default - Main.html const navbar = false, - navbarHeight = false, - navbarBreakpointWidth = 99999, - viewportWidth = parseFloat(getComputedStyle(document.querySelector('html'), null).width.replace("px", "")), - onePageLayout = 0; + navbarHeight = false, + navbarBreakpointWidth = 99999, + viewportWidth = parseFloat(getComputedStyle(document.querySelector('html'), null).width.replace("px", "")), + onePageLayout = 0; var fixedNavbar = false; @@ -159,9 +142,7 @@

The main configuration has to be create if (window.location.hash) { t3sbScrollToAnchor({t3sb:intval(number: '{settings.config.sectionmenuAnchorOffset}')}, fixedNavbar, navbarHeight); } - - - + Loading spinner @@ -226,7 +207,8 @@

The main configuration has to be create Sticky footer -html { + +html { position:relative; min-height:100% } diff --git a/composer.json b/composer.json index f2fbb1ac..a746879c 100644 --- a/composer.json +++ b/composer.json @@ -16,10 +16,10 @@ "license": "GPL-2.0-or-later", "type": "typo3-cms-extension", "require": { - "php": "^7.4 || ^8.0", - "typo3/cms-core": "^10.4 || ^11", - "b13/container": "^1.6.0", - "ichhabrecht/content-defender": "^3.2.2" + "php": "^7.4 || ^8.0", + "typo3/cms-core": "^10.4.18 || ^11.5", + "b13/container": "^2.0.5", + "ichhabrecht/content-defender": "^3.2.3" }, "autoload": { "psr-4": { diff --git a/ext_emconf.php b/ext_emconf.php index 42c8367d..91fdc469 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -14,7 +14,7 @@ 'title' => 'Bootstrap Components', 'description' => 'Startup extension to use bootstrap 5 classes, components and more out of the box. Example and info: www.t3sbootstrap.de', 'category' => 'templates', - 'version' => '5.2.3', + 'version' => '5.2.4', 'state' => 'stable', 'uploadfolder' => false, 'clearcacheonload' => true, @@ -26,8 +26,8 @@ 'depends' => array ( 'typo3' => '10.4.18-11.9.99', - 'container' => '1.6.0-2.99.99', - 'content_defender' => '3.2.2-3.99.99', + 'container' => '2.0.5-2.99.99', + 'content_defender' => '3.2.3-3.99.99', ), 'conflicts' => array ( @@ -40,4 +40,3 @@ ), ), ); - diff --git a/ext_tables.php b/ext_tables.php index 82124084..f55741ed 100644 --- a/ext_tables.php +++ b/ext_tables.php @@ -13,7 +13,7 @@ ], [ 'access' => 'user,group', - 'icon' => 'EXT:t3sbootstrap/Resources/Public/Images/bootstrap-solid.svg', + 'icon' => 'EXT:t3sbootstrap/Resources/Public/Images/bootstrap-solid.svg', 'labels' => 'LLL:EXT:t3sbootstrap/Resources/Private/Language/locallang_m1.xlf', ] );