mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05: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
d4626ede74
commit
39c3127bac
2 changed files with 2 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
||||||
<header id="global-header" class="navbar">
|
<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>
|
<span class="hidden">Ghost</span>
|
||||||
</a>
|
</a>
|
||||||
<nav id="global-nav" role="navigation">
|
<nav id="global-nav" role="navigation">
|
||||||
|
|
|
@ -10,6 +10,7 @@ var ApplicationView = Ember.View.extend({
|
||||||
body.toggleClass('off-canvas');
|
body.toggleClass('off-canvas');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
$('[data-off-canvas]').attr('href', this.get('controller.ghostPaths.blogRoot'));
|
||||||
// #### Navigating within the sidebar closes it.
|
// #### Navigating within the sidebar closes it.
|
||||||
$('.js-close-sidebar').on('click', function () {
|
$('.js-close-sidebar').on('click', function () {
|
||||||
body.removeClass('off-canvas');
|
body.removeClass('off-canvas');
|
||||||
|
|
Loading…
Add table
Reference in a new issue