2021-06-06 23:48:43 +00:00
{{ template "base.html" . }}
2022-08-02 19:56:47 +00:00
{{ define "extrahead" }}
< script src = "{{ static " js / carousel . js " } } " > < / script >
{{ end }}
2023-09-25 07:40:45 +00:00
{{ define "all_projects" }}
2021-11-10 05:21:19 +00:00
< div >
2023-09-25 07:40:45 +00:00
{{ with .OfficialProjects }}
2022-08-02 19:56:47 +00:00
< div class = "carousel-container project-carousel mw-100 mv2 mv3-ns margin-center dn db-ns" >
2021-07-08 07:40:30 +00:00
< div class = "carousel pa3 h5 overflow-hidden bg--dim br2-ns" >
2021-11-10 05:21:19 +00:00
{{ range $index, $project := . }}
2023-09-25 07:40:45 +00:00
< div class = "carousel-item flex pv3 pl3 w-100 h-100 bg--dim items-center {{ if eq $index 0 }}active{{ end }}" >
2021-11-10 05:21:19 +00:00
< div class = "flex-grow-1 pr3 relative flex flex-column h-100 justify-center" >
< a href = "{{ $project.Url }}" >
< h3 > {{ $project.Name }}< / h3 >
< / a >
< div class = "carousel-description" >
{{ $project.ParsedDescription }}
2021-06-06 23:48:43 +00:00
< / div >
2021-11-10 05:21:19 +00:00
< div class = "carousel-fade" > < / div >
2021-06-06 23:48:43 +00:00
< / div >
2021-11-10 05:21:19 +00:00
< div class = "flex-shrink-0 order-0 order-1-ns" >
< a href = "{{ $project.Url }}" >
< div class = "image bg-center cover w5 h5 br2" style = "background-image:url({{ $project.Logo }})" > < / div >
< / a >
2021-06-06 23:48:43 +00:00
< / div >
2021-11-10 05:21:19 +00:00
< / div >
{{ end }}
2021-06-06 23:48:43 +00:00
< / div >
2022-08-02 19:56:47 +00:00
< div class = "carousel-buttons pv2" > < / div >
2021-06-06 23:48:43 +00:00
< / div >
{{ end }}
2023-09-25 07:40:45 +00:00
< div class = "flex flex-column g3" >
2023-09-25 15:02:34 +00:00
{{ if .CurrentJamProjects }}
< div class = "ph3 pt3 bg--dim br2 flex flex-column" >
< h2 > {{ template "jam_name" .CurrentJamSlug }}< / h2 >
< p > These projects are submissions to the {{ template "jam_name" .CurrentJamSlug }}, which is happening < b > right now!< / b > < a href = "{{ .CurrentJamLink }}" > Learn more »< / a >
< div class = "grid grid-1 grid-2-ns g3" >
{{ range .CurrentJamProjects }}
{{ template "project_card.html" projectcarddata . "" }}
{{ end }}
< / div >
< a href = "{{ .CurrentJamProjectsLink }}" class = "pa3 tc" > See more »< / a >
< / div >
{{ end }}
2023-09-25 07:40:45 +00:00
{{ if .OfficialProjects }}
< div class = "ph3 pt3 bg--dim br2 flex flex-column" >
< h2 > Official Projects< / h2 >
< div class = "grid grid-1 grid-2-ns g3" >
{{ range .OfficialProjects }}
{{ template "project_card.html" projectcarddata . "" }}
{{ end }}
2021-11-06 20:25:31 +00:00
< / div >
2023-09-25 07:40:45 +00:00
< a href = "{{ .OfficialProjectsLink }}" class = "pa3 tc" > See more »< / a >
2021-06-06 23:48:43 +00:00
< / div >
2023-09-25 07:40:45 +00:00
{{ end }}
{{ if .PersonalProjects }}
< div class = "ph3 pt3 bg--dim br2 flex flex-column" >
< h2 > Personal Projects< / h2 >
2023-09-25 15:02:34 +00:00
< p > Many community members have projects of their own. Want to join them? < a href = "{{ .CreateProjectLink }}" > Create your own.< / a > < / p >
2023-09-25 07:40:45 +00:00
< div class = "grid grid-1 grid-2-ns g3" >
{{ range .PersonalProjects }}
2021-11-10 05:21:19 +00:00
{{ template "project_card.html" projectcarddata . "" }}
2023-09-25 07:40:45 +00:00
{{ end }}
< / div >
< a href = "{{ .PersonalProjectsLink }}" class = "pa3 tc" > See more »< / a >
2021-06-06 23:48:43 +00:00
< / div >
2023-09-25 07:40:45 +00:00
{{ end }}
{{ if .PreviousJamProjects }}
< div class = "ph3 pt3 bg--dim br2 flex flex-column" >
2023-09-25 15:02:34 +00:00
< h2 > {{ template "jam_name" .PreviousJamSlug }}< / h2 >
< p > The following projects were submissions to our most recent jam. < a href = "{{ .PreviousJamLink }}" > Learn more »< / a > < / p >
2023-09-25 07:40:45 +00:00
< div class = "grid grid-1 grid-2-ns g3" >
{{ range .PreviousJamProjects }}
2021-11-10 05:21:19 +00:00
{{ template "project_card.html" projectcarddata . "" }}
2023-09-25 07:40:45 +00:00
{{ end }}
< / div >
2023-09-25 15:02:34 +00:00
< a href = "{{ .PreviousJamProjectsLink }}" class = "pa3 tc" > See more »< / a >
2021-06-06 23:48:43 +00:00
< / div >
2023-09-25 07:40:45 +00:00
{{ end }}
2021-06-06 23:48:43 +00:00
< / div >
< / div >
< script >
2022-08-02 20:14:29 +00:00
initCarousel(document.querySelector('.project-carousel'), {
durationMS: 10000,
});
2021-06-06 23:48:43 +00:00
< / script >
{{ end }}
2023-09-25 07:40:45 +00:00
{{ define "single_category" }}
2023-09-25 15:02:34 +00:00
{{ if eq .Category "official" }}
< h2 > Official Projects< / h2 >
{{ else if eq .Category "personal" }}
< h2 > Personal Projects< / h2 >
< p > Many community members have projects of their own. Want to join them? < a href = "{{ .CreateProjectLink }}" > Create your own.< / a > < / p >
{{ else }}
{{/* Here we are assuming everything else is a jam. */}}
< h2 > {{ template "jam_name" .Category }}< / h2 >
< p > The following projects were submissions to the {{ template "jam_name" .Category }}. < a href = "{{ .PageJamLink }}" > Learn more »< / a > < / p >
{{ end }}
2023-09-25 07:40:45 +00:00
< div class = "bg--dim-ns br2" >
2023-09-25 15:02:34 +00:00
{{ if gt .Pagination.Total 1 }}
< div class = "optionbar pv2 ph3" >
< div class = "options" > < / div >
< div class = "options" >
{{ template "pagination.html" .Pagination }}
< / div >
2023-09-25 07:40:45 +00:00
< / div >
2023-09-25 15:02:34 +00:00
{{ end }}
2023-09-25 07:40:45 +00:00
< div class = "projectlist pa3 grid grid-1 grid-2-ns g3" >
{{ range .PageProjects }}
{{ template "project_card.html" projectcarddata . "" }}
{{ end }}
< / div >
2023-09-25 15:02:34 +00:00
{{ if gt .Pagination.Total 1 }}
< div class = "optionbar bottom pv2 ph3" >
< div class = "options order-1" > < / div >
< div class = "options order-0 order-last-ns" > {{ template "pagination.html" .Pagination }}< / div >
< / div >
{{ end }}
2023-09-25 07:40:45 +00:00
< / div >
{{ end }}
2023-09-25 15:02:34 +00:00
{{ define "jam_name" }}
{{- if eq . "2022" -}}
2022 Wheel Reinvention Jam
{{- else if eq . "2023" -}}
2023 Wheel Reinvention Jam
{{- else if eq . "visibility-2023" -}}
2023 Visibility Jam
2024-03-13 04:20:35 +00:00
{{- else if eq . "learning-2024" -}}
2024 Learning Jam
2023-09-25 15:02:34 +00:00
{{- else -}}
???
{{- end -}}
{{ end }}
2023-09-25 07:40:45 +00:00
{{ define "content" }}
{{ if .AllProjects }}
{{ template "all_projects" . }}
{{ else }}
{{ template "single_category" . }}
{{ end }}
{{ end }}