Skip to content

Commit

Permalink
feat: slow appearing of the first image in the image preview added wi…
Browse files Browse the repository at this point in the history
…th opacity from 0.1 to 1 in 2.45s; after the slides are initiated transition pushed on to 0.57s
  • Loading branch information
UtmostCreator committed Aug 26, 2020
1 parent bcffde4 commit 6238fd0
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion resources/css/gallery.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions resources/css/gallery.less
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,29 @@ body{
margin-top:5px;
}

@-webkit-keyframes fadein{
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}

.blueimp-gallery > .slides > .slide-loading {
background-image: none;
// this class with a loader is a bit strange
}

.blueimp-gallery .blueimp-gallery-display, .blueimp-gallery > .slides > .slide {
animation: fadein 0.57s linear 1 normal forwards;
-webkit-animation: fadein 0.57s linear 1 normal forwards;
}

.blueimp-gallery > .slides {
opacity: 0.1;
}

@media (max-width: 319px) {
#gallery-container {
#gallery-list {
Expand Down
5 changes: 5 additions & 0 deletions resources/js/gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ humhub.module('gallery', function (module, require, $) {
});
};

$('#gallery-media-container .panel-body').one('click', function() {
$('.blueimp-gallery .slides').fadeTo(2450, 1);
$('#gallery-media-container .panel-body').off();
});

module.export({
init: init,
initOnPjaxLoad: true,
Expand Down

0 comments on commit 6238fd0

Please sign in to comment.