mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-16 20:43:01 +03:00
a11e25c12b
Amends #3736, references #3623 With `button.ghost-logo`, there's no `href`, so cannot be opened in a new window. This changes it back to an anchor and appends the blog URL to a href attribute. Win! Bumps Ghost-UI version to 0.8.13 bring in related CSS changes.
30 lines
924 B
JavaScript
30 lines
924 B
JavaScript
var ApplicationView = Ember.View.extend({
|
|
|
|
setupCloseSidebar: function () {
|
|
|
|
// #### Navigating within the sidebar closes it.
|
|
$(document).on('click', '.js-close-sidebar', function () {
|
|
$('body').removeClass('off-canvas');
|
|
});
|
|
|
|
// #### Add the blog URL to the <a> version of the ghost logo
|
|
$('.ghost-logo-link').attr('href', this.get('controller.ghostPaths').blogRoot);
|
|
|
|
}.on('didInsertElement'),
|
|
|
|
actions: {
|
|
//Sends the user to the front if they're not on mobile,
|
|
//otherwise toggles the sidebar.
|
|
toggleSidebarOrGoHome: function () {
|
|
if (window.matchMedia('(max-width: 650px)').matches) {
|
|
$('body').toggleClass('off-canvas');
|
|
}
|
|
else {
|
|
window.location = this.get('controller.ghostPaths').blogRoot;
|
|
}
|
|
}
|
|
}
|
|
});
|
|
|
|
export default ApplicationView;
|