What is a Learning Jam?
diff --git a/src/templates/src/include/jam_2024_lj_guidelines.html b/src/templates/src/include/jam_2024_lj_guidelines.html index d8eb875e..c3824197 100644 --- a/src/templates/src/include/jam_2024_lj_guidelines.html +++ b/src/templates/src/include/jam_2024_lj_guidelines.html @@ -9,9 +9,9 @@ --mask-url: url("{{ static "learningjam2024/presentation.svg" }}"); } -
What is a Learning Jam?
-The Learning Jam is an opportunity for you to learn something new.
@@ -23,7 +23,7 @@How to participate
Why?
-The Handmade Network's goal is to change the software industry by building back up from new foundations. But in order to do that, we need to understand those foundations.
diff --git a/src/templates/src/include/jam_2024_vj_bannerbig.html b/src/templates/src/include/jam_2024_vj_bannerbig.html new file mode 100644 index 00000000..83ae0aae --- /dev/null +++ b/src/templates/src/include/jam_2024_vj_bannerbig.html @@ -0,0 +1,37 @@ +Visibility Jam
+ +Visibility Jam
+ +Projects
{{ template "jam_2024_lj_projects.html" .Projects }} @@ -28,4 +28,3 @@Recap show
Watch the recap show celebrating all the submissions: diff --git a/src/templates/src/jam_2024_vj_index.html b/src/templates/src/jam_2024_vj_index.html new file mode 100644 index 00000000..2c5899d4 --- /dev/null +++ b/src/templates/src/jam_2024_vj_index.html @@ -0,0 +1,198 @@ +{{ template "base-2024.html" . }} + +{{ define "extrahead" }} + + +{{ end }} + +{{ define "content-top" }} +{{ if or (gt .DaysUntilStart 0) (eq .DaysUntilEnd 0) }} + {{ template "jam_2024_vj_bannerbig.html" . }} +{{ else }} + {{ template "jam_2024_vj_bannersmall.html" . }} +{{ end }} +{{ end }} + +{{ define "content" }} +
What does "visibility" mean?
+Too many things in computing are invisible.
+We run arcane command line tools just to find out what port a program is using. We imagine complicated data structures instead of drawing them out. Bugs linger for years because nobody can see their effects.
+Your computer is full of information, but no one has made it visible.
+So for this jam, make it visible. Maybe it's a data structure in your program. Maybe it's some obscure metrics from your operating system. Maybe it's your sleep schedule. Whatever you choose, you have a weekend to make it happen.
++
How to participate
+Choose a project.
+Pick something to visualize! You can brainstorm ideas in #wishlist on Discord. You can also use this time to form a team, or choose to work solo.
+Jam.
++ {{ if and (eq .DaysUntilStart 0) (not .SubmittedProject) }} + + Create a Handmade Network project. + + {{ else }} + After the jam starts, create a Handmade Network project. + {{ end }} + This project will act as your submission and can be used to share your work in progress. +
+Then get started! Share screenshots and videos in #project-showcase on Discord, or directly from your project page.
+Submit your work!
+Your Handmade Network project is your submission. Fill out the project description, making sure to explain the goals of the project and what inspired you to visualize it. Include plenty of pictures and videos!
+ {{ if and (eq .DaysUntilStart 0) (gt .DaysUntilEnd 0) }} ++ Submissions close . +
+ {{ else if eq .DaysUntilEnd 0 }} ++ Submissions are now closed. +
+ {{ end }} +Inspiration
+The following projects are amazing examples of visibility. For more inspiration, check out the #wishlist channel on Discord.
+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.
{{ .Role.Name }}
- {{ block "role content" . }}{{ end }} - -Other roles
-- We need to tell the outside world what we're all about. We want to convince programmers and users alike that software is bad and needs to be better. We want to do more than just complain - we want to advocate for better software development practices and better software, period. -
-- To do this, we want someone with great communication skills who can communicate our vision to the outside world. As Advocacy Lead, you can shape the public face of the Handmade Network and Handmade Software Foundation and push for real change in the world of software. -
-- To give you an idea of what we're looking for, here are some of our advocacy ideas: -
--
-
- - Take popular software that people hate (e.g. Adobe Premiere or New Reddit), reverse engineer it to find what's going on, and publish the results to put pressure on those companies to do better - -
- - Take an old computer and walk it through years of software updates, cataloguing the bloat and slowdown along the way - -
- - Organize the community to report bugs or build times and make a report detailing how much our software is dragging us down - -
- With your help, we can show people that there is a better way to build software. If this excites you, please get in touch! See the How to apply section below. -
- -Commitment
-- We would like to produce a few key reports per year - big pieces that can make a splash on Hacker News or other tech media. In addition, we'd like to maintain a consistent public presence through e.g. social media. -
-- How you achieve this is up to you - this position is flexible and many details are up in the air. Overall, we would expect ongoing communication with the leadership team and commitment to publishing the major pieces described above. -
- -How to apply
-- Send us an email at team@handmade.network or contact @bvisness on Discord. Please share with us: -
-- Like all Handmade Network positions, this is a volunteer role. Thank you for your interest! -
-{{ end }} diff --git a/src/templates/src/role_design.html b/src/templates/src/role_design.html deleted file mode 100644 index 2e0c5d9e..00000000 --- a/src/templates/src/role_design.html +++ /dev/null @@ -1,46 +0,0 @@ -{{ template "role_base.html" . }} - -{{ define "role content" }} -- We are looking for someone with visual design and UX skills to set the visual direction for everything the Network and Foundation does. Whether that's making promotional art for events or making infographics for education, we need a consistent visual voice and appealing presentation. -
-- Here are some examples of what you might do: -
-
-
- - Redesign our project gallery to better highlight personal work without burying our flagship projects - -
- - Design layouts, logos, key art, and assets for events like the Wheel Reinvention Jam - -
- - Create cover art and infographics for educational articles - -
- - Redesign this very website, and design reusable styles and UI components - -
- - Make sure our home page engages prospective community members and gets people excited about our mission - -
- If any of this excites you, please get in touch! See the How to apply section below. -
- -Commitment
-- Our design needs fluctuate over time, but we always have a long list of things to improve. -
-- At a minimum, we would expect you to be on call for design needs and to produce mockups or assets within a week of the request. (Timing may vary depending on the scope of work requested.) However, we would be thrilled with any other design work you choose to contribute - we want our stuff to look and feel good! -
- -How to apply
-- Send us an email at team@handmade.network or contact @bvisness on Discord. Please share a portfolio or other examples of your work. -
-- Like all Handmade Network positions, this is a volunteer role. Thank you for your interest! -
-{{ end }} diff --git a/src/templates/src/role_education.html b/src/templates/src/role_education.html deleted file mode 100644 index 5c732a7d..00000000 --- a/src/templates/src/role_education.html +++ /dev/null @@ -1,45 +0,0 @@ -{{ template "role_base.html" . }} - -{{ define "role content" }} -- Education is one of the Foundation's flagship initiatives. We want to provide serious educational material for programmers that goes deeper than anything else on the internet, and equips programmers to learn directly from real sources. -
-- We are looking for someone to head up our educational activities. This includes: -
-
-
- - Seeking out experts in various domains and working with them to produce educational content - -
- - Choosing educational topics and structuring our curriculum - -
- - Organizing beta tests and gathering community feedback on educational content - -
- If this sounds interesting to you, please get in touch! See the How to apply section below. -
- -Commitment
-- As one of our flagship initiatives, our educational content needs ongoing attention. You would be expected to spend at least a few hours a week on Handmade education and to stay in frequent communication with external contributors. You would also be expected to lead any education-related meetings and to be the point of contact for any education-related inquiries. -
-- In general, we want new and updated educational material to be released on a regular basis, and it would be your job to make that happen! -
- -How to apply
-- Send us an email at team@handmade.network or contact @bvisness on Discord. Please share with us: -
-
-
- Any background you have in education -
- Your personal domains of expertise in programming -
- What topics you'd love to see us cover! -
- Like all Handmade Network positions, this is a volunteer role. Thank you for your interest! -
-{{ end }} diff --git a/src/templates/templates.go b/src/templates/templates.go index 13f603f7..e5c7afb6 100644 --- a/src/templates/templates.go +++ b/src/templates/templates.go @@ -8,7 +8,7 @@ import ( "io" "io/fs" "net/http" - "path/filepath" + "path" "regexp" "sort" "strings" @@ -144,7 +144,7 @@ func GetImg(file string) []byte { imgs = utils.DirFS("src/templates/img") } else { imgs = Imgs - file = filepath.Join("img/", file) + file = path.Join("img/", file) } img, err := imgs.Open(file) @@ -161,7 +161,7 @@ func ListImgsDir(dir string) []fs.DirEntry { imgs = utils.DirFS("src/templates/img").(fs.ReadDirFS) } else { imgs = Imgs - dir = filepath.Join("img/", dir) + dir = path.Join("img/", dir) } entries, err := imgs.ReadDir(dir) diff --git a/src/utils/utils.go b/src/utils/utils.go index 26194ee9..0debafd5 100644 --- a/src/utils/utils.go +++ b/src/utils/utils.go @@ -118,3 +118,8 @@ func Assert[T comparable](value T, msg ...any) { panic(finalMsg) } } + +// Because sometimes you just want a pointer to the thing. +func P[T any](value T) *T { + return &value +} diff --git a/src/website/jam.go b/src/website/jam.go index 0d6f3988..44dec1cd 100644 --- a/src/website/jam.go +++ b/src/website/jam.go @@ -28,6 +28,7 @@ func JamsIndex(c *RequestContext) ResponseData { VJ2023Url string WRJ2023Url string LJ2024Url string + VJ2024Url string } res.MustWriteTemplate("jams_index.html", TemplateData{ @@ -39,6 +40,7 @@ func JamsIndex(c *RequestContext) ResponseData { VJ2023Url: hmnurl.BuildJamIndex2023_Visibility(), WRJ2023Url: hmnurl.BuildJamIndex2023(), LJ2024Url: hmnurl.BuildJamIndex2024_Learning(), + VJ2024Url: hmnurl.BuildJamIndex2024_Visibility(), }, c.Perf) return res } @@ -76,6 +78,98 @@ func JamSaveTheDate(c *RequestContext) ResponseData { return res } +type JamBaseDataVJ2024 struct { + DaysUntilStart, DaysUntilEnd int + StartTimeUnix, EndTimeUnix int64 + JamUrl string + JamFeedUrl string + NewProjectUrl string + GuidelinesUrl string + SubmittedProject *templates.Project +} + +func JamIndex2024_Visibility(c *RequestContext) ResponseData { + var res ResponseData + + jam := hmndata.VJ2024 + + jamBaseData, err := getVJ2024BaseData(c) + if err != nil { + return c.ErrorResponse(http.StatusInternalServerError, err) + } + + baseData := getBaseDataAutocrumb(c, jam.Name) + baseData.OpenGraphItems = []templates.OpenGraphItem{ + {Property: "og:title", Value: "Visibility Jam"}, + {Property: "og:site_name", Value: "Handmade Network"}, + {Property: "og:type", Value: "website"}, + {Property: "og:image", Value: hmnurl.BuildPublic("visjam2024/opengraph.png", true)}, + {Property: "og:description", Value: "See things in a new way. July 19 - 21."}, + {Property: "og:url", Value: hmnurl.BuildJamIndex2024_Visibility()}, + {Name: "twitter:card", Value: "summary_large_image"}, + {Name: "twitter:image", Value: hmnurl.BuildPublic("visjam2024/TwitterCard.png", true)}, + } + baseData.BodyClasses = append(baseData.BodyClasses, "header-transparent") + + type JamPageData struct { + templates.BaseData + JamBaseDataVJ2024 + + JamProjects []templates.Project + } + + jamProjects, err := hmndata.FetchProjects(c, c.Conn, c.CurrentUser, hmndata.ProjectsQuery{ + JamSlugs: []string{jam.Slug}, + }) + if err != nil { + return c.ErrorResponse(http.StatusInternalServerError, oops.New(err, "failed to fetch jam projects for current user")) + } + + pageProjects := make([]templates.Project, 0, len(jamProjects)) + for _, p := range jamProjects { + pageProjects = append(pageProjects, templates.ProjectAndStuffToTemplate(&p)) + } + + res.MustWriteTemplate("jam_2024_vj_index.html", JamPageData{ + BaseData: baseData, + JamBaseDataVJ2024: jamBaseData, + JamProjects: pageProjects, + }, c.Perf) + return res +} + +func getVJ2024BaseData(c *RequestContext) (JamBaseDataVJ2024, error) { + jam := hmndata.VJ2024 + + var submittedProject *templates.Project + if c.CurrentUser != nil { + projects, err := hmndata.FetchProjects(c, c.Conn, c.CurrentUser, hmndata.ProjectsQuery{ + OwnerIDs: []int{c.CurrentUser.ID}, + JamSlugs: []string{jam.Slug}, + Limit: 1, + }) + if err != nil { + return JamBaseDataVJ2024{}, oops.New(err, "failed to fetch jam projects for current user") + } + if len(projects) > 0 { + submittedProject = utils.P(templates.ProjectAndStuffToTemplate(&projects[0])) + } + } + + return JamBaseDataVJ2024{ + DaysUntilStart: daysUntil(jam.StartTime), + DaysUntilEnd: daysUntil(jam.EndTime), + StartTimeUnix: jam.StartTime.Unix(), + EndTimeUnix: jam.EndTime.Unix(), + + JamUrl: hmnurl.BuildJamIndex2024_Visibility(), + // JamFeedUrl: hmnurl.BuildJamFeed2024_Visibility(), + NewProjectUrl: hmnurl.BuildProjectNewJam(), + // GuidelinesUrl: hmnurl.BuildJamGuidelines2024_Visibility(), + SubmittedProject: submittedProject, + }, nil +} + func JamIndex2024_Learning(c *RequestContext) ResponseData { var res ResponseData diff --git a/src/website/routes.go b/src/website/routes.go index bef844ec..0ed9ff54 100644 --- a/src/website/routes.go +++ b/src/website/routes.go @@ -121,6 +121,7 @@ func NewWebsiteRoutes(conn *pgxpool.Pool) http.Handler { hmnOnly.GET(hmnurl.RegexJamIndex2024_Learning, JamIndex2024_Learning) hmnOnly.GET(hmnurl.RegexJamFeed2024_Learning, JamFeed2024_Learning) hmnOnly.GET(hmnurl.RegexJamGuidelines2024_Learning, JamGuidelines2024_Learning) + hmnOnly.GET(hmnurl.RegexJamIndex2024_Visibility, JamIndex2024_Visibility) hmnOnly.GET(hmnurl.RegexJamSaveTheDate, JamSaveTheDate) hmnOnly.GET(hmnurl.RegexTimeMachine, TimeMachine) diff --git a/todo-styles.md b/todo-styles.md index bff3a652..07ac1fbd 100644 --- a/todo-styles.md +++ b/todo-styles.md @@ -64,7 +64,7 @@ - [ ] Resolve TODO(redesign) comments - [ ] Audit all project lifecycles on HMN - probably remove "complete", replace with stuff like "alpha", "beta", maybe other stuff that makes sense for other types of projects. - [ ] Afterward, re-enable badges -- [ ] Add logout / settings menu on avatar +- [x] Add logout / settings menu on avatar - [ ] Delete all the scss :D stack!