This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a4a78ee
commit 5e54104
Showing
10 changed files
with
189 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
/* | ||
* animations css stylesheet | ||
*/ | ||
|
||
/* animate ngRepeat in phone listing */ | ||
|
||
.phone-listing.ng-enter, | ||
.phone-listing.ng-leave, | ||
.phone-listing.ng-move { | ||
-webkit-transition: 0.5s linear all; | ||
-moz-transition: 0.5s linear all; | ||
-o-transition: 0.5s linear all; | ||
transition: 0.5s linear all; | ||
} | ||
|
||
.phone-listing.ng-enter, | ||
.phone-listing.ng-move { | ||
opacity: 0; | ||
height: 0; | ||
overflow: hidden; | ||
} | ||
|
||
.phone-listing.ng-move.ng-move-active, | ||
.phone-listing.ng-enter.ng-enter-active { | ||
opacity: 1; | ||
height: 120px; | ||
} | ||
|
||
.phone-listing.ng-leave { | ||
opacity: 1; | ||
overflow: hidden; | ||
} | ||
|
||
.phone-listing.ng-leave.ng-leave-active { | ||
opacity: 0; | ||
height: 0; | ||
padding-top: 0; | ||
padding-bottom: 0; | ||
} | ||
|
||
/* cross fading between routes with ngView */ | ||
|
||
.view-container { | ||
position: relative; | ||
} | ||
|
||
.view-frame.ng-enter, | ||
.view-frame.ng-leave { | ||
background: white; | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
right: 0; | ||
} | ||
|
||
.view-frame.ng-enter { | ||
-webkit-animation: 0.5s fade-in; | ||
-moz-animation: 0.5s fade-in; | ||
-o-animation: 0.5s fade-in; | ||
animation: 0.5s fade-in; | ||
z-index: 100; | ||
} | ||
|
||
.view-frame.ng-leave { | ||
-webkit-animation: 0.5s fade-out; | ||
-moz-animation: 0.5s fade-out; | ||
-o-animation: 0.5s fade-out; | ||
animation: 0.5s fade-out; | ||
z-index: 99; | ||
} | ||
|
||
@keyframes fade-in { | ||
from { opacity: 0; } | ||
to { opacity: 1; } | ||
} | ||
@-moz-keyframes fade-in { | ||
from { opacity: 0; } | ||
to { opacity: 1; } | ||
} | ||
@-webkit-keyframes fade-in { | ||
from { opacity: 0; } | ||
to { opacity: 1; } | ||
} | ||
|
||
@keyframes fade-out { | ||
from { opacity: 1; } | ||
to { opacity: 0; } | ||
} | ||
@-moz-keyframes fade-out { | ||
from { opacity: 1; } | ||
to { opacity: 0; } | ||
} | ||
@-webkit-keyframes fade-out { | ||
from { opacity: 1; } | ||
to { opacity: 0; } | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
var phonecatAnimations = angular.module('phonecatAnimations', ['ngAnimate']); | ||
|
||
phonecatAnimations.animation('.phone', function() { | ||
|
||
var animateUp = function(element, className, done) { | ||
if(className != 'active') { | ||
return; | ||
} | ||
element.css({ | ||
position: 'absolute', | ||
top: 500, | ||
left: 0, | ||
display: 'block' | ||
}); | ||
|
||
jQuery(element).animate({ | ||
top: 0 | ||
}, done); | ||
|
||
return function(cancel) { | ||
if(cancel) { | ||
element.stop(); | ||
} | ||
}; | ||
} | ||
|
||
var animateDown = function(element, className, done) { | ||
if(className != 'active') { | ||
return; | ||
} | ||
element.css({ | ||
position: 'absolute', | ||
left: 0, | ||
top: 0 | ||
}); | ||
|
||
jQuery(element).animate({ | ||
top: -500 | ||
}, done); | ||
|
||
return function(cancel) { | ||
if(cancel) { | ||
element.stop(); | ||
} | ||
}; | ||
} | ||
|
||
return { | ||
addClass: animateUp, | ||
removeClass: animateDown | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters