ca5c8862fd
Splits the single hardcoded-feeling course template into hero, credibility, curriculum, and repeat-CTA sections, each rendering only when its front matter fields are set. The enroll form (and its EEC-trigger JS) moves into a reusable partial so it can appear more than once on a page without id collisions. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
44 lines
1.4 KiB
HTML
44 lines
1.4 KiB
HTML
{{ define "main" }}
|
|
<section class="course-hero">
|
|
<h1>{{ .Title }}</h1>
|
|
{{ with .Params.hero_subhead }}<p class="course-subhead">{{ . }}</p>{{ end }}
|
|
{{ with .Params.pitch }}<div class="course-value-prop">{{ . | markdownify }}</div>{{ end }}
|
|
|
|
{{ partial "course-enroll-form.html" (dict "id" "top" "page" .) }}
|
|
|
|
{{ with .Params.social_proof }}<p class="course-social-proof">{{ . }}</p>{{ end }}
|
|
</section>
|
|
|
|
{{ if or .Params.credibility_heading .Params.credibility_bullets }}
|
|
<section class="course-credibility">
|
|
{{ with .Params.credibility_heading }}<h2>{{ . }}</h2>{{ end }}
|
|
{{ with .Params.credibility_bullets }}
|
|
<ul class="course-bullets">
|
|
{{ range . }}<li>{{ . | markdownify }}</li>{{ end }}
|
|
</ul>
|
|
{{ end }}
|
|
</section>
|
|
{{ end }}
|
|
|
|
{{ if or .Params.curriculum_heading .Params.curriculum_items }}
|
|
<section class="course-curriculum">
|
|
{{ with .Params.curriculum_heading }}<h2>{{ . }}</h2>{{ end }}
|
|
{{ with .Params.curriculum_intro }}<p>{{ . }}</p>{{ end }}
|
|
{{ with .Params.curriculum_items }}
|
|
<ol class="course-curriculum-list">
|
|
{{ range . }}
|
|
<li>{{ with .label }}<span class="course-day-label">{{ . }}</span> {{ end }}{{ .text | markdownify }}</li>
|
|
{{ end }}
|
|
</ol>
|
|
{{ end }}
|
|
</section>
|
|
{{ end }}
|
|
|
|
{{ .Content }}
|
|
|
|
<section class="course-repeat-cta">
|
|
{{ with .Params.repeat_cta_heading }}<h2>{{ . }}</h2>{{ end }}
|
|
{{ partial "course-enroll-form.html" (dict "id" "bottom" "page" .) }}
|
|
</section>
|
|
{{ end }}
|