From 3e377eb32ebd1b3b4d1663655c26ab25c75afe84 Mon Sep 17 00:00:00 2001 From: martin speleo Date: Sun, 28 Jun 2009 23:11:45 +0100 Subject: [PATCH] [svn] Fixed accidental removal of fading in margin pictures from main page of eye candy site. Reduced non eye candy margins. Moved set contents style height function into main.js from being embeded js, and ran when eye candy is turned on. Remove style attribute when eye candy is turned back off. --- media/css/mainplain.css | 8 ++++---- media/js/base.js | 23 +++++++++++++---------- templates/base.html | 3 --- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/media/css/mainplain.css b/media/css/mainplain.css index 38eef59..734f09a 100644 --- a/media/css/mainplain.css +++ b/media/css/mainplain.css @@ -261,9 +261,9 @@ div#content { margin-left: 20px; margin-right: 20px; padding-top: 10px; - padding-left: 5em; - padding-right: 5em; - padding-bottom:5em; + padding-left: 1em; + padding-right: 1em; + padding-bottom:1em; background:#fff; } @@ -277,7 +277,7 @@ div#content { body { background-color:#fff; - padding-bottom:100px; + padding-bottom:10px; } diff --git a/media/js/base.js b/media/js/base.js index df9b0f4..be96eaa 100644 --- a/media/js/base.js +++ b/media/js/base.js @@ -47,12 +47,8 @@ $(".toggleMenu").click(function () { $("ul.dropdown li:not(.toggleMenu)").toggle(); $(".toggleMenu").toggle(); }); - -$(".footer").hide(); -$(".fadeIn").hide(); -setTimeout("$('.leftMargin.fadeIn').fadeIn(3000);",1000); -setTimeout("$('.rightMargin.fadeIn').fadeIn(3000);",2000); -$("a.closeDiv").click(function () { + + $("a.closeDiv").click(function () { $(this).parent().hide(); }); @@ -79,7 +75,7 @@ $(hoverLink).bind('mouseout', }; -function showEyeCandy(){ +function showEyeCandy(){ switchStylestyle("eyeCandy"); $("#eyeCandyFooterPopUps").load("/eyecandy"); $(".leftMargin,.rightMargin").show(); @@ -88,9 +84,11 @@ $(".killEyeCandy").show(); linkHover("#cavesLink","#richardBanner"); linkHover("#caversLink","#timeMachine"); linkHover("#surveyBinderLink","#surveyHover"); -linkHover("#troggle","#timeMachine");}; +linkHover("#troggle","#timeMachine"); +contentHeight();}; function killEyeCandy(){ +$("#content").removeAttr("style") switchStylestyle("plain"); $(".leftMargin,.rightMargin").hide(); $(".showEyeCandy").show(); @@ -104,7 +102,12 @@ $("#troggle").unbind('mouseover').unbind('mouseout'); if (getCookie("eyeCandy") == "False") {killEyeCandy();} else - {showEyeCandy();} + {showEyeCandy(); + $(".footer").hide(); + $(".fadeIn").hide(); + setTimeout("$('.leftMargin.fadeIn').fadeIn(3000);",1000); + setTimeout("$('.rightMargin.fadeIn').fadeIn(3000);",2000); + } /*dropdown (well, up actually) menu code from http://css-tricks.com/simple-jquery-dropdowns/*/ $("ul.dropdown li").hover( @@ -115,7 +118,7 @@ $("ul.dropdown li").hover( function(){ $(this).removeClass("hover"); - $('ul:first',this).css('visibility', 'hidden'); + $('ul:first',this).css('visibility', 'hidden'); }); $("ul.dropdown li ul li:has(ul)").find("a:first").append(" » "); diff --git a/templates/base.html b/templates/base.html index b34df33..4fc24c5 100644 --- a/templates/base.html +++ b/templates/base.html @@ -10,9 +10,6 @@ - {% block head %}{% endblock %}