mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 18:31:57 +03:00
58 lines
3.0 KiB
Handlebars
58 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-select gh-design-page-preview-mode">
|
|
<OneWaySelect
|
|
@value={{this.themeManagement.previewType}}
|
|
@options={{this.themeManagement.availablePreviewTypes}}
|
|
@optionValuePath="name"
|
|
@optionLabelPath="label"
|
|
@optionTargetPath="name"
|
|
@update={{this.themeManagement.setPreviewType}}
|
|
/>
|
|
{{svg-jar "arrow-down-small"}}
|
|
</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> |