There's a few issues going on here in <= ie8 as I found with my octopress site.
(I'm using Octopress v2.0 as cloned from the master branch on March-11-2013)
- the site uses html5 tags
- the upgrade to Modernizr 2.6 drops respond.js which means the site always looks like the mobile version
- and the navigate dropdown labels don't work in any ie versions
So, The following worked for me on my site:
Add
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<script src="{{ root_url }}/javascripts/libs/respond.min.js"></script>
<![endif]-->
to source/_includes/head.html
before the </head>
tag
Get the respond.min.js
file
git clone https://github.com/scottjehl/Respond.git
and put it in source/javascripts/libs
This should fix the styling and media query problem for <= ie8
To fix the navigate drop down will need to fix the use of link.text attribute in octopress.js. The version of octopress I cloned includes jquery so:
in source/javascripts/octopress.js
make the changes to getNav() as indicated below, replacing link.text
with $(link).text()
as IE uses innerText rather than text attribute on the links.
Heres the change set diff:
@@ -3,10 +3,10 @@
mobileNav.children('select').append('<option value="">Navigate…</option>');
$('ul[role=main-navigation]').addClass('main-navigation');
$('ul.main-navigation a').each(function(i, link) {
- mobileNav.children('select').append('<option value="'+link.href+'">» '+link.text+'</option>');
+ mobileNav.children('select').append('<option value="'+link.href+'">» '+$(link).text()+'</option>');
});
$('ul.subscription a').each(function(i, link) {
- mobileNav.children('select').append('<option value="'+link.href+'">» '+link.text+'</option>');
+ mobileNav.children('select').append('<option value="'+link.href+'">» '+$(link).text()+'</option>');
});
mobileNav.children('select').bind('change', function(event) {
if (event.target.value) { window.location.href = event.target.value; }
The octopress issue tracking is closed on github for the moment so some or all of these things will hopefully be fixed by the next release.