Permalink
Browse files

added logo, changed nav bar

  • Loading branch information...
1 parent f9736b7 commit 10caf441b68e8f2f2db2310a1c5bb39b805f1f5a @sukhada committed Mar 15, 2013
Showing with 16 additions and 16 deletions.
  1. +16 −16 reddit.js
View
@@ -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() {
@@ -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();

0 comments on commit 10caf44

Please sign in to comment.