mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 07:09:48 +03:00
e932af26a7
refs https://github.com/TryGhost/Team/issues/451 Start of new post preview prototype. - adds preview button next to publish button - opens new combined preview modal with desktop/email/social tabs - desktop preview shows front-end preview url in iframe - email preview fetches preview data as per the older email preview modal - social preview to come later
27 lines
1.3 KiB
Handlebars
27 lines
1.3 KiB
Handlebars
<div class="flex flex-column h-100">
|
|
<header class="modal-header gh-pe-header gh-pe-header-border" data-test-modal="preview-email" style="display:flex">
|
|
<h2 class="f6 fw6">Preview post</h2>
|
|
<div class="gh-contentfilter gh-btn-group gh-pe-btn-group" style="display:flex;flex-grow:1;justify-content:center">
|
|
<button type="button" class="gh-btn {{if (eq this.tab "desktop") "gh-btn-group-selected"}}" {{on "click" (fn this.changeTab "desktop")}}><span>Desktop</span></button>
|
|
<button type="button" class="gh-btn {{if (eq this.tab "email") "gh-btn-group-selected"}}" {{on "click" (fn this.changeTab "email")}}><span>Email</span></button>
|
|
<button type="button" class="gh-btn {{if (eq this.tab "social") "gh-btn-group-selected"}}" {{on "click" (fn this.changeTab "social")}}><span>Social</span></button>
|
|
</div>
|
|
<div class="gh-pe-close">
|
|
<button class="close" title="Close" {{on "click" this.close}}>
|
|
{{svg-jar "close"}}
|
|
</button>
|
|
</div>
|
|
</header>
|
|
|
|
{{#if (eq this.tab "desktop")}}
|
|
<ModalPostPreview::Desktop @post={{@model}} />
|
|
{{/if}}
|
|
|
|
{{#if (eq this.tab "email")}}
|
|
<ModalPostPreview::Email @post={{@model}} />
|
|
{{/if}}
|
|
|
|
{{#if (eq this.tab "social")}}
|
|
<ModalPostPreview::Social @post={{@model}} />
|
|
{{/if}}
|
|
</div> |