Ghost Logo navigation responds correctly to mobile

closes #3522
- Previously, the logo had a href attribute which was manually kept
from executing on mobile. Slow mobile devices that didn’t fully load
the JS would therefore navigate “desktop style”
- The href attribute is now set after the event handler has been loaded, ensuring correct navigation behaviour.
This commit is contained in:
Felix Rieseberg 2014-08-04 17:21:07 -07:00
parent aea25693e5
commit e2348e6802
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,5 @@
<header id="global-header" class="navbar">
<a class="ghost-logo" {{bind-attr href=ghostPaths.blogRoot title=ghostPaths.blogRoot}} data-off-canvas="left">
<a class="ghost-logo" data-off-canvas="left">
<span class="hidden">Ghost</span>
</a>
<nav id="global-nav" role="navigation">

View File

@ -10,6 +10,7 @@ var ApplicationView = Ember.View.extend({
body.toggleClass('off-canvas');
});
});
$('[data-off-canvas]').attr('href', this.get('controller.ghostPaths.blogRoot'));
// #### Navigating within the sidebar closes it.
$('.js-close-sidebar').on('click', function () {
body.removeClass('off-canvas');