mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 15:12:58 +03:00
Merge pull request #3749 from novaugust/ghost-logo-link
Update ghost-logo, amend the amdendments, death to jQuery
This commit is contained in:
commit
ec05c703ec
@ -1,9 +1,9 @@
|
||||
<header id="global-header" class="navbar">
|
||||
|
||||
<button {{action "toggleSidebarOrGoHome" target="view"}} class="ghost-logo ghost-logo-button">
|
||||
<button {{action "toggleSidebar" target="view"}} class="ghost-logo ghost-logo-button">
|
||||
<span class="hidden">Ghost</span>
|
||||
</button>
|
||||
<a class="ghost-logo ghost-logo-link">
|
||||
<a class="ghost-logo ghost-logo-link" {{bind-attr href=view.blogRoot}}>
|
||||
<span class="hidden">Ghost</span>
|
||||
</a>
|
||||
|
||||
|
@ -1,28 +1,17 @@
|
||||
var ApplicationView = Ember.View.extend({
|
||||
blogRoot: Ember.computed.alias('controller.ghostPaths.blogRoot'),
|
||||
|
||||
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) {
|
||||
toggleSidebar: function () {
|
||||
$('body').toggleClass('off-canvas');
|
||||
}
|
||||
else {
|
||||
window.location = this.get('controller.ghostPaths').blogRoot;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -15,9 +15,6 @@ var PostsView = Ember.View.extend({
|
||||
}
|
||||
});
|
||||
|
||||
// ### Add the blog URL to the <a> version of the ghost logo
|
||||
$('.ghost-logo-link').attr('href', this.get('controller.ghostPaths').blogRoot);
|
||||
|
||||
// ### Show content preview when swiping left on content list
|
||||
$('.manage').on('click', '.content-list ol li', function (event) {
|
||||
responsiveAction(event, '(max-width: 800px)', function () {
|
||||
|
Loading…
Reference in New Issue
Block a user