mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-13 14:39:52 +03:00
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:
parent
aea25693e5
commit
e2348e6802
@ -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">
|
||||
|
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user