slightly fade in stream elements; made a better spinner for the stream (css3)

This commit is contained in:
danielgrippi 2011-12-18 12:49:39 -08:00 committed by Dennis Collinson
parent 734f01402a
commit 828624f392
4 changed files with 26 additions and 2 deletions

View file

@ -17,6 +17,26 @@
%link{:rel => 'shortcut icon', :href => '/favicon.png'}
%link{:rel => 'apple-touch-icon', :href => '/apple-touch-icon.png'}
:css
@-webkit-keyframes fade-in {
0% { opacity: 0; }
100% { opacity: 1; }
}
@-webkit-keyframes spin {
0% { -webkit-transform: rotate(0deg); }
100% { -webkit-transform: rotate(360deg); }
}
.loaded {
-webkit-animation: fade-in 0.16s linear;
}
.loader {
-webkit-animation: spin 1s infinite ease-in-out,
fade-in 0.2s ease-in;
}
/ Social Media Icons are by Paul Robert Lloyd @ http://paulrobertlloyd.com/2009/06/social_media_icons
/ bootstrap/blueprint switch

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

View file

@ -1,4 +1,7 @@
App.Views.StreamObject = Backbone.View.extend({
className : "loaded",
initialize: function(options) {
this.model.bind('remove', this.remove, this);
this.model.bind('change', this.render, this);

View file

@ -26,7 +26,7 @@ App.Views.Stream = Backbone.View.extend({
href: this.collection.url(),
id: "paginate",
"class": "paginate"
}).text('more'));
}).text('Load more posts'));
},
loadMore: function(evt) {
@ -42,7 +42,8 @@ App.Views.Stream = Backbone.View.extend({
addLoader: function(){
this.$("#paginate").html($("<img>", {
src : "/images/ajax-loader.gif"
src : "/images/static-loader.png",
"class" : 'loader'
}));
}
});