Reputation: 299
I have re-built my web site using Ocopress. I found it really great for building static site!
BUT the problem now is - that when I try to see in in Internet Explorer 8 - it has a "Mobile" look! I mean - that IE8 is thought to be mobile. And it's not. Al least not for me...
In addition - the "navigate" drop-down has "undefined" entries.
I use IE8 from time to time at my work PC (even though I prefer Firefox and Chrome / Chromium).
See the image I'm attaching - My Octopress site with IE8. [1]
Compare to how my Octopress site looks in Firefox (looks good!): [2]
Compare it to how my Octopress site looks in Google Chrome (also good!)
My site on IE8 (not good):
http://www.flickr.com/photos/meorero/8657827234/
Firefox (good): http://www.flickr.com/photos/meorero/8656722709/
Upvotes: 0
Views: 284
Reputation: 11
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)
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.
Upvotes: 1
Reputation: 299
Here is what I did - this seems to work for Desktop browsers - including IE8 !!:
In ./source/_includes/head.html
Deleted this:
<!DOCTYPE html>
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en">
<!--<![endif]-->
<head>
And put this:
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
<head>
Upvotes: 0