Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

1.0 KB
Raw Blame
{{ define "template-preview" -}}
<dialog class="preview-modal" x-ref="previewDialog" @close="onPreviewClose">
	<div class="dialog-card">
		<header class="dialog-head hstack justify-between">
			<h4 class="dialog-title" x-text="preview.title"></h4>
		</header>
		<section class="dialog-body preview" :aria-busy="preview.loading">
			<form method="post" x-ref="previewForm" :action="preview.url" target="template-preview-frame">
				<input type="hidden" name="template_type" :value="preview.templateType" />
				<input type="hidden" name="body" :value="preview.body" />
			</form>
			<iframe id="iframe" name="template-preview-frame" x-ref="previewFrame" sandbox="allow-scripts allow-popups allow-popups-to-escape-sandbox" title="{{ .L.T "globals.buttons.preview" }}" @load="preview.loading = false"></iframe>
		</section>
		<footer class="dialog-foot align-right">
			<button type="button" class="outline" autofocus @click="$refs.previewDialog.close()">{{ .L.T "globals.buttons.close" }}</button>
		</footer>
	</div>
</dialog>
{{- end }}