Add Conferences Page (#75)

This PR implements the conferences page.

![image](/attachments/fe7b8df7-0833-4b5b-9f61-a9558b70a98f)

![image](/attachments/10f380d6-81ed-4850-87c4-70a84d31e26b)

closes #69

Co-authored-by: Allan Regush <17693494+AllanRegush@users.noreply.github.com>
Reviewed-on: #75
Co-authored-by: AllanRegush <allan@allanregush.com>
Co-committed-by: AllanRegush <allan@allanregush.com>
This commit is contained in:
AllanRegush 2022-07-26 15:07:57 +00:00 committed by bvisness
parent 12d2fab1b8
commit cc731d77a6
7 changed files with 35 additions and 0 deletions

View File

@ -173,6 +173,13 @@ func BuildProjectSubmissionGuidelines() string {
return Url("/project-guidelines", nil)
}
var RegexConferences = regexp.MustCompile("^/conferences$")
func BuildConferences() string {
defer CatchPanic()
return Url("/conferences", nil)
}
/*
* User
*/

View File

@ -0,0 +1,18 @@
{{ template "base.html" . }}
{{ define "content" }}
<div class="center-layout mw7 mv3 ph3 ph0-ns post-content">
<div class="bg--card pa3 mb2 br3">
<a href="https://handmadehero.org/conference">
<h2>Handmade Con</h2>
<p>The original Handmade Conference ran by Casey Muratori</p>
</a>
</div>
<div class="bg--card pa3 mb2 br3">
<a href="https://handmade-seattle.com/">
<h2>Handmade Seattle</h2>
<p>The spirtual successor of Handmade Con. An Independing Systems Programming Conference ran by Abner Coimbre</p>
</a>
</div>
</div>
{{ end }}

View File

@ -75,6 +75,7 @@
<a href="{{ .Header.PodcastUrl }}">Podcast</a>
<a href="{{ .Header.FishbowlUrl }}">Fishbowls</a>
<a href="https://handmadedev.show/" target="_blank">Handmade Dev Show</a>
<a href="{{ .Header.ConferencesUrl }}">Conferences</a>
</div>
</div>
<div class="root-item">

View File

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

View File

@ -75,6 +75,7 @@ func getBaseData(c *RequestContext, title string, breadcrumbs []templates.Breadc
FishbowlUrl: hmnurl.BuildFishbowlIndex(),
ForumsUrl: hmnurl.HMNProjectContext.BuildForum(nil, 1),
LibraryUrl: hmnurl.BuildLibrary(),
ConferencesUrl: hmnurl.BuildConferences(),
},
Footer: templates.Footer{
HomepageUrl: hmnurl.BuildHomepage(),

View File

@ -52,6 +52,7 @@ func NewWebsiteRoutes(conn *pgxpool.Pool) http.Handler {
hmnOnly.GET(hmnurl.RegexContactPage, ContactPage)
hmnOnly.GET(hmnurl.RegexMonthlyUpdatePolicy, MonthlyUpdatePolicy)
hmnOnly.GET(hmnurl.RegexProjectSubmissionGuidelines, ProjectSubmissionGuidelines)
hmnOnly.GET(hmnurl.RegexConferences, Conferences)
hmnOnly.GET(hmnurl.RegexWhenIsIt, WhenIsIt)
hmnOnly.GET(hmnurl.RegexJamIndex, JamIndex2022)
hmnOnly.GET(hmnurl.RegexJamIndex2021, JamIndex2021)

View File

@ -49,3 +49,9 @@ func ProjectSubmissionGuidelines(c *RequestContext) ResponseData {
res.MustWriteTemplate("project_submission_guidelines.html", getBaseDataAutocrumb(c, "Project Submission Guidelines"), c.Perf)
return res
}
func Conferences(c *RequestContext) ResponseData {
var res ResponseData
res.MustWriteTemplate("conferences.html", getBaseDataAutocrumb(c, "Conferences"), c.Perf)
return res
}