Skip to content

Commit

Permalink
added logo, changed nav bar
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name Here committed Mar 15, 2013
1 parent f9736b7 commit 10caf44
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions reddit.js
Expand Up @@ -150,12 +150,22 @@ function frontPage(result) {
}
}
}
$("#posts").css("display", "block");
var height = $("li").each(function() {
var height = $(this).outerHeight();
$(this).children("span.upvotes").css("height", (height+15)+'px');
$(this).children("span.upvotes").css("line-height", (height)+'px');
});
if ($(window).width > 704) {
$("#posts").css("display", "block");
var height = $("li").each(function() {
var height = $(this).outerHeight();
$(this).children("span.upvotes").css("height", (height+15)+'px');
$(this).children("span.upvotes").css("line-height", (height)+'px');
});
}
else {
var height = $("li").each(function() {
var height = $(this).outerHeight();
$(this).children("span.upvotes").css("height", (height+15)+'px');
$(this).children("span.upvotes").css("line-height", (height+15)+'px');
});
}

}

function loadRedditPosts() {
Expand All @@ -171,16 +181,6 @@ function loadRedditPosts() {

}

function adjustHeights(elem) {
var fontstep = 1;
$(elem).each(function(title) {
if ($(".title:eq("+ title+")").height()>$(".title:eq("+ title+")").parent().height() || $(".title:eq("+ title+")").width()>$(".title:eq("+ title+")").parent().width()) {
$(".title:eq("+ title+")").css('font-size',(($(".title:eq("+ title+")").css('font-size').substr(0,2)-fontstep)) + 'px').css('line-height',(($(".title:eq("+ title+")").css('font-size').substr(0,2))) + 'px');
adjustHeights(".title:eq("+ title+")");
}
});
}

function fixMargins() {
var height = $("li").each(function() {
var height = $(this).height();
Expand Down

0 comments on commit 10caf44

Please sign in to comment.