Skip to content

Commit

Permalink
Updated mobile CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
DDKnoll committed May 16, 2014
1 parent 3278889 commit b6e1f8b
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 14 deletions.
33 changes: 22 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,28 @@ Sample Usage:

<script src="js/ractive/Ractive-legacy.0.3.9.min.js"></script><!-- Get Ractive-->
<script src="js/instagram.js"></script> <!-- Get Instagram extension -->
<script>
//Check URL for search parameter.
query = (window.location.search.length ? window.location.search.slice(1) : 'dribbble');


/** This code is just for the infinite scroll. You don't have to use this. */
//Infinite Scroll Window Bindings.
var infiniteScrollBinding = function(){
//Infinite Scroll Window Bindings
$(window).scroll(function(evt){
var bod = $('body')[0];
pageHeight = bod.offsetHeight;
bottomScroll = window.scrollY + bod.clientHeight;
if(pageHeight - bottomScroll < 200){
insta.load('after');
}
});
$(window).scroll(function(evt){
//Calculate Window Values on every scroll event.
var bod = $('body')[0];
pageHeight = bod.offsetHeight;
bottomScroll = window.scrollY + bod.clientHeight;
distanceToBottom = pageHeight - bottomScroll;

//Load more posts as needed.
if(distanceToBottom < 200){
insta.load('after');
}
else if(window.scrollY <= 0){
insta.load('before');
}
});
}

// Get our template file.
Expand All @@ -36,6 +45,7 @@ Sample Usage:
});

});
</script>


Function Reference
Expand All @@ -51,3 +61,4 @@ TODO:

1. Minify JS
2. Finish Documentation
3. Develop Testing Framework
6 changes: 6 additions & 0 deletions css/instagram-feed.css
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,10 @@ Media Queries
.title .heading-text{
font-size:36px;
}
.title a i{
line-height:1.2em;
}
h3,h4{
margin: .2em;
}
}
10 changes: 7 additions & 3 deletions js/main.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@

var instafeed = {};

//Check URL for search parameter
//Check URL for search parameter.
query = (window.location.search.length ? window.location.search.slice(1) : 'dribbble');

//Infinite Scroll Window Bindings.
var infiniteScrollBinding = function(){
//Infinite Scroll Window Bindings
$(window).scroll(function(evt){
//Calculate Window Values on every scroll event.
var bod = $('body')[0];
pageHeight = bod.offsetHeight;
bottomScroll = window.scrollY + bod.clientHeight;
if(pageHeight - bottomScroll < 200){
distanceToBottom = pageHeight - bottomScroll;

//Load more posts as needed.
if(distanceToBottom < 200){
insta.load('after');
}
else if(window.scrollY <= 0){
Expand Down

0 comments on commit b6e1f8b

Please sign in to comment.