diff --git a/dist/main.css b/dist/main.css index 954d3cc..76cb355 100644 Binary files a/dist/main.css and b/dist/main.css differ diff --git a/dist/main.js b/dist/main.js index e9c43a4..fe56cbb 100644 Binary files a/dist/main.js and b/dist/main.js differ diff --git a/src/scripts/album.js b/src/scripts/album.js index fb5ff13..4f0ce42 100644 --- a/src/scripts/album.js +++ b/src/scripts/album.js @@ -34,10 +34,7 @@ album.load = function(albumID, refresh) { password.get(albumID, function() { - if (!refresh) { - lychee.animate('.album, .photo', 'contentZoomOut'); - lychee.animate('#content .divider', 'fadeOut'); - } + if (!refresh) lychee.animate('#content', 'contentZoomOut'); startTime = new Date().getTime(); @@ -82,7 +79,7 @@ album.load = function(albumID, refresh) { view.album.init(); if (!refresh) { - lychee.animate('.album, .photo', 'contentZoomIn'); + lychee.animate('#content', 'contentZoomIn'); header.setMode('album'); } diff --git a/src/scripts/albums.js b/src/scripts/albums.js index d38140c..cf73c72 100644 --- a/src/scripts/albums.js +++ b/src/scripts/albums.js @@ -15,8 +15,7 @@ albums.load = function() { durationTime, waitTime; - lychee.animate('.album, .photo', 'contentZoomOut'); - lychee.animate('#content .divider', 'fadeOut'); + lychee.animate('#content', 'contentZoomOut'); startTime = new Date().getTime(); @@ -41,7 +40,7 @@ albums.load = function() { setTimeout(function() { header.setMode('albums'); view.albums.init(); - lychee.animate('.album', 'contentZoomIn'); + lychee.animate('#content', 'contentZoomIn'); }, waitTime); }); @@ -50,7 +49,7 @@ albums.load = function() { setTimeout(function() { header.setMode('albums'); view.albums.init(); - lychee.animate('.album, .photo', 'contentZoomIn'); + lychee.animate('#content', 'contentZoomIn'); }, 300); } diff --git a/src/scripts/search.js b/src/scripts/search.js index 10c181c..cb344d2 100755 --- a/src/scripts/search.js +++ b/src/scripts/search.js @@ -53,8 +53,7 @@ search.find = function(term) { $('.no_content').remove(); - lychee.animate('.album, .photo', 'contentZoomOut'); - lychee.animate('.divider', 'fadeOut'); + lychee.animate('#content', 'contentZoomOut'); search.hash = data.hash; @@ -65,7 +64,7 @@ search.find = function(term) { $('body').append(build.no_content('magnifying-glass')); } else { lychee.content.html(html); - lychee.animate('.album, .photo', 'contentZoomIn'); + lychee.animate('#content', 'contentZoomIn'); $('img[data-type!="svg"]').retina(); } diff --git a/src/styles/_animations.scss b/src/styles/_animations.scss index efbb271..31e0031 100755 --- a/src/styles/_animations.scss +++ b/src/styles/_animations.scss @@ -7,27 +7,13 @@ animation-name: fadeIn; animation-duration: .3s; animation-fill-mode: forwards; - animation-timing-function: $timingBounce; + animation-timing-function: $timing; } .fadeOut { animation-name: fadeOut; animation-duration: .3s; animation-fill-mode: forwards; - animation-timing-function: $timingBounce; -} - -.contentZoomIn { - animation-name: zoomIn; - animation-duration: .2s; - animation-fill-mode: forwards; - animation-timing-function: $timing; -} - -.contentZoomOut { - animation-name: zoomOut; - animation-duration: .2s; - animation-fill-mode: forwards; animation-timing-function: $timing; } diff --git a/src/styles/_content.scss b/src/styles/_content.scss index 51ff992..6d97316 100644 --- a/src/styles/_content.scss +++ b/src/styles/_content.scss @@ -20,6 +20,37 @@ &.sidebar { width: calc(100% - 300px); } + /* Animations ------------------------------------------------------------------- */ + &.contentZoomIn .album, + &.contentZoomIn .photo { + animation-name: zoomIn; + animation-duration: .2s; + animation-fill-mode: forwards; + animation-timing-function: $timing; + } + + &.contentZoomIn .divider { + animation-name: fadeIn; + animation-duration: .2s; + animation-fill-mode: forwards; + animation-timing-function: $timing; + } + + &.contentZoomOut .album, + &.contentZoomOut .photo { + animation-name: zoomOut; + animation-duration: .2s; + animation-fill-mode: forwards; + animation-timing-function: $timing; + } + + &.contentZoomOut .divider { + animation-name: fadeOut; + animation-duration: .3s; + animation-fill-mode: forwards; + animation-timing-function: $timing; + } + /* Albums and Photos ------------------------------------------------*/ .album, .photo { diff --git a/src/styles/_sidebar.scss b/src/styles/_sidebar.scss index 966597a..5c2e24f 100644 --- a/src/styles/_sidebar.scss +++ b/src/styles/_sidebar.scss @@ -12,7 +12,7 @@ background-color: rgba(25, 25, 25, .98); border-left: 1px solid black(.2); transform: translateX(0); - transition: transform .3s $timingBounce; + transition: transform .3s $timing; &.active { transform: translateX(-320px); }