Add all jams index

This commit is contained in:
Ben Visness 2023-04-22 11:26:07 -05:00
parent faac05a3a8
commit e4dd15d248
10 changed files with 81 additions and 5 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 KiB

View File

@ -49,6 +49,13 @@ func BuildWhenIsIt() string {
return Url("/whenisit", nil)
}
var RegexJamsIndex = regexp.MustCompile("^/jams$")
func BuildJamsIndex() string {
defer CatchPanic()
return Url("/jams", nil)
}
var RegexJamIndex = regexp.MustCompile("^/jam$")
func BuildJamIndex() string {

View File

@ -4,7 +4,7 @@
<div class="ph3 ph0-ns">
<h2>Fishbowls</h2>
<p>Every two months on the Discord, we host a <b>fishbowl</b>: a panel conversation where a select few community members can discuss a topic in detail. Fishbowls give us the opportunity to discuss difficult subjects with more nuance and detail than you can find anywhere else on the Internet. In many ways, they're a distillation of everything the network is about.</p>
<p>Every so often on the Discord, we host a <b>fishbowl</b>: a panel conversation where a select few community members can discuss a topic in detail. Fishbowls give us the opportunity to discuss difficult subjects with more nuance and detail than you can find anywhere else on the Internet. In many ways, they're a distillation of everything the network is about.</p>
<p>This is an archive of those conversations. If you would like to catch one live, <a href="https://discord.gg/hmn" target="_blank">join the Discord!</a></p>

View File

@ -71,13 +71,14 @@
<a href="{{ .Header.ProjectIndexUrl }}">Projects</a>
</div>
<div class="root-item">
<a aria-expanded="false" aria-controls="media-submenu" class="menu-dropdown-js" href="#">
Media <div class="dib svgicon ml1">{{ svg "chevron-down-thick" }}</div>
<a aria-expanded="false" aria-controls="events-submenu" class="menu-dropdown-js" href="#">
Events <div class="dib svgicon ml1">{{ svg "chevron-down-thick" }}</div>
</a>
<div class="submenu b--theme-dark" id="media-submenu">
<div class="submenu b--theme-dark" id="events-submenu">
<a href="{{ .Header.JamsUrl }}">Jams</a>
<a href="{{ .Header.ConferencesUrl }}">Conferences</a>
<a href="{{ .Header.PodcastUrl }}">Podcast</a>
<a href="{{ .Header.FishbowlUrl }}">Fishbowls</a>
<a href="{{ .Header.PodcastUrl }}">Podcast</a>
<a href="https://guide.handmade-seattle.com/s" target="_blank">Handmade Dev Show</a>
</div>
</div>

View File

@ -0,0 +1,41 @@
{{ template "base.html" . }}
{{ define "extrahead" }}
<style>
.jam-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
}
</style>
{{ end }}
{{ define "content" }}
<div class="ph3 ph0-ns">
<h2>Jams</h2>
<p>Since 2020, we have been running programming jams to encourage community members to explore new ideas and start projects. You can view all the past submissions and results here.</p>
<div class="jam-grid g3">
<a href="{{ .VJ2023Url }}">
<div class="br2 overflow-hidden flex">
<img src="{{ static "visjam2023/TwitterCard.png" }}">
</div>
</a>
<a href="{{ .WRJ2022Url }}">
<div class="br2 overflow-hidden flex">
<img src="{{ static "wheeljam2022/TwitterCard.png" }}">
</div>
</a>
<a href="{{ .WRJ2021Url }}">
<div class="br2 overflow-hidden flex">
<img src="{{ static "wheeljam2021/TwitterCard.png" }}">
</div>
</a>
<a href="{{ .LispJamUrl }}" class="relative">
<div class="br2 overflow-hidden absolute absolute--fill flex flex-column flex justify-center items-center f3 c--dim">
<h3>LISP Jam</h3>
</div>
</a>
</div>
</div>
{{ end }}

View File

@ -52,6 +52,7 @@ type Header struct {
FishbowlUrl string
ForumsUrl string
ConferencesUrl string
JamsUrl string
EducationUrl string
Project *ProjectHeader

View File

@ -76,6 +76,7 @@ func getBaseData(c *RequestContext, title string, breadcrumbs []templates.Breadc
FishbowlUrl: hmnurl.BuildFishbowlIndex(),
ForumsUrl: hmnurl.HMNProjectContext.BuildForum(nil, 1),
ConferencesUrl: hmnurl.BuildConferences(),
JamsUrl: hmnurl.BuildJamsIndex(),
EducationUrl: hmnurl.BuildEducationIndex(),
},
Footer: templates.Footer{

View File

@ -12,6 +12,29 @@ import (
"git.handmade.network/hmn/hmn/src/utils"
)
func JamsIndex(c *RequestContext) ResponseData {
var res ResponseData
type TemplateData struct {
templates.BaseData
LispJamUrl string
WRJ2021Url string
WRJ2022Url string
VJ2023Url string
}
res.MustWriteTemplate("jams_index.html", TemplateData{
BaseData: getBaseDataAutocrumb(c, "Jams"),
LispJamUrl: hmnurl.BuildFishbowl("lisp-jam"),
WRJ2021Url: hmnurl.BuildJamIndex2021(),
WRJ2022Url: hmnurl.BuildJamIndex2022(),
VJ2023Url: hmnurl.BuildJamIndex2023_Visibility(),
}, c.Perf)
return res
}
func JamIndex2023_Visibility(c *RequestContext) ResponseData {
var res ResponseData

View File

@ -55,6 +55,8 @@ func NewWebsiteRoutes(conn *pgxpool.Pool) http.Handler {
hmnOnly.GET(hmnurl.RegexProjectSubmissionGuidelines, ProjectSubmissionGuidelines)
hmnOnly.GET(hmnurl.RegexConferences, Conferences)
hmnOnly.GET(hmnurl.RegexWhenIsIt, WhenIsIt)
hmnOnly.GET(hmnurl.RegexJamsIndex, JamsIndex)
hmnOnly.GET(hmnurl.RegexJamIndex, func(c *RequestContext) ResponseData {
return c.Redirect(hmnurl.BuildJamIndex2023_Visibility(), http.StatusFound)
})