mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 01:41:46 +03:00
b3d2fb8b96
refs https://github.com/TryGhost/Team/issues/1001 Our email newsletter preview is rendered inside of an iframe with javascript disabled. When opening links from the preview, the new window/tab inherits this property - which breaks links to twitter.
39 lines
2.0 KiB
Handlebars
39 lines
2.0 KiB
Handlebars
<div class="gh-post-preview-email-container">
|
|
<div class="gh-post-preview-email-mockup">
|
|
<div class="gh-pe-emailclient-sender">
|
|
<p>
|
|
<span class="strong">{{this.config.blogTitle}}</span> <{{full-email-address this.settings.membersFromAddress}}>
|
|
</p>
|
|
<p><span class="dark">To:</span> Jamie Larson <jamie@example.com></p>
|
|
</div>
|
|
<iframe class="gh-pe-iframe" {{did-insert this.renderEmailPreview}} sandbox="allow-same-origin allow-popups allow-popups-to-escape-sandbox"></iframe>
|
|
</div>
|
|
</div>
|
|
<div class="gh-post-preview-email-footer">
|
|
<div class="gh-btn-group mr3">
|
|
<button type="button" class="gh-btn {{if (eq this.memberSegment "status:free") "gh-btn-group-selected"}}" {{on "click" (fn this.changeMemberSegment "status:free")}}><span>Free member</span></button>
|
|
<button type="button" class="gh-btn {{if (eq this.memberSegment "status:-free") "gh-btn-group-selected"}}" {{on "click" (fn this.changeMemberSegment "status:-free")}}><span>Paid member</span></button>
|
|
</div>
|
|
|
|
<div class="gh-post-preview-email-input {{if this.sendPreviewEmailError "error"}}">
|
|
<Input
|
|
@value={{this.previewEmailAddress}}
|
|
class="gh-input gh-post-preview-email-input"
|
|
placeholder="you@yoursite.com"
|
|
aria-invalid={{if this.sendPreviewEmailError "true"}}
|
|
aria-describedby={{if this.sendPreviewEmailError "sendError"}}
|
|
{{on-key "Enter" (perform this.sendPreviewEmailTask)}}
|
|
/>
|
|
{{#if this.sendPreviewEmailError}}
|
|
<div class="error fixed nowrap f8 lh-heading"><span class="response" id="sendError">{{this.sendPreviewEmailError}}</span></div>
|
|
{{/if}}
|
|
</div>
|
|
|
|
<GhTaskButton
|
|
@task={{this.sendPreviewEmailTask}}
|
|
@buttonText="Send test email"
|
|
@successText="Sent"
|
|
@runningText="Sending..."
|
|
@class="gh-btn gh-btn-green gh-btn-icon gh-post-preview-email-trigger"
|
|
/>
|
|
</div> |