diff --git a/public/wheeljam/logo.svg b/public/wheeljam2021/logo.svg similarity index 100% rename from public/wheeljam/logo.svg rename to public/wheeljam2021/logo.svg diff --git a/public/wheeljam/opengraph.png b/public/wheeljam2021/opengraph.png similarity index 100% rename from public/wheeljam/opengraph.png rename to public/wheeljam2021/opengraph.png diff --git a/public/wheeljam2022/logo.svg b/public/wheeljam2022/logo.svg new file mode 100644 index 0000000..73b96c1 --- /dev/null +++ b/public/wheeljam2022/logo.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/wheeljam2022/opengraph.png b/public/wheeljam2022/opengraph.png new file mode 100644 index 0000000..bd158e9 Binary files /dev/null and b/public/wheeljam2022/opengraph.png differ diff --git a/src/hmnurl/urls.go b/src/hmnurl/urls.go index 460ba3f..74775d2 100644 --- a/src/hmnurl/urls.go +++ b/src/hmnurl/urls.go @@ -56,6 +56,8 @@ func BuildJamIndex() string { return Url("/jam", nil) } +var RegexJamIndex2021 = regexp.MustCompile("^/jam/2021") + // QUESTION(ben): Can we change these routes? var RegexLoginAction = regexp.MustCompile("^/login$") diff --git a/src/templates/src/wheeljam_index.html b/src/templates/src/wheeljam_2021_index.html similarity index 99% rename from src/templates/src/wheeljam_index.html rename to src/templates/src/wheeljam_2021_index.html index 2ca44da..3279c6c 100644 --- a/src/templates/src/wheeljam_index.html +++ b/src/templates/src/wheeljam_2021_index.html @@ -60,6 +60,10 @@ color: white !important; } + header .submenu { + background-color: #ab4c47; + } + #top-container { margin: 3rem 0; } @@ -235,7 +239,7 @@
- +

Wheel Reinvention Jam

September 27 - October 3, 2O21

diff --git a/src/templates/src/wheeljam_2022_index.html b/src/templates/src/wheeljam_2022_index.html new file mode 100644 index 0000000..97231d8 --- /dev/null +++ b/src/templates/src/wheeljam_2022_index.html @@ -0,0 +1,342 @@ +{{/* + This is a copy-paste from base.html because we want to preserve the unique + style of this page no matter what future changes we make to the base. +*/}} + + + + + + + {{ if .CanonicalLink }}{{ end }} + {{ range .OpenGraphItems }} + {{ if .Property }} + + {{ else }} + + {{ end }} + {{ end }} + {{ if .Title }} + {{ .Title }} | Handmade Network + {{ else }} + Handmade Network + {{ end }} + + + + + + + + + + + +
+
+ {{ template "header.html" . }} +
+ +
+ +

Wheel Reinvention Jam

+

August 15 - 21, 2O22

+
+ A one-week jam to change the status quo. +
+
+ {{ if gt .DaysUntilStart 0 }} + Choose a project + {{ else }} + + {{ end }} + Join the Discord +
+
+ +
+

+ The Wheel Reinvention Jam is a one-week-long jam where we turn a fresh eye to "solved problems". +

+

+ The tools we use every day are broken. Software is slow, unreliable, and bloated with thoughtless features. It disrespects the user and forces settings that no one wants. And yet, people defend the status quo, claiming that what we have is fine, and that trying to change software is "reinventing the wheel". +

+

+ Screw that. Progress is only made by inventing new things. It's not "reinventing" to break new ground. Nor is it "reinventing" to take a broken thing and design something better. +

+

+ This is your chance to reinvent something. +

+
+ +
+
+

Details / Rules

+

+ The jam takes place from Monday, August 15 through Sunday, August 21. Here's how you can participate: +

+ +

Pick a project and register.

+

+ Find a project idea that excites you! If there's a project you've always wanted to start, go for it. Otherwise, join the conversation over on our Wishlist, brainstorm project ideas, and find a team. +

+ +

Jam.

+

+ Create a personal Handmade Network project to track your work. Then, build your program over the course of the week. Sharing your work in progress is highly recommended - you can share WIP content in #project-showcase on Discord, or directly from your project page. +

+ +

Submit your work!

+

+ Your Handmade Network project acts as your submission. Fill out the project description, making sure to explain the goals of the project and how it improves on what came before. Also consider posting an update on the project with video of your program in action! +

+ +

Rules

+
    +
  • Any tech is allowed, but in the spirit of the Handmade ethos, we encourage you to use only use what you really need. If you want some lightweight templates to get you started, check out our app templates.
  • +
  • Working with a team is strongly encouraged, but working solo is allowed.
  • +
  • +

    Submit your work by the end of August 21 in your local timezone.

    +
      +
    • Update the description of your Handmade Network project. The project is your submission.
    • {{/* TODO: dynamically link to their project? */}} +
    • Explain the project's goals and how it improves on what came before. Also share some closing thoughts - did it turn out how you hoped? What did you learn? If you continue the project, what will you do differently?
    • +
    • +

      + Your description must contain multiple screenshots of your software in action. You should ideally also share a project update with a demo video. +

      +

      + We recommend Mārtiņš Možeiko's wcap for recording desktop video on Windows. On Mac, just press ⌘-Option-5 and record a video, or use QuickTime. +

      +
    • +
    • If at all possible, please provide a way for people to either build or download your program.
    • +
    +
  • +
+
+
+ +
+
+

Make it by hand.

+

+ The Handmade ethos and Handmade community are software development superpowers. Don't be afraid to question your foundations and rebuild what needs rebuilding. The community is here to help you take on those challenges and do what others might consider impossible. +

+

+ Of course, this is a jam, so focus on what matters to your project. There are many excellent libraries in the community that can save you time and help you focus on your core ideas. Don't be afraid to use them. But don't be afraid to do your own thing if they're holding you back. +

+
+
+

Don't just rebuild. Reinvent.

+

+ This is a chance to build something truly new. Learn from previous work, but don't settle for “the same, but better”. It would be a huge shame to spend a week building nothing more than a clone of the same broken software we use today. +

+

+ This is where working with a team can really help. Bounce ideas off each other, do some research, and brainstorm before the jam starts. The software you end up building might be pretty different from your original ideas. +

+

+ In the end, this is a jam. Get weird and try something different. +

+
+
+ +
+ {{ template "footer.html" . }} +
+
+ + + diff --git a/src/utils/utils.go b/src/utils/utils.go index 65a7201..b8d73f7 100644 --- a/src/utils/utils.go +++ b/src/utils/utils.go @@ -62,6 +62,10 @@ func Int64Max(a, b int64) int64 { return b } +func DurationRoundUp(d time.Duration, interval time.Duration) time.Duration { + return (d + interval - 1).Truncate(interval) +} + func NumPages(numThings, thingsPerPage int) int { return IntMax(int(math.Ceil(float64(numThings)/float64(thingsPerPage))), 1) } diff --git a/src/website/jam.go b/src/website/jam.go index 4101716..8464641 100644 --- a/src/website/jam.go +++ b/src/website/jam.go @@ -8,15 +8,46 @@ import ( "git.handmade.network/hmn/hmn/src/hmnurl" "git.handmade.network/hmn/hmn/src/oops" "git.handmade.network/hmn/hmn/src/templates" + "git.handmade.network/hmn/hmn/src/utils" ) -func JamIndex(c *RequestContext) ResponseData { +func JamIndex2022(c *RequestContext) ResponseData { + var res ResponseData + + jamStartTime := time.Date(2022, 8, 15, 0, 0, 0, 0, time.UTC) + jamEndTime := time.Date(2022, 8, 22, 0, 0, 0, 0, time.UTC) + daysUntilStart := daysUntil(jamStartTime) + daysUntilEnd := daysUntil(jamEndTime) + + baseData := getBaseDataAutocrumb(c, "Wheel Reinvention Jam 2022") + baseData.OpenGraphItems = []templates.OpenGraphItem{ + {Property: "og:site_name", Value: "Handmade Network"}, + {Property: "og:type", Value: "website"}, + {Property: "og:image", Value: hmnurl.BuildPublic("wheeljam2022/opengraph.png", true)}, + {Property: "og:description", Value: "A one-week jam to change the status quo. August 15 - 21 on Handmade Network."}, + {Property: "og:url", Value: hmnurl.BuildJamIndex()}, + } + + type JamPageData struct { + templates.BaseData + DaysUntilStart, DaysUntilEnd int + } + + res.MustWriteTemplate("wheeljam_2022_index.html", JamPageData{ + BaseData: baseData, + DaysUntilStart: daysUntilStart, + DaysUntilEnd: daysUntilEnd, + }, c.Perf) + return res +} + +func JamIndex2021(c *RequestContext) ResponseData { var res ResponseData jamStartTime := time.Date(2021, 9, 27, 0, 0, 0, 0, time.UTC) - daysUntil := jamStartTime.YearDay() - time.Now().UTC().YearDay() - if daysUntil < 0 { - daysUntil = 0 + daysUntilJam := daysUntil(jamStartTime) + if daysUntilJam < 0 { + daysUntilJam = 0 } tagId := -1 @@ -52,7 +83,7 @@ func JamIndex(c *RequestContext) ResponseData { baseData.OpenGraphItems = []templates.OpenGraphItem{ {Property: "og:site_name", Value: "Handmade.Network"}, {Property: "og:type", Value: "website"}, - {Property: "og:image", Value: hmnurl.BuildPublic("wheeljam/opengraph.png", true)}, + {Property: "og:image", Value: hmnurl.BuildPublic("wheeljam2021/opengraph.png", true)}, {Property: "og:description", Value: "A one-week jam to bring a fresh perspective to old ideas. September 27 - October 3 on Handmade Network."}, {Property: "og:url", Value: hmnurl.BuildJamIndex()}, } @@ -63,10 +94,18 @@ func JamIndex(c *RequestContext) ResponseData { ShowcaseItemsJSON string } - res.MustWriteTemplate("wheeljam_index.html", JamPageData{ + res.MustWriteTemplate("wheeljam_2021_index.html", JamPageData{ BaseData: baseData, - DaysUntil: daysUntil, + DaysUntil: daysUntilJam, ShowcaseItemsJSON: showcaseJson, }, c.Perf) return res } + +func daysUntil(t time.Time) int { + d := t.Sub(time.Now()) + if d < 0 { + d = 0 + } + return int(utils.DurationRoundUp(d, 24*time.Hour) / (24 * time.Hour)) +} diff --git a/src/website/routes.go b/src/website/routes.go index 2842388..88393b0 100644 --- a/src/website/routes.go +++ b/src/website/routes.go @@ -166,7 +166,8 @@ func NewWebsiteRoutes(longRequestContext context.Context, conn *pgxpool.Pool) ht hmnOnly.GET(hmnurl.RegexMonthlyUpdatePolicy, MonthlyUpdatePolicy) hmnOnly.GET(hmnurl.RegexProjectSubmissionGuidelines, ProjectSubmissionGuidelines) hmnOnly.GET(hmnurl.RegexWhenIsIt, WhenIsIt) - hmnOnly.GET(hmnurl.RegexJamIndex, JamIndex) + hmnOnly.GET(hmnurl.RegexJamIndex, JamIndex2022) + hmnOnly.GET(hmnurl.RegexJamIndex2021, JamIndex2021) hmnOnly.GET(hmnurl.RegexOldHome, Index)