diff --git a/assets/css/main.css b/assets/css/main.css index f7f1bb6..efa3342 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -251,6 +251,15 @@ input:focus, textarea:focus { color: var(--fg-muted); margin-top: 0; } +.course-hero-image { + float: none; + display: block; + width: 100%; + max-width: 320px; + height: auto; + margin: 1.5rem auto; + border-radius: var(--radius); +} .course-value-prop { font-size: 1.05rem; margin: 1.5rem 0; diff --git a/content/gift/index.md b/content/gift/index.md index c8f6750..f5f33f4 100644 --- a/content/gift/index.md +++ b/content/gift/index.md @@ -7,9 +7,15 @@ eec_slug: "three-steps-find-your-right-readers" # Optional italic line under the title, for handling an objection up front. hero_subhead: "Three concrete steps to find the readers who actually want your stories — free PDF, no fluff, sent straight to your inbox." +# Optional image shown in the hero, below the subhead. +hero_image: "/images/gift-cover.png" + # Optional label on every "Send me day one" button across the page. cta_text: "Send me the PDF" # Optional heading above the repeated signup form at the bottom of the page. repeat_cta_heading: "Ready to find your right readers?" + +# Optional override of the enroll form's post-submit message (rendered as markdown). +success_message: "Check your inbox — we've sent your PDF. Can't find it? [Grab it here](/gift-thanks)." --- diff --git a/layouts/courses/single.html b/layouts/courses/single.html index 08712f6..dbc7e2a 100644 --- a/layouts/courses/single.html +++ b/layouts/courses/single.html @@ -2,6 +2,7 @@

{{ .Title }}

{{ with .Params.hero_subhead }}

{{ . }}

{{ end }} + {{ with .Params.hero_image }}{{ end }} {{ partial "course-enroll-form.html" (dict "id" "top" "page" .) }} diff --git a/layouts/partials/course-enroll-form.html b/layouts/partials/course-enroll-form.html index 5cc9253..d0557a0 100644 --- a/layouts/partials/course-enroll-form.html +++ b/layouts/partials/course-enroll-form.html @@ -18,6 +18,7 @@ var form = document.getElementById("enroll-form-{{ $id }}"); var status = document.getElementById("enroll-status-{{ $id }}"); var slug = {{ $page.Params.eec_slug }}; + var successMessage = {{ ($page.Params.success_message | default "Check your inbox — let us know you're ready and we'll get started.") | markdownify }}; form.addEventListener("submit", function (e) { e.preventDefault(); if (form.website.value) return; // honeypot @@ -32,7 +33,7 @@ if (res.ok) { form.reset(); form.hidden = true; - status.textContent = "Check your inbox — let us know you're ready and we'll get started."; + status.innerHTML = successMessage; return; } return res.text().then(function (msg) { diff --git a/static/images/gift-cover.png b/static/images/gift-cover.png new file mode 100644 index 0000000..3d8597f Binary files /dev/null and b/static/images/gift-cover.png differ