diff --git a/ghost/admin/app/routes/design.js b/ghost/admin/app/routes/design.js index 7c98b63957..625d0f4055 100644 --- a/ghost/admin/app/routes/design.js +++ b/ghost/admin/app/routes/design.js @@ -1,10 +1,13 @@ import AuthenticatedRoute from 'ghost-admin/routes/authenticated'; +import {action} from '@ember/object'; import {inject as service} from '@ember/service'; export default class DashboardRoute extends AuthenticatedRoute { @service feature; @service settings; + previewIframe = null; + beforeModel() { super.beforeModel(...arguments); @@ -26,4 +29,18 @@ export default class DashboardRoute extends AuthenticatedRoute { mainClasses: ['gh-main-wide'] }; } + + @action + registerPreviewIframe(element) { + this.previewIframe = element; + } + + @action + replacePreviewContents(html) { + if (this.previewIframe) { + this.previewIframe.contentWindow.document.open(); + this.previewIframe.contentWindow.document.write(html); + this.previewIframe.contentWindow.document.close(); + } + } } diff --git a/ghost/admin/app/styles/layouts/settings.css b/ghost/admin/app/styles/layouts/settings.css index 4e2539d61f..5eb67cd723 100644 --- a/ghost/admin/app/styles/layouts/settings.css +++ b/ghost/admin/app/styles/layouts/settings.css @@ -1318,6 +1318,7 @@ p.theme-validation-details { margin: 32px 68px 68px; } +.gh-design-settings-previewcontainer .site-frame, .gh-branding-settings-previewcontainer .site-frame, .gh-launch-wizard-preview { width: 133.33333%; @@ -1390,6 +1391,26 @@ p.theme-validation-details { /* Design (Labs) /* ---------------------------------------------------- */ +.gh-design-settings-left { + flex-grow: 1; + background: none; +} + +.gh-design-settings-right { + flex-grow: 3; + display: flex; + flex-direction: column; + align-items: stretch; + height: 50vh; + min-height: 480px; + margin-left: 80px; +} + +.gh-expandable-block.gh-active-theme { + border: 1px solid var(--list-color-divider); + border-radius: var(--border-radius); +} + .gh-design-settings-tabs { width: 100%; margin-bottom: 48px; diff --git a/ghost/admin/app/templates/settings.hbs b/ghost/admin/app/templates/settings.hbs index 9300d9a31b..a9d09bc845 100644 --- a/ghost/admin/app/templates/settings.hbs +++ b/ghost/admin/app/templates/settings.hbs @@ -20,7 +20,7 @@ {{svg-jar "paint-palette"}}
Customize the way your site looks
+Customize your site and manage themes