File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 9191 background-position : center;
9292 background-size : contain;
9393 background-repeat : no-repeat;
94+ margin : 0 auto;
9495}
9596
9697/* Loader */
Original file line number Diff line number Diff line change @@ -389,9 +389,13 @@ function preview(items) {
389389 items . forEach ( function ( item , index ) {
390390 var carouselItem = imageTemplate . clone ( )
391391 . addClass ( index === 0 ? 'active' : '' ) ;
392- carouselItem . find ( '.carousel-image' )
393- // .addClass('mime-icon ico-' + item.icon);
394- . css ( 'background-image' , 'url(\'' + item . url + '?timestamp=' + item . time + '\')' ) ;
392+
393+ if ( item . thumb_url ) {
394+ carouselItem . find ( '.carousel-image' ) . css ( 'background-image' , 'url(\'' + item . url + '?timestamp=' + item . time + '\')' ) ;
395+ } else {
396+ carouselItem . find ( '.carousel-image' ) . css ( 'width' , '50vh' ) . append ( $ ( '<div>' ) . addClass ( 'mime-icon ico-' + item . icon ) ) ;
397+ }
398+
395399 carousel . children ( '.carousel-inner' ) . append ( carouselItem ) ;
396400
397401 var carouselIndicator = indicatorTemplate . clone ( )
You can’t perform that action at this time.
0 commit comments