Skip to content

Commit

Permalink
Merge pull request #322 from t3solution/5.2.13
Browse files Browse the repository at this point in the history
BUGFIX release v5.2.13
  • Loading branch information
t3solution authored May 1, 2023
2 parents e7d98c0 + cea25f9 commit 2ea4965
Show file tree
Hide file tree
Showing 18 changed files with 61 additions and 21 deletions.
32 changes: 18 additions & 14 deletions Classes/DataProcessing/GalleryProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,10 @@ protected function calculateMediaWidthsAndHeights()
$mediaHeight = '';
} else {
$ratio = '';
$mediaHeight = $this->getCroppedDimensionalProperty($fileObject, 'height')
* ($mediaWidth / max($this->getCroppedDimensionalProperty($fileObject, 'width'), 1));
if ($fileObject instanceof \TYPO3\CMS\Core\Resource\FileReference) {
$mediaHeight = $this->getCroppedDimensionalProperty($fileObject, 'height')
* ($mediaWidth / max($this->getCroppedDimensionalProperty($fileObject, 'width'), 1));
}
}

$mediaHeight = !empty($mediaHeight) ? floor($mediaHeight) : '';
Expand All @@ -523,9 +525,10 @@ protected function calculateMediaWidthsAndHeights()
$fileObject = $fO;
}
}
$mediaHeight = $this->getCroppedDimensionalProperty($fileObject, 'height')
* ($mediaWidth / max($this->getCroppedDimensionalProperty($fileObject, 'width'), 1));

if ($fileObject instanceof \TYPO3\CMS\Core\Resource\FileReference) {
$mediaHeight = $this->getCroppedDimensionalProperty($fileObject, 'height')
* ($mediaWidth / max($this->getCroppedDimensionalProperty($fileObject, 'width'), 1));
}
$mediaHeight = !empty($mediaHeight) ? floor($mediaHeight) : '';
$this->mediaDimensions[$key] = [
'width' => floor($mediaWidth),
Expand All @@ -544,9 +547,10 @@ protected function calculateMediaWidthsAndHeights()
if (is_array($fileObject)) {
$fileObject = $fileObject[0];
}
$mediaWidth = $this->getCroppedDimensionalProperty($fileObject, 'width')
* ($mediaHeight / max($this->getCroppedDimensionalProperty($fileObject, 'height'), 1));

if ($fileObject instanceof \TYPO3\CMS\Core\Resource\FileReference) {
$mediaWidth = $this->getCroppedDimensionalProperty($fileObject, 'width')
* ($mediaHeight / max($this->getCroppedDimensionalProperty($fileObject, 'height'), 1));
}
$mediaHeight = !empty($mediaHeight) ? floor($mediaHeight) : '';
$this->mediaDimensions[$key] = [
'width' => floor($mediaWidth),
Expand Down Expand Up @@ -644,13 +648,13 @@ protected function calculateMediaWidthsAndHeights()
if ($fileObject instanceof \TYPO3\CMS\Core\Resource\FileReference) {
$mediaHeight = $this->getCroppedDimensionalProperty($fileObject, 'height')
* ($mediaWidth / max($this->getCroppedDimensionalProperty($fileObject, 'width'), 1));
$mediaHeight = !empty($mediaHeight) ? floor($mediaHeight) : '';
$this->mediaDimensions[$key] = [
'width' => floor($mediaWidth),
'height' => $mediaHeight,
'ratio' => $ratio
];
}
$mediaHeight = !empty($mediaHeight) ? floor($mediaHeight) : '';
$this->mediaDimensions[$key] = [
'width' => floor($mediaWidth),
'height' => $mediaHeight,
'ratio' => $ratio
];
}
}

Expand Down
2 changes: 1 addition & 1 deletion Classes/Domain/Model/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class Config extends AbstractEntity
*
* @var bool
*/
protected $navbarDarkMode = '';
protected $navbarDarkMode = false;


/**
Expand Down
1 change: 1 addition & 0 deletions Classes/ViewHelpers/MediaViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ protected function getCropString($image, $cropString)
}

if ( $this->arguments['shift'] || $this->arguments['hshift'] ) {

if ( $cropedWidth > $cropedHeight ) {
// landscape
$shift = $cropObject->$cropVariant->cropArea->x + $this->arguments['hshift']/100;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ <h5>{file.title -> f:format.html()}</h5>
picturefill="{settings.picturefill}"
lazyload="0"
ratio="{settings.detail.imageRatio}"
shift="{file.properties.tx_t3sbootstrap_shift_vertical}"
hshift="{file.properties.tx_t3sbootstrap_shift_horizontal}"
/>
</figure>
</f:section>
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@
picturefill="{settings.picturefill}"
lazyload="{settings.lazyLoad}"
ratio="{settings.detail.imageRatio}"
shift="{file.properties.tx_t3sbootstrap_shift_vertical}"
hshift="{file.properties.tx_t3sbootstrap_shift_horizontal}"
/>
<f:if condition="{settings.detail.lightbox.enabled} && {settings.magnifying}">
<div class="zoom-overlay{f:if(condition: file.description, then: ' description')}" style="max-width: {width}px;">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@
picturefill="{settings.picturefill}"
lazyload="{settings.lazyLoad}"
ratio="{ratio}"
shift="{file.properties.tx_t3sbootstrap_shift_vertical}"
hshift="{file.properties.tx_t3sbootstrap_shift_horizontal}"
/>
</figure>
</html>
2 changes: 2 additions & 0 deletions Resources/Private/Partials/Content/Card/FlipCard.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
picturefill="{settings.picturefill}"
lazyload="{lazyload}"
ratio="{ratio}"
shift="{file.properties.tx_t3sbootstrap_shift_vertical}"
hshift="{file.properties.tx_t3sbootstrap_shift_horizontal}"
/>
</figure>

Expand Down
4 changes: 4 additions & 0 deletions Resources/Private/Partials/Content/Card/ProfileCard.html
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@
picturefill="{settings.picturefill}"
lazyload="{lazyload}"
ratio="{addmedia.ratio}"
shift="{file.properties.tx_t3sbootstrap_shift_vertical}"
hshift="{file.properties.tx_t3sbootstrap_shift_horizontal}"
/>
</figure>
</f:if>
Expand Down Expand Up @@ -270,6 +272,8 @@
picturefill="{settings.picturefill}"
lazyload="{lazyload}"
ratio="1:1"
shift="{file.properties.tx_t3sbootstrap_shift_vertical}"
hshift="{file.properties.tx_t3sbootstrap_shift_horizontal}"
/>
</figure>
</f:if>
Expand Down
4 changes: 3 additions & 1 deletion Resources/Private/Partials/Content/Media/Carousel.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ <h5>{media.title -> f:format.html()}</h5>
0: {'cropVariant': 'default', 'media': '(min-width: 1200px)', 'srcset': '{settings.srcsetDesktop}'},
1: {'cropVariant': 'tablet', 'media': '(min-width: 576px)', 'srcset': '{settings.srcsetTablet}'},
2: {'cropVariant': 'mobile', 'media': '(max-width: 575px)', 'srcset': '{settings.srcsetMobile}'}
}" picturefill="{settings.picturefill}" lazyload="{settings.lazyLoad}" ratio="{ratio}" />
}" picturefill="{settings.picturefill}" lazyload="{settings.lazyLoad}" ratio="{ratio}" shift="{file.properties.tx_t3sbootstrap_shift_vertical}"
hshift="{file.properties.tx_t3sbootstrap_shift_horizontal}"
/>
</f:else>
</f:if>
</f:section>
2 changes: 2 additions & 0 deletions Resources/Private/Partials/Content/Swiper/CustomOne.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ <h2 class="text-white">{slide.header}</h2>
picturefill="{settings.picturefill}"
lazyload="0"
ratio="{ratio}"
shift="{file.properties.tx_t3sbootstrap_shift_vertical}"
hshift="{file.properties.tx_t3sbootstrap_shift_horizontal}"
/>
</figure>
</f:section>
2 changes: 2 additions & 0 deletions Resources/Private/Partials/Content/Swiper/CustomTwo.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ <h3>BUILD YOUR OWN SLIDER</h3>
picturefill="{settings.picturefill}"
lazyload="0"
ratio="{ratio}"
shift="{file.properties.tx_t3sbootstrap_shift_vertical}"
hshift="{file.properties.tx_t3sbootstrap_shift_horizontal}"
/>
</figure>
</f:section>
2 changes: 2 additions & 0 deletions Resources/Private/Partials/Content/Swiper/Default.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@
picturefill="{settings.picturefill}"
lazyload="0"
ratio="{ratio}"
shift="{file.properties.tx_t3sbootstrap_shift_vertical}"
hshift="{file.properties.tx_t3sbootstrap_shift_horizontal}"
/>
</f:else>
</f:if>
Expand Down
12 changes: 10 additions & 2 deletions Resources/Private/Templates/Container/BackgroundWrapper.html
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,11 @@
0: {'cropVariant': 'default', 'media': '(min-width: 1200px)', 'srcset': '{settings.srcsetDesktop}'},
1: {'cropVariant': 'tablet', 'media': '(min-width: 576px)', 'srcset': '{settings.srcsetTablet}'},
2: {'cropVariant': 'mobile', 'media': '(max-width: 575px)', 'srcset': '{settings.srcsetMobile}'}
}" picturefill="{settings.picturefill}" lazyload="{settings.lazyLoad}" ratio="0" style="{style}" />
}" picturefill="{settings.picturefill}" lazyload="{settings.lazyLoad}" ratio="0"
style="{style}"
shift="{file.properties.tx_t3sbootstrap_shift_vertical}"
hshift="{file.properties.tx_t3sbootstrap_shift_horizontal}"
/>
</f:then>
<f:else>
<t3sb:media file="{file}" width="{ingWidth}" height="auto"
Expand All @@ -197,7 +201,11 @@
0: {'cropVariant': 'default', 'media': '(min-width: 1200px)', 'srcset': '{settings.srcsetDesktop}'},
1: {'cropVariant': 'tablet', 'media': '(min-width: 576px)', 'srcset': '{settings.srcsetTablet}'},
2: {'cropVariant': 'mobile', 'media': '(max-width: 575px)', 'srcset': '{settings.srcsetMobile}'}
}" picturefill="{settings.picturefill}" lazyload="0" ratio="0" style="{style}" />
}" picturefill="{settings.picturefill}" lazyload="0" ratio="0"
style="{style}"
shift="{file.properties.tx_t3sbootstrap_shift_vertical}"
hshift="{file.properties.tx_t3sbootstrap_shift_horizontal}"
/>
</f:else>
</f:if>
</figure>
Expand Down
2 changes: 2 additions & 0 deletions Resources/Private/Templates/Container/CardWrapper.html
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@ <h4 class="card-title my-3">{card.backheader -> f:format.raw()}</h4>
picturefill="{settings.picturefill}"
lazyload="{lazyload}"
ratio="{ratio}"
shift="{file.properties.tx_t3sbootstrap_shift_vertical}"
hshift="{file.properties.tx_t3sbootstrap_shift_horizontal}"
/>
</figure>
</f:section>
Expand Down
2 changes: 2 additions & 0 deletions Resources/Private/Templates/Container/Collapsible.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ <h2 class="accordion-header" id="heading-{data.uid}">
picturefill="0"
lazyload="{settings.lazyLoad}"
ratio="{ratio}"
shift="{media.properties.tx_t3sbootstrap_shift_vertical}"
hshift="{media.properties.tx_t3sbootstrap_shift_horizontal}"
/>
</f:if>
{headerFontawesome -> f:format.raw()}
Expand Down
3 changes: 2 additions & 1 deletion Resources/Private/Templates/Content/Carousel.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@
picturefill="{settings.picturefill}"
lazyload="{f:if(condition: owlStyle, then: '', else: settings.lazyLoad)}"
ratio="{ratio}"
shift="0"
shift="{files.0.properties.tx_t3sbootstrap_shift_vertical}"
hshift="{files.0.properties.tx_t3sbootstrap_shift_horizontal}"
mobileNoRatio="{mobileNoRatio}" />
</f:else>
</f:if>
Expand Down
2 changes: 2 additions & 0 deletions Resources/Private/Templates/Content/ImageGallery.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,7 @@
lazyload="{f:if(condition: '{settings.lazyLoad} == 1', then: '1', else: '0')}"
ratio="{data.tx_t3sbootstrap_image_ratio}"
columns="{data.imagecols}"
shift="{file.properties.tx_t3sbootstrap_shift_vertical}"
hshift="{file.properties.tx_t3sbootstrap_shift_horizontal}"
/>
</f:section>
4 changes: 2 additions & 2 deletions ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/***************************************************************
* Extension Manager/Repository config file for ext "t3sbootstrap".
*
* Auto generated 17-04-2023 18:48
* Auto generated 01-05-2023 20:40
*
* Manual updates:
* Only the data in the array - everything else is removed by next
Expand All @@ -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.12',
'version' => '5.2.13',
'state' => 'stable',
'uploadfolder' => false,
'clearcacheonload' => true,
Expand Down

0 comments on commit 2ea4965

Please sign in to comment.