diff --git a/ghost/admin/app/controllers/application.js b/ghost/admin/app/controllers/application.js index a2dce5e9f6..1e03bd65a1 100644 --- a/ghost/admin/app/controllers/application.js +++ b/ghost/admin/app/controllers/application.js @@ -9,7 +9,12 @@ export default Controller.extend({ settings: service(), ui: service(), - showNavMenu: computed('currentPath', 'session.{isAuthenticated,user.isFulfilled}', function () { + showNavMenu: computed('currentPath', 'session.{isAuthenticated,user.isFulfilled}', 'ui.isFullscreen', function () { + // if we're in fullscreen mode don't show the nav menu + if (this.ui.isFullscreen) { + return false; + } + // we need to defer showing the navigation menu until the session.user // promise has fulfilled so that gh-user-can-admin has the correct data if (!this.get('session.isAuthenticated') || !this.get('session.user.isFulfilled')) { diff --git a/ghost/admin/app/routes/editor.js b/ghost/admin/app/routes/editor.js index c8d8a666a7..979be6ad98 100644 --- a/ghost/admin/app/routes/editor.js +++ b/ghost/admin/app/routes/editor.js @@ -13,11 +13,19 @@ export default AuthenticatedRoute.extend(ShortcutsRoute, { feature: service(), notifications: service(), userAgent: service(), + ui: service(), classNames: ['editor'], shortcuts: generalShortcuts, titleToken: 'Editor', + activate() { + this._super(...arguments); + if (this.feature.koenigEditor) { + this.ui.set('isFullscreen', true); + } + }, + setupController() { this._super(...arguments); @@ -49,6 +57,11 @@ export default AuthenticatedRoute.extend(ShortcutsRoute, { } }, + deactivate() { + this._super(...arguments); + this.ui.set('isFullscreen', false); + }, + actions: { save() { this._blurAndScheduleAction(function () { diff --git a/ghost/admin/app/styles/layouts/editor.css b/ghost/admin/app/styles/layouts/editor.css index e63423c0f8..1ec049d7a1 100644 --- a/ghost/admin/app/styles/layouts/editor.css +++ b/ghost/admin/app/styles/layouts/editor.css @@ -303,10 +303,9 @@ .gh-editor-header-small { z-index: 100; - height: 43px; + height: 48px; padding: 0; padding-left: 15px; - border-bottom: var(--lightgrey) 1px solid; background-color: #fff; margin: 0; border-radius: 0; diff --git a/ghost/admin/app/templates/editor.hbs b/ghost/admin/app/templates/editor.hbs index 8dfd341ebf..47e02fe9b4 100644 --- a/ghost/admin/app/templates/editor.hbs +++ b/ghost/admin/app/templates/editor.hbs @@ -6,20 +6,28 @@ as |editor| }}
-
-
- +
+ {{#if ui.isFullscreen}} +
+ {{#link-to "posts" classNames="blue link fw4 flex items-center"}} + {{svg-jar "arrow-left" class="w3 fill-blue mr1 nudge-right--2"}} + Stories + {{/link-to}} +
+ {{/if}} +
+ {{gh-editor-post-status post=post isSaving=(or autosave.isRunning saveTasks.isRunning) }} -
{{#gh-scheduled-post-countdown post=post as |post countdown|}} -
{{#if infoMessage}} @@ -182,7 +190,7 @@ {{#if wordCount}}
- + {{pluralize wordCount.wordCount "word"}}