var optimizeHeight = (h < 600);
if (optimizeHeight) {
$(".fb-slideshow-thumbnails").addClass('fb-slideshow-nothumbs');
- m.find('.back').addClass('small');
+ m.find('.caption, .back').addClass('small');
} else {
$(".fb-slideshow-thumbnails").removeClass('fb-slideshow-nothumbs');
- m.find('.back').removeClass('small');
+ m.find('.caption, .back').removeClass('small');
}
// When resizing the slideshow, the goal is to fit it into the maximum modal height (stored in 'h').
if (m.find('.fb-slideshow-thumbnails').length > 0) {
thumbnailsHeight = m.find('.fb-slideshow-thumbnails').outerHeight(); // Thumbnail slider height
}
- var offset = 0;
if (optimizeHeight) {
- offset = -headerHeight;
- headerHeight = 0;
thumbnailsHeight = 0;
var contentHeight = h;
hasCaption = false;
}
var slideMaxHeight = h - headerHeight - thumbnailsHeight; // Remaining height that main image + caption has to fit into
- m.find('.content').css({top: offset});
// Process each slide and calculate optimal height for image and slide container
m.find('.fb-slideshow-slide').each(function () {
this.numSlides = $slideshow.find('img').length;
- console.log(this.numSlides);
-
- showThumbnails = showThumbnails && numSlides > 1;
+ showThumbnails = showThumbnails && this.numSlides > 1;
var openIndex = parseInt($slideshow.attr('data-open-index'));
if (isNaN(openIndex)) {
width: 100%;
height: 60px;
+ &.small {
+ padding: 5px @menu-padding;
+ height: 30px;
+ }
+
&.h0 {
height: 0;
padding: 0;
@import "mobilefirst.less";
@import "tabs.less";
-@import "widget.less";
\ No newline at end of file
+@import "widget.less";
img {
max-width: 100%;
+ align-self: center; // Stops IE11 distorting the image
}
&-slide {
position: relative;
- display: block;
+ display: flex !important;
+ flex-direction: column;
+ justify-content: center;
text-align: center;
//visibility: hidden; // Hide until JS can resize the images to avoid flicker