Skip to content

Commit 116a9d6

Browse files
committed
feat: slow appearing of the first image in the image preview added with opacity from 0.1 to 1 in 2.45s; after the slides are initiated transition pushed on to 0.57s
1 parent bcffde4 commit 116a9d6

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

resources/css/gallery.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/css/gallery.less

+19
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,25 @@ body{
260260
margin-top:5px;
261261
}
262262

263+
@-webkit-keyframes fadein{
264+
0% {
265+
opacity: 0;
266+
}
267+
100% {
268+
opacity: 1;
269+
}
270+
}
271+
272+
.blueimp-gallery > .slides > .slide-loading {
273+
background-image: none;
274+
// this class with a loader is a bit strange
275+
}
276+
277+
.blueimp-gallery .blueimp-gallery-display, .blueimp-gallery > .slides > .slide {
278+
animation: fadein 0.57s linear 1 normal forwards;
279+
-webkit-animation: fadein 0.57s linear 1 normal forwards;
280+
}
281+
263282
@media (max-width: 319px) {
264283
#gallery-container {
265284
#gallery-list {

resources/js/gallery.js

+7
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ humhub.module('gallery', function (module, require, $) {
5757
});
5858
};
5959

60+
$('#gallery-media-container .panel-body').one('click', function() {
61+
var $slides = $('.blueimp-gallery .slides');
62+
$slides.css({'opacity': 0.1});
63+
$slides.fadeTo(2450, 1);
64+
$('#gallery-media-container .panel-body').off();
65+
});
66+
6067
module.export({
6168
init: init,
6269
initOnPjaxLoad: true,

0 commit comments

Comments
 (0)