Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

sorry tim

  • Loading branch information...
commit 292a3030a3622694963d34a76ec00ebd5cbead56 2 parents 595601f + 0edeb55
Brett Whitham authored
View
9 public/css/style.css
@@ -28,6 +28,7 @@ html{
background-position:top left;
background-repeat:repeat;
background-color:rgba(42, 49, 49, 1.0);
+ /*overflow: hidden;*/
}
.clear {
@@ -98,9 +99,13 @@ html {
padding:0 2% 0 2%;
}
+body {
+ height: 100%;
+}
+
.col3 {
width:32%;
- min-height:100%;
+ height:100%;
float:left;
background-image:
-webkit-linear-gradient(
@@ -112,6 +117,8 @@ html {
/*border-right:rgba(52, 61, 61, 0.5) 1px solid;
border-left:rgba(52, 61, 61, 0.5) 1px solid;*/
-webkit-box-shadow: 0 0 40px 5px rgba(0, 0, 0, 0.5);
+
+ overflow: auto;
}
.col3:nth-child(2) {
View
14 public/js/index.js
@@ -1,5 +1,10 @@
var cardCount;
var currentCard;
+
+var scrollPositions = {
+ geeklist: 0
+};
+
$(document).ready(function() {
cardCount = $('.tile').length;
currentCard = -1;
@@ -14,8 +19,13 @@ function scrollToNextCard() {
var previousCard = '#card-' + (currentCard-1);
var thisCard = '#card-' + currentCard;
- $('html, body').animate({ scrollTop: $(thisCard).offset().top - 100 }, 1000, function() {
+
+ scrollPositions.geeklist = (currentCard>0)
+ ? scrollPositions.geeklist + $(previousCard).outerHeight(true)
+ : 0;
+
+ $('#geeklist').animate({ scrollTop: scrollPositions.geeklist }, 1000, function() {
$(previousCard).css({ opacity: 1.0 });
- $(thisCard).css({ opacity: 1.0 });
+ $(thisCard).css({ opacity: 1 });
});
};
View
10 views/index/index.jade
@@ -1,7 +1,8 @@
-section.col3
- - each card, idx in cards
- section.tile(id='card-#{idx}')
- img(src='#{card.user.avatar}')
+section.col3(id='geeklist')
+ - each card, idx in geeklistcards
+ section.tile(id='card-#{idx}', style='opacity:1.0')
+ section.user-image
+ img(src='#{card.user.avatar}')
section.right
h4= card.headline
p #{card.user.name}
@@ -10,5 +11,4 @@ section.col3
 
section.col3
 
-script(src='/js/jquery.shuffle.js')
script(src='/js/index.js')
Please sign in to comment.
Something went wrong with that request. Please try again.