{{ template "jam_2024_learning_base.html" . }}

{{ define "content-top" }}
	{{ if or (gt .DaysUntilStart 0) (eq .DaysUntilEnd 0) }}
		{{ template "jam_2024_lj_bannerbig.html" . }}
	{{ else }}
		{{ template "jam_2024_lj_bannersmall.html" . }}
	{{ end }}
{{ end }}

{{ define "content" }}
<div class="mw7 margin-center flex flex-column">
	{{ if gt .DaysUntilStart 0 }}
		{{ template "before-jam" . }}
	{{ else if gt .DaysUntilEnd 0 }}
		{{ template "during-jam" . }}
	{{ else }}
		{{ template "after-jam" . }}
	{{ end }}

	<div>
		<div class="mv5 h3 fill-current link--white">
			<a href="{{ .Header.HMNHomepageUrl }}">{{ svg "hmn_circuit" }}</a>
		</div>
	</div>
</div>
{{ end }}

{{ define "before-jam" }}
	{{ template "jam_2024_lj_guidelines.html" . }}
{{ end }}

{{ define "during-jam" }}
	{{ if .Projects.Projects }}
		{{ template "jam_2024_lj_description.html" . }}
		{{ if .TimelineItems }}
			<div class="ph3 pv4 bb b--rich-gray">
				<h2 class="c--theme-gradient-light">Recent updates</h2>
				<p>
					See what community members are learning about their topics. You can share your own updates via your <a href="{{ or .SubmittedProjectUrl .NewProjectUrl }}">project page</a> or using the <b>!til</b> command on Discord.
				</p>
				<div class="flex flex-column g2 mt3">
					{{ template "jam_2024_lj_feeditems.html" .TimelineItems }}
					<a href="{{ .JamFeedUrl }}" class="link--white tc pa1">
						See all updates<div class="dib svgicon f8 ml1">{{ svg "chevron-right" }}</div>
					</a>
				</div>
			</div>
		{{ end }}
		<div class="ph3 pv4 bb b--rich-gray">
			<h2 class="c--theme-gradient-light mb3">Projects</h2>
			{{ template "jam_2024_lj_projects.html" .Projects }}
		</div>
	{{ else }}
		{{ template "jam_2024_lj_guidelines.html" . }}
	{{ end }}
{{ end }}

{{ define "after-jam" }}
	{{ template "jam_2024_lj_description.html" . }}
	<div class="ph3 pv4 bb b--rich-gray">
		<h2 class="dib c--theme-gradient-light">Recap show</h2>
		<p>
			Watch the recap show celebrating all the submissions:
		</p>
		<div class="mt3" style="aspect-ratio: 16 / 9;">
			<iframe width="100%" height="100%" src="https://www.youtube-nocookie.com/embed/MCrt472DkxE?si=PGWFnM8rK4GqCjH7" title="HMN Learning Jam 2024 Recap Stream" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
		</div>
	</div>
	<div class="ph3 pv4 bb b--rich-gray">
		<div class="flex justify-between items-baseline">
			<h2 class="c--theme-gradient-light mb0">Submitted projects</h2>
			<a href="{{ .JamFeedUrl }}" class="link--white tc">
				See all updates<div class="dib svgicon f8 ml1">{{ svg "chevron-right" }}</div>
			</a>
		</div>
		<div class="mt3">
			{{ template "jam_2024_lj_projects.html" .Projects }}
		</div>
	</div>
{{ end }}
