mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 01:41:46 +03:00
15285c1593
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.
39 lines
1.3 KiB
JavaScript
39 lines
1.3 KiB
JavaScript
import {mobileQuery, responsiveAction} from 'ghost/utils/mobile';
|
|
|
|
var PostsView = Ember.View.extend({
|
|
target: Ember.computed.alias('controller'),
|
|
classNames: ['content-view-container'],
|
|
tagName: 'section',
|
|
|
|
mobileInteractions: function () {
|
|
Ember.run.scheduleOnce('afterRender', this, function () {
|
|
var self = this;
|
|
|
|
$(window).resize(function () {
|
|
if (!mobileQuery.matches) {
|
|
self.send('resetContentPreview');
|
|
}
|
|
});
|
|
|
|
// ### 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 () {
|
|
self.send('showContentPreview');
|
|
});
|
|
});
|
|
|
|
// ### Hide content preview
|
|
$('.manage').on('click', '.content-preview .button-back', function (event) {
|
|
responsiveAction(event, '(max-width: 800px)', function () {
|
|
self.send('hideContentPreview');
|
|
});
|
|
});
|
|
});
|
|
}.on('didInsertElement'),
|
|
});
|
|
|
|
export default PostsView;
|