Skip to content

Commit 46c8f8c

Browse files
authored
Merge pull request #462 from t3solution/5.3.25
See release notes at https://www.t3sbootstrap.de/log
2 parents e789d6f + a40e471 commit 46c8f8c

18 files changed

Lines changed: 186 additions & 166 deletions

File tree

Classes/Command/CdnToLocal.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ private function getGoogleFonts($googleFonts, $gooleFontsWeights, $baseDir): voi
258258
$sliceArr[$fontFamily] = array_slice($googlePath, 0, 1);
259259
}
260260
$css = '';
261-
$headerData = '';
261+
262262
foreach ($sliceArr as $fontFamily=>$googlePath) {
263263

264264
$gp = explode('.', $googlePath[0]);
@@ -318,7 +318,6 @@ private function getGoogleFontsSitepackage($googleFonts, $gooleFontsWeights, $ba
318318
$sliceArr[$fontFamily] = array_slice($googlePath, 0, 1);
319319
}
320320
$css = '';
321-
$headerData = '';
322321

323322
foreach ($sliceArr as $fontFamily=>$googlePath) {
324323

Classes/Controller/AbstractController.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,11 @@ protected function writeConstants(): void
275275
if ($this->countRootTemplates) {
276276
$configRepository = $this->configRepository->findOneBy(['pid' => $this->rootPageId]);
277277
$navbarBreakpoint = $configRepository->getNavbarBreakpoint();
278-
$breakpointWidth = $navbarBreakpoint === 'no' ? '' : $this->settings['breakpoint'][$navbarBreakpoint];
278+
if (!empty($this->settings['breakpoint'])) {
279+
$breakpointWidth = $navbarBreakpoint === 'no' ? '' : $this->settings['breakpoint'][$navbarBreakpoint];
280+
} else {
281+
$breakpointWidth = 'sm';
282+
}
279283
$siteroots = [];
280284
$filecontent = '';
281285
foreach ($this->configRepository->findAll() as $config) {

Classes/DataProcessing/BootstrapProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ public function process(
272272
}
273273
if ($cType === 'background_wrapper') {
274274
$processedData = GeneralUtility::makeInstance(BackgroundWrapper::class)
275-
->getProcessedData($processedData, $flexconf, $contentObjectConfiguration['settings.']['bgMediaQueries']);
275+
->getProcessedData($processedData, $flexconf, $contentObjectConfiguration['settings.']['bgMediaQueries'], (int) $contentObjectConfiguration['settings.']['sitepackage']);
276276
}
277277
if ($cType === 'parallax_wrapper') {
278278
$processedData = GeneralUtility::makeInstance(ParallaxWrapper::class)

Classes/DataProcessing/GalleryProcessor.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ public function process(
158158
$this->beLayout = $this->processedData['be_layout'];
159159
$this->colPos = (int)$this->processedData['data']['colPos'];
160160
$this->minimumWidth = $this->getConfigurationValue('minimumWidth');
161+
$this->minimumWidthIfEmpty = $this->getConfigurationValue('minimumWidthIfEmpty');
161162
$this->bodytext = $this->processedData['data']['bodytext'];
162163
$this->cType = $this->processedData['data']['CType'];
163164
$this->rowWidth = $this->processedData['data']['tx_t3sbootstrap_inTextImgRowWidth'];
@@ -900,7 +901,8 @@ protected function getGridWidth($bsGridWidth, $suffix): int
900901
*/
901902
protected function checkMediaWidth($mediaWidth): int
902903
{
903-
if ($this->minimumWidth && $mediaWidth < self::minimumWidth) {
904+
#if ($this->minimumWidth && $mediaWidth < self::minimumWidth) {
905+
if ($this->minimumWidth && empty($mediaWidth)) {
904906
// set to 575px and therefore 100% wide on mobile (constant: minimumWidth=1)
905907
$mediaWidth = self::minimumWidth;
906908
}

Classes/Utility/BackgroundImageUtility.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@ public function getBgImage(
4444
int $currentUid=0,
4545
string $bgMediaQueries='2560,1920,1200,992,768,576'
4646
) {
47+
4748
$request = $GLOBALS['TYPO3_REQUEST'];
4849
$frontendController = $request->getAttribute('frontend.controller');
4950
$fileRepository = GeneralUtility::makeInstance(FileRepository::class);
5051
$filesFromRepository = $fileRepository->findByRelation($table, 'assets', $uid);
52+
5153
if (empty($filesFromRepository)) {
5254
$filesFromRepository = $fileRepository->findByRelation($table, 'media', $uid);
5355
}
@@ -143,6 +145,7 @@ private function generateCss(
143145
bool $body=false,
144146
string $bgMediaQueries='2560,1920,1200,992,768,576'
145147
): string {
148+
146149
$imageRaster = !empty($flexconf['imageRaster']) ? 'url("/fileadmin/T3SB/Resources/Public/Images/raster.png"), ' : '';
147150
$processingInstructions = ['crop' => $file instanceof FileReference ? $file->getReferenceProperty('crop') : null];
148151
$cropVariantCollection = CropVariantCollection::create((string) $processingInstructions['crop']);

Classes/ViewHelpers/Backend/InfoViewHelper.php

Lines changed: 84 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -28,107 +28,108 @@ public function initializeArguments(): void
2828

2929
public function render(): string
3030
{
31+
$info = '';
3132
$configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class);
3233
$ts = $configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
33-
$config = $ts['page.']['10.']['settings.']['config.'];
34-
$backendLayout = !empty($this->arguments['backendLayout']) ? $this->arguments['backendLayout'] : '';
35-
$record = !empty($this->arguments['record']) ? $this->arguments['record'] : '';
36-
$info = '';
37-
38-
if ( $record['hidden'] === 0 ) {
34+
if (!empty($ts['page.']['10.']['settings.']['config.'])) {
35+
$config = $ts['page.']['10.']['settings.']['config.'];
36+
$backendLayout = !empty($this->arguments['backendLayout']) ? $this->arguments['backendLayout'] : '';
37+
$record = !empty($this->arguments['record']) ? $this->arguments['record'] : '';
3938

40-
$pageContainer = !empty($this->arguments['pageContainer']) ? $this->arguments['pageContainer'] : '';
41-
$container = !empty($record['tx_t3sbootstrap_container']) ? $record['tx_t3sbootstrap_container'] : '';
42-
$jumbotronContainer = !empty($config['jumbotronContainer']) ? $config['jumbotronContainer'] : '';
43-
$footerContainer = !empty($config['footerContainer']) ? $config['footerContainer'] : '';
44-
$expandedContentTopContainer = !empty($config['expandedcontentContainertop']) ? $config['expandedcontentContainertop'] : '';
45-
$expandedContentBottomContainer = !empty($config['expandedcontentContainerbottom']) ? $config['expandedcontentContainerbottom'] : '';
39+
if ( $record['hidden'] === 0 ) {
40+
41+
$pageContainer = !empty($this->arguments['pageContainer']) ? $this->arguments['pageContainer'] : '';
42+
$container = !empty($record['tx_t3sbootstrap_container']) ? $record['tx_t3sbootstrap_container'] : '';
43+
$jumbotronContainer = !empty($config['jumbotronContainer']) ? $config['jumbotronContainer'] : '';
44+
$footerContainer = !empty($config['footerContainer']) ? $config['footerContainer'] : '';
45+
$expandedContentTopContainer = !empty($config['expandedcontentContainertop']) ? $config['expandedcontentContainertop'] : '';
46+
$expandedContentBottomContainer = !empty($config['expandedcontentContainerbottom']) ? $config['expandedcontentContainerbottom'] : '';
47+
48+
$extraClass = $record['tx_t3sbootstrap_extra_class'];
49+
$frame = $record['frame_class'] === 'default' ? '': $record['frame_class'];
50+
$layout = $record['layout'] === 0 ? '' : $record['layout'];
51+
$colPos = $record['colPos'];
52+
$oneColLayout = $backendLayout === 'OneCol' || $backendLayout === 'OneCol_Extra' ? TRUE : FALSE;
53+
54+
if (!empty($container)) {
4655

47-
$extraClass = $record['tx_t3sbootstrap_extra_class'];
48-
$frame = $record['frame_class'] === 'default' ? '': $record['frame_class'];
49-
$layout = $record['layout'] === 0 ? '' : $record['layout'];
50-
$colPos = $record['colPos'];
51-
$oneColLayout = $backendLayout === 'OneCol' || $backendLayout === 'OneCol_Extra' ? TRUE : FALSE;
52-
53-
if (!empty($container)) {
54-
55-
if ($record['CType'] === 'background_wrapper') {
56-
$info .= '<strong>Container (inside):</strong> '.$container.' ';
57-
} else {
58-
59-
if ($colPos === 0) {
60-
if ($oneColLayout) {
61-
if (!empty($pageContainer)) {
56+
if ($record['CType'] === 'background_wrapper') {
57+
$info .= '<strong>Container (inside):</strong> '.$container.' ';
58+
} else {
59+
60+
if ($colPos === 0) {
61+
if ($oneColLayout) {
62+
if (!empty($pageContainer)) {
63+
$container = '<span class="text-danger">' . $container . '</span>';
64+
}
65+
} else {
66+
$container = '<span class="text-danger">' . $container . '</span>';
67+
}
68+
}
69+
if ($colPos === 3) {
70+
if (!empty($jumbotronContainer) && $jumbotronContainer !== 'none') {
6271
$container = '<span class="text-danger">' . $container . '</span>';
6372
}
64-
} else {
65-
$container = '<span class="text-danger">' . $container . '</span>';
6673
}
67-
}
68-
if ($colPos === 3) {
69-
if (!empty($jumbotronContainer) && $jumbotronContainer !== 'none') {
70-
$container = '<span class="text-danger">' . $container . '</span>';
74+
if ($colPos === 4) {
75+
if (!empty($footerContainer) && $footerContainer !== 'none') {
76+
$container = '<span class="text-danger">' . $container . '</span>';
77+
}
7178
}
72-
}
73-
if ($colPos === 4) {
74-
if (!empty($footerContainer) && $footerContainer !== 'none') {
75-
$container = '<span class="text-danger">' . $container . '</span>';
79+
if ($colPos === 20) {
80+
if (!empty($expandedContentTopContainer)) {
81+
$container = '<span class="text-danger">' . $container . '</span>';
82+
}
7683
}
77-
}
78-
if ($colPos === 20) {
79-
if (!empty($expandedContentTopContainer)) {
80-
$container = '<span class="text-danger">' . $container . '</span>';
84+
if ($colPos === 21) {
85+
if (!empty($expandedContentBottomContainer)) {
86+
$container = '<span class="text-danger">' . $container . '</span>';
87+
}
8188
}
89+
90+
$info .= '<strong>Container:</strong> '.$container.' ';
8291
}
83-
if ($colPos === 21) {
84-
if (!empty($expandedContentBottomContainer)) {
85-
$container = '<span class="text-danger">' . $container . '</span>';
86-
}
87-
}
88-
89-
$info .= '<strong>Container:</strong> '.$container.' ';
90-
}
91-
92-
}
93-
94-
if (!empty($extraClass)) {
95-
if (!empty($info)) {$info .= ' | ';}
96-
$info .= '<strong>Extra Class:</strong> '.$extraClass.' ';
97-
}
98-
if (!empty($layout)) {
99-
if (!empty($info)) {$info .= ' | ';}
100-
$info .= '<strong>Layout:</strong> '.$layout.' ';
101-
}
102-
if (!empty($frame)) {
103-
if (!empty($info)) {$info .= ' | ';}
104-
$info .= '<strong>Frame:</strong> '.$frame.' ';
105-
}
10692

93+
}
10794

108-
if ( $GLOBALS['BE_USER']->isAdmin() ) {
109-
110-
$css = $record['tx_t3sbootstrap_css'];
111-
$js = $record['tx_t3sbootstrap_js'];
112-
113-
if (!empty($css) || !empty($js)) {
114-
95+
if (!empty($extraClass)) {
11596
if (!empty($info)) {$info .= ' | ';}
116-
$info .= '<span class="text-danger">Contains custom ';
97+
$info .= '<strong>Extra Class:</strong> '.$extraClass.' ';
98+
}
99+
if (!empty($layout)) {
100+
if (!empty($info)) {$info .= ' | ';}
101+
$info .= '<strong>Layout:</strong> '.$layout.' ';
102+
}
103+
if (!empty($frame)) {
104+
if (!empty($info)) {$info .= ' | ';}
105+
$info .= '<strong>Frame:</strong> '.$frame.' ';
106+
}
107+
108+
109+
if ( $GLOBALS['BE_USER']->isAdmin() ) {
117110

118-
if (!empty($css) && !empty($js)) {
119-
$info .= 'CSS & JS';
120-
}
121-
if (!empty($css)) {
122-
$info .= 'CSS';
123-
}
124-
if (!empty($js)) {
125-
$info .= 'JS';
111+
$css = $record['tx_t3sbootstrap_css'];
112+
$js = $record['tx_t3sbootstrap_js'];
113+
114+
if (!empty($css) || !empty($js)) {
115+
116+
if (!empty($info)) {$info .= ' | ';}
117+
$info .= '<span class="text-danger">Contains custom ';
118+
119+
if (!empty($css) && !empty($js)) {
120+
$info .= 'CSS & JS';
121+
}
122+
if (!empty($css)) {
123+
$info .= 'CSS';
124+
}
125+
if (!empty($js)) {
126+
$info .= 'JS';
127+
}
128+
$info .= '</span> ';
126129
}
127-
$info .= '</span> ';
128130
}
129131
}
130-
131-
}
132+
}
132133

133134
return $info;
134135
}

Classes/Wrapper/BackgroundWrapper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function getProcessedData(array $processedData, array $flexconf, string $
111111
$processedData['ingWidth'] = !empty($flexconf['width']) ? $flexconf['width'] : 1296;
112112
} else {
113113
$bgImage = GeneralUtility::makeInstance(BackgroundImageUtility::class)
114-
->getBgImage($processedData['data']['uid'], 'tt_content', false, true, $flexconf, false, 0, $bgMediaQueries, $files);
114+
->getBgImage($processedData['data']['uid'], 'tt_content', false, true, $flexconf, false, 0, $bgMediaQueries);
115115
$processedData['bgImage'] = $bgImage;
116116
if (!empty($flexconf['paddingTopBottom'])) {
117117
$processedData['style'] .= ' padding: '.$flexconf['paddingTopBottom'].'rem 0;';

Configuration/TCA/tx_t3sbootstrap_domain_model_config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@
626626
'config' => [
627627
'type' => 'check',
628628
'items' => [
629-
['label' => 'Enable extra row(s) in the navbar - (fileadmin)/Resources/Private/Partials/Page/NavbarExtraRow.html',],
629+
['label' => 'Enable extra row(s) in the navbar - (fileadmin)/Resources/Private/Partials/Page/Navbar/NavbarExtraRow.html',],
630630
]
631631
]
632632
],

Configuration/TypoScript/constants.typoscript

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ plugin.tx_t3sbootstrap {
1515
}
1616

1717

18-
bootstrap.cdn.bootstraplatest = 5.3.3
18+
bootstrap.cdn.bootstraplatest = 5.3.8
1919
bootstrap.cdn.noZip = 0
2020

2121
#-------------------------------------------------------------------------------
@@ -47,7 +47,7 @@ bootstrap.cdn {
4747
# cat=bootstrap-cdn/a-google/10; type=small; label=Comma separated list with google fonts:integrate Google Fonts "GDPR"-compliant locally into your website (e.g.: Montserrat,Fira Sans)
4848
googlefonts =
4949
# cat=bootstrap-cdn/b-version/10; type=small; label=Bootstrap:
50-
bootstrap = 5.3.6
50+
bootstrap = 5.3.8
5151
# cat=bootstrap-cdn/b-version/11; type=small; label=Popper js:
5252
popperjs = 2.11.8
5353
# cat=bootstrap-cdn/b-version/13; type=small; label=Masonry js:

Resources/Private/Partials/BackendLayouts/ThreeCol.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,8 @@
9292
</f:section>
9393

9494

95+
9596
<f:section name="MainContent">
96-
<f:if condition="{config.general.pageTitle} == 'content'">
97-
<f:render partial="Page/Title" arguments="{_all}" />
98-
</f:if>
9997
<f:if condition="{data.content_from_pid}">
10098
<f:then>
10199
<f:cObject typoscriptObjectPath="lib.dynamicContent" data="{pageUid: '{data.content_from_pid}', colPos: '0'}"/>

0 commit comments

Comments
 (0)