From a20dc08e105e85171bf5466cacb475b3bbcd8820 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Wed, 8 Jun 2011 18:58:00 -0400 Subject: 1. Added support for styled subtitle in header 2. Added javascript detection for placeholder 3. Added backup style for search field with no-placeholder support --- themes/classic/source/_includes/header.html | 3 +++ themes/classic/source/javascripts/octopress.js | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'themes/classic/source') diff --git a/themes/classic/source/_includes/header.html b/themes/classic/source/_includes/header.html index 4e0519e6..e08da6dc 100644 --- a/themes/classic/source/_includes/header.html +++ b/themes/classic/source/_includes/header.html @@ -1 +1,4 @@

{{ site.title }}

+{% if site.subtitle %} +

{{ site.subtitle }}

+{% endif %} diff --git a/themes/classic/source/javascripts/octopress.js b/themes/classic/source/javascripts/octopress.js index 68e5139b..dc391aac 100644 --- a/themes/classic/source/javascripts/octopress.js +++ b/themes/classic/source/javascripts/octopress.js @@ -24,12 +24,17 @@ function addSidebarToggler() { function testFeatures() { var features = ['maskImage']; $(features).map(function(feature){ - if(Modernizr.testAllProps(feature)) { + if (Modernizr.testAllProps(feature)) { $('html').addClass(feature); } else { $('html').addClass('no-'+feature); } }); + if ("placeholder" in document.createElement("input")) { + $('html').addClass('placeholder'); + } else { + $('html').addClass('no-placeholder'); + } } function addDivLines(){ -- cgit v1.2.1