diff --git a/ghost/admin/app/models/post.js b/ghost/admin/app/models/post.js index d1f9ef5b53..b2af77acbf 100644 --- a/ghost/admin/app/models/post.js +++ b/ghost/admin/app/models/post.js @@ -35,6 +35,17 @@ var Post = DS.Model.extend(NProgressSaveMixin, ValidationEngine, { return this.get('ghostPaths.url').join(blogUrl, postUrl); }), + previewUrl: Ember.computed('uuid', 'ghostPaths.url', 'config.blogUrl', 'config.routeKeywords.preview', function () { + var blogUrl = this.get('config.blogUrl'), + uuid = this.get('uuid'), + previewKeyword = this.get('config.routeKeywords.preview'); + // New posts don't have a preview + if (!uuid) { + return ''; + } + return this.get('ghostPaths.url').join(blogUrl, previewKeyword, uuid); + }), + scratch: null, titleScratch: null, diff --git a/ghost/admin/app/styles/layouts/editor.scss b/ghost/admin/app/styles/layouts/editor.scss index fba8a7e80d..721dc8d11b 100644 --- a/ghost/admin/app/styles/layouts/editor.scss +++ b/ghost/admin/app/styles/layouts/editor.scss @@ -692,6 +692,13 @@ body.zen { } }//.post-settings-menu +.post-preview-link { + position: absolute; + top: 0; + right: 0; + font-size: 1.3rem; +} + // // Post Settings Menu meta Data diff --git a/ghost/admin/app/templates/post-settings-menu.hbs b/ghost/admin/app/templates/post-settings-menu.hbs index 41fba15ad9..3f8ac005db 100644 --- a/ghost/admin/app/templates/post-settings-menu.hbs +++ b/ghost/admin/app/templates/post-settings-menu.hbs @@ -11,6 +11,11 @@