From e6907f7d7ad9eadaa62a8a3dcd4a7cfd0225fb62 Mon Sep 17 00:00:00 2001 From: Wesley Moore Date: Wed, 7 Jul 2010 17:58:40 +1000 Subject: [PATCH] Some search improvements and fixes for Firefox --- content/screen.sass | 5 +++++ layouts/_head.html | 1 + output/js/application.js | 6 ++++-- output/js/home.js | 4 ++-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/content/screen.sass b/content/screen.sass index c41cfd4..6226755 100644 --- a/content/screen.sass +++ b/content/screen.sass @@ -8,6 +8,11 @@ body min-width: 960px +// HTML5 expectations - should go in reset perhaps +header, footer, nav, article + display: block + + p, li, blockquote line-height: 1.2 diff --git a/layouts/_head.html b/layouts/_head.html index c14b8d9..a87dee4 100644 --- a/layouts/_head.html +++ b/layouts/_head.html @@ -11,4 +11,5 @@ + diff --git a/output/js/application.js b/output/js/application.js index 2b50a74..11774a3 100644 --- a/output/js/application.js +++ b/output/js/application.js @@ -26,13 +26,13 @@ jQuery(function() { if(article.css('opacity') != style.opacity) article.animate(style, {queue: false, duration: 500}); }); } - $('#search').show(); var input = $('#search input'); if(input.length > 0) { // Setup incremental search on Articles pages - if(!(input.attr("onsearch") === undefined)) { + if(input.get(0).hasOwnProperty('onsearch')) { console.log("Using search event for search"); + $('#search label').hide(); input.bind("search", refresh_search); } else { @@ -52,6 +52,8 @@ jQuery(function() { input.stopTime(); }); } + input.val(''); } + $('#search').show(); }); diff --git a/output/js/home.js b/output/js/home.js index a79f7ba..3aa007b 100644 --- a/output/js/home.js +++ b/output/js/home.js @@ -16,8 +16,8 @@ jQuery(function () { alt: photo.attr('title'), }; var li = $(render_image(image)); - $('img', li).css({left: (i * -75) + 'px'}); - li.css({"background-position-x": (i * -75) + 'px'}); + $('img', li).css('left', (i * -75) + 'px'); + li.css("background-position", (i * -75) + 'px -75px'); ul.append(li); }); $("a[rel^='prettyPhoto']").prettyPhoto({theme: "facebook"});