mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 18:31:57 +03:00
94ca66cde5
no issue - when copying the template parts out of `<GhSitePreview>` the template was left pointing to passed in arguments rather than pulling the data from the settings service
59 lines
3.0 KiB
Handlebars
59 lines
3.0 KiB
Handlebars
<section class="gh-canvas flex flex-column h-100">
|
|
<GhCanvasHeader class="gh-canvas-header">
|
|
<h2 class="gh-canvas-title">{{this.config.blogTitle}}</h2>
|
|
<section class="view-actions">
|
|
<div class="gh-contentfilter">
|
|
<span class="gh-select">
|
|
<OneWaySelect
|
|
@value={{this.themeManagement.previewType}}
|
|
@options={{this.themeManagement.availablePreviewTypes}}
|
|
@optionValuePath="name"
|
|
@optionLabelPath="label"
|
|
@optionTargetPath="name"
|
|
@update={{this.themeManagement.setPreviewType}}
|
|
/>
|
|
</span>
|
|
</div>
|
|
|
|
<div class="gh-contentfilter gh-btn-group">
|
|
<button type="button" class="gh-btn gh-design-preview-mode {{if this.isDesktopPreview "gh-btn-group-selected"}}" {{on "click" (fn this.setPreviewSize "desktop")}}><span>{{svg-jar "desktop"}}</span></button>
|
|
<button type="button" class="gh-btn gh-design-preview-mode {{if this.isMobilePreview "gh-btn-group-selected"}}" {{on "click" (fn this.setPreviewSize "mobile")}}><span>{{svg-jar "mobile-phone"}}</span></button>
|
|
</div>
|
|
|
|
<GhTaskButton
|
|
@buttonText="Save changes"
|
|
@task={{this.saveTask}}
|
|
@successText="Saved"
|
|
@runningText="Saving"
|
|
@class="gh-btn gh-btn-primary gh-btn-icon"
|
|
data-test-button="save-settings"
|
|
/>
|
|
</section>
|
|
</GhCanvasHeader>
|
|
|
|
<div class="view-container">
|
|
{{!-- changes only classes between desktop/mobile to avoid re-rendering iframe contents --}}
|
|
<div class="{{if this.isMobilePreview "gh-pe-mobile-container flex justify-center" "gh-browserpreview-previewcontainer"}}">
|
|
{{#if this.isDesktopPreview}}
|
|
<div class="gh-browserpreview-browser">
|
|
<div class="tabs">
|
|
<ul><li></li><li></li><li></li></ul>
|
|
<div>
|
|
{{#if this.settings.icon}}
|
|
<span class="favicon"><img src={{this.settings.icon}} alt="icon"></span>
|
|
{{else}}
|
|
<span class="favicon default">{{svg-jar "default-favicon"}}</span>
|
|
{{/if}}
|
|
<span class="site-title">{{this.settings.title}}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
<div class="{{if this.isMobilePreview "gh-pe-mobile-bezel" "gh-browserpreview-iframecontainer"}}">
|
|
<div class="{{if this.isMobilePreview "gh-pe-mobile-screen"}}">
|
|
<GhHtmlIframe class={{if this.isMobilePreview "gh-post-preview-iframe" "site-frame"}} @html={{this.themeManagement.previewHtml}} />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section> |