From a6cfeb9c951be4a8a055d10596678696da4a0337 Mon Sep 17 00:00:00 2001 From: Ben Visness Date: Sat, 29 Jun 2024 11:39:18 -0500 Subject: [PATCH] Various project and login improvements --- public/style.css | 14 +- src/hmnurl/hmnurl_test.go | 4 - src/hmnurl/urls.go | 7 - src/rawdata/scss/carousel.css | 2 +- src/rawdata/scss/content.css | 5 +- src/rawdata/scss/core.css | 4 +- src/rawdata/scss/education.css | 1 - src/rawdata/scss/timeline.css | 2 +- src/templates/src/auth_login.html | 68 ++++---- src/templates/src/auth_register.html | 30 ++-- src/templates/src/blog_post.html | 2 +- src/templates/src/blog_post_delete.html | 2 +- .../src/education_article_delete.html | 2 +- src/templates/src/forum_post_delete.html | 2 +- src/templates/src/foundation.html | 2 +- src/templates/src/include/header-2024.html | 4 +- src/templates/src/include/project_card.html | 6 +- src/templates/src/jam_2021_wrj_index.html | 16 +- src/templates/src/jam_2022_wrj_feed.html | 2 +- src/templates/src/jam_2022_wrj_index.html | 16 +- src/templates/src/jam_2023_vj_feed.html | 2 +- src/templates/src/jam_2023_vj_index.html | 16 +- src/templates/src/jam_2023_vj_recap.html | 2 +- src/templates/src/jam_2023_wrj_feed.html | 2 +- src/templates/src/jam_2023_wrj_index.html | 20 +-- src/templates/src/jams_index.html | 12 +- src/templates/src/landing.html | 2 +- src/templates/src/layouts/base.html | 4 +- .../src/layouts/jam_2023_visibility_base.html | 4 +- src/templates/src/layouts/role_base.html | 2 +- .../src/layouts/timemachine_base.html | 6 +- .../src/layouts/wheeljam_2022_base.html | 4 +- .../src/layouts/wheeljam_2023_base.html | 4 +- src/templates/src/manifesto.html | 2 +- src/templates/src/project.css | 153 ------------------ src/templates/src/project_index.html | 21 ++- src/templates/src/style_test.html | 4 + src/templates/src/timemachine.html | 2 +- .../src/timemachine_submissions.html | 2 +- src/templates/src/timemachine_submit.html | 4 +- src/templates/src/timemachine_thanks.html | 2 +- src/templates/types.go | 1 - src/website/base_data.go | 1 - src/website/projects.go | 26 --- src/website/routes.go | 1 - todo-styles.md | 1 + 46 files changed, 151 insertions(+), 340 deletions(-) delete mode 100644 src/templates/src/project.css diff --git a/public/style.css b/public/style.css index 233ef547..ea0db8d8 100644 --- a/public/style.css +++ b/public/style.css @@ -7231,6 +7231,7 @@ body { font-family: "Inter", sans-serif; min-height: 100vh; box-sizing: border-box; + line-height: 1.2; } a, .link { @@ -7274,7 +7275,7 @@ hr { border: none; border-bottom: 1px solid var(--border-color); } -.m--center { +.m-center { margin-left: auto; margin-right: auto; } @@ -7625,7 +7626,6 @@ hr { align-items: center; border-style: dashed; border-width: 0 0 1px; - border-color: var(--bg-3); } @media screen and (min-width: 35em) { .optionbar { @@ -7693,7 +7693,7 @@ hr { transition: all 100ms ease-in-out; } .carousel-container .carousel-button:hover { - background-color: var(--bg-3); + background-color: var(--c3); } .carousel-container .carousel-button.active { border-color: var(--theme-color); @@ -7778,7 +7778,7 @@ hr { border: 1px solid var(--border-color); } .post-content code { - background-color: var(--bg-3); + background-color: var(--c1); padding: .2em 0; white-space: nowrap; } @@ -7790,12 +7790,11 @@ hr { } .post-content pre > code, .post-content pre.hmn-code { - background-color: var(--bg-3); + background-color: var(--c1); padding: 0.7em; overflow-x: auto; } .post-content blockquote { - border-color: var(--bg-3); margin-left: var(--spacing-2); padding-left: var(--spacing-2); margin-right: 0; @@ -7938,7 +7937,6 @@ hr { height: var(--height); border-width: 0 0 1px 1px; border-style: solid; - border-color: var(--bg-3); left: -1.5rem; top: calc(1rem - var(--height)); border-bottom-left-radius: 0.5rem; @@ -8694,7 +8692,7 @@ code .ss, .avatar { object-fit: cover; overflow: hidden; - background-color: var(--bg-3); + background-color: var(--c4); flex-shrink: 0; border: none; width: var(--avatar-size-normal); diff --git a/src/hmnurl/hmnurl_test.go b/src/hmnurl/hmnurl_test.go index dc3fd4a0..f9f6e82f 100644 --- a/src/hmnurl/hmnurl_test.go +++ b/src/hmnurl/hmnurl_test.go @@ -324,10 +324,6 @@ func TestAssetUpload(t *testing.T) { AssertSubdomain(t, hero.BuildAssetUpload(), "hero") } -func TestProjectCSS(t *testing.T) { - AssertRegexMatch(t, BuildProjectCSS("000000"), RegexProjectCSS, nil) -} - func TestMarkdownWorkerJS(t *testing.T) { AssertRegexMatch(t, BuildMarkdownWorkerJS(), RegexMarkdownWorkerJS, nil) } diff --git a/src/hmnurl/urls.go b/src/hmnurl/urls.go index 67492ea1..880da51e 100644 --- a/src/hmnurl/urls.go +++ b/src/hmnurl/urls.go @@ -963,13 +963,6 @@ func (c *UrlContext) BuildAssetUpload() string { * Assets */ -var RegexProjectCSS = regexp.MustCompile("^/assets/project.css$") - -func BuildProjectCSS(color string) string { - defer CatchPanic() - return Url("/assets/project.css", []Q{{"color", color}}) -} - var RegexMarkdownWorkerJS = regexp.MustCompile("^/assets/markdown_worker.js$") func BuildMarkdownWorkerJS() string { diff --git a/src/rawdata/scss/carousel.css b/src/rawdata/scss/carousel.css index 24410fa9..f5fed0cf 100644 --- a/src/rawdata/scss/carousel.css +++ b/src/rawdata/scss/carousel.css @@ -20,7 +20,7 @@ transition: all 100ms ease-in-out; &:hover { - background-color: var(--bg-3); + background-color: var(--c3); } &.active { diff --git a/src/rawdata/scss/content.css b/src/rawdata/scss/content.css index c72b6cb7..78f8b9ab 100644 --- a/src/rawdata/scss/content.css +++ b/src/rawdata/scss/content.css @@ -91,7 +91,7 @@ } code { - background-color: var(--bg-3); + background-color: var(--c1); padding: .2em 0; white-space: nowrap; @@ -106,14 +106,13 @@ pre>code, pre.hmn-code { - background-color: var(--bg-3); + background-color: var(--c1); padding: 0.7em; overflow-x: auto; } blockquote { - border-color: var(--bg-3); margin-left: var(--spacing-2); padding-left: var(--spacing-2); margin-right: 0; diff --git a/src/rawdata/scss/core.css b/src/rawdata/scss/core.css index 2fbd5777..913a905d 100644 --- a/src/rawdata/scss/core.css +++ b/src/rawdata/scss/core.css @@ -10,6 +10,7 @@ body { font-family: "Inter", sans-serif; min-height: 100vh; box-sizing: border-box; + line-height: 1.2; } a, @@ -65,7 +66,7 @@ hr { /* Utility */ -.m--center { +.m-center { margin-left: auto; margin-right: auto; } @@ -529,7 +530,6 @@ on our SVGs to ensure that they naturally render at the right size.) align-items: center; border-style: dashed; border-width: 0 0 1px; - border-color: var(--bg-3); @media screen and (min-width: 35em) { flex-direction: row; diff --git a/src/rawdata/scss/education.css b/src/rawdata/scss/education.css index b107f887..a3a7e65b 100644 --- a/src/rawdata/scss/education.css +++ b/src/rawdata/scss/education.css @@ -18,7 +18,6 @@ height: var(--height); border-width: 0 0 1px 1px; border-style: solid; - border-color: var(--bg-3); left: -1.5rem; top: calc(1rem - var(--height)); border-bottom-left-radius: 0.5rem; diff --git a/src/rawdata/scss/timeline.css b/src/rawdata/scss/timeline.css index 3527842e..930c5788 100644 --- a/src/rawdata/scss/timeline.css +++ b/src/rawdata/scss/timeline.css @@ -1,7 +1,7 @@ .avatar { object-fit: cover; overflow: hidden; - background-color: var(--bg-3); + background-color: var(--c4); flex-shrink: 0; border: none; diff --git a/src/templates/src/auth_login.html b/src/templates/src/auth_login.html index bf075bf0..0684e400 100644 --- a/src/templates/src/auth_login.html +++ b/src/templates/src/auth_login.html @@ -1,40 +1,46 @@ {{ template "base-2024.html" . }} {{ define "content" }} -
-

Log in

-
- - - +
+
+ +

Log In

- - Forgot your password? - -
- -
+ + +
+ -
- Need an account? Sign up. -
+ +
+ +
+ +
+ Need an account? Sign up. +
+
+ -
-
Third-party login
+
+
Third-party login
- +
{{ end }} diff --git a/src/templates/src/auth_register.html b/src/templates/src/auth_register.html index 0ae89050..c0f8118f 100644 --- a/src/templates/src/auth_register.html +++ b/src/templates/src/auth_register.html @@ -1,14 +1,15 @@ {{ template "base-2024.html" . }} {{ define "content" }} -
-
-

Sign up

-
- {{/* NOTE(asaf): No CSRF on register. We don't have a user session yet and I don't think we would gain anything from a pre-login session here */}} - - +
+ +

Create Account

+ + {{/* NOTE(asaf): No CSRF on register. We don't have a user session yet and I don't think we would gain anything from a pre-login session here */}} + + +
- - - - - {{/* TODO(asaf): Consider adding some bot-mitigation thing here */}} +
-
- -
- -
+ {{/* TODO(asaf): Consider adding some bot-mitigation thing here */}} + + +
{{ end }} diff --git a/src/templates/src/blog_post.html b/src/templates/src/blog_post.html index e49a975b..f70514e0 100644 --- a/src/templates/src/blog_post.html +++ b/src/templates/src/blog_post.html @@ -1,7 +1,7 @@ {{ template "base.html" . }} {{ define "content" }} -
+

{{ .Thread.Title }}

{{ with .MainPost }}
diff --git a/src/templates/src/blog_post_delete.html b/src/templates/src/blog_post_delete.html index 16fb4b33..b92e3065 100644 --- a/src/templates/src/blog_post_delete.html +++ b/src/templates/src/blog_post_delete.html @@ -1,7 +1,7 @@ {{ template "base.html" . }} {{ define "content" }} -
+

Are you sure you want to delete this post?

{{ template "forum_post_standalone.html" .Post }}
diff --git a/src/templates/src/education_article_delete.html b/src/templates/src/education_article_delete.html index 6e098a54..80216c0c 100644 --- a/src/templates/src/education_article_delete.html +++ b/src/templates/src/education_article_delete.html @@ -1,7 +1,7 @@ {{ template "base.html" . }} {{ define "content" }} -
+

Are you sure you want to delete this article?

{{ .Article.Title }}

diff --git a/src/templates/src/forum_post_delete.html b/src/templates/src/forum_post_delete.html index 16fb4b33..b92e3065 100644 --- a/src/templates/src/forum_post_delete.html +++ b/src/templates/src/forum_post_delete.html @@ -1,7 +1,7 @@ {{ template "base.html" . }} {{ define "content" }} -
+

Are you sure you want to delete this post?

{{ template "forum_post_standalone.html" .Post }} diff --git a/src/templates/src/foundation.html b/src/templates/src/foundation.html index f8077a7e..2277c0d8 100644 --- a/src/templates/src/foundation.html +++ b/src/templates/src/foundation.html @@ -1,7 +1,7 @@ {{ template "base.html" . }} {{ define "content" }} -
+

Handmade Software Foundation

diff --git a/src/templates/src/include/header-2024.html b/src/templates/src/include/header-2024.html index 95b6124f..806720eb 100644 --- a/src/templates/src/include/header-2024.html +++ b/src/templates/src/include/header-2024.html @@ -39,11 +39,11 @@
- + {{ with .User }} {{ else }} -
+ Log In {{ end }}
diff --git a/src/templates/src/include/project_card.html b/src/templates/src/include/project_card.html index 8073c89c..a68ee5c4 100644 --- a/src/templates/src/include/project_card.html +++ b/src/templates/src/include/project_card.html @@ -1,6 +1,8 @@ -
+ {{ with .Logo }} - +
+ +
{{ end }}

{{ .Name }}

diff --git a/src/templates/src/jam_2021_wrj_index.html b/src/templates/src/jam_2021_wrj_index.html index f65b6550..37c0e222 100644 --- a/src/templates/src/jam_2021_wrj_index.html +++ b/src/templates/src/jam_2021_wrj_index.html @@ -237,7 +237,7 @@
-
+
{{ template "header.html" . }}
@@ -254,7 +254,7 @@
-
+

The Wheel Reinvention Jam is a one-week-long jam where you create a replacement for a program that frustrates you.

@@ -267,16 +267,16 @@
- -
+

Why reinvent the wheel?

How can you reinvent something that's never been invented? @@ -293,7 +293,7 @@

-
+

Details

The jam takes place from Monday, September 27 through Sunday, October 3. Here's how you can participate: @@ -344,7 +344,7 @@

-
+

Make it by hand.

@@ -368,7 +368,7 @@

-
+
{{ template "footer.html" . }}
diff --git a/src/templates/src/jam_2022_wrj_feed.html b/src/templates/src/jam_2022_wrj_feed.html index 29c7f8b9..3a709b99 100644 --- a/src/templates/src/jam_2022_wrj_feed.html +++ b/src/templates/src/jam_2022_wrj_feed.html @@ -21,7 +21,7 @@
-
+
{{ if eq .DaysUntilEnd 0 }}

Project updates

diff --git a/src/templates/src/jam_2022_wrj_index.html b/src/templates/src/jam_2022_wrj_index.html index 1527605b..969dfb2b 100644 --- a/src/templates/src/jam_2022_wrj_index.html +++ b/src/templates/src/jam_2022_wrj_index.html @@ -50,7 +50,7 @@
-
+

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

@@ -67,7 +67,7 @@ {{ if eq .DaysUntilEnd 0 }}
-
+

Submitted projects

{{ range .JamProjects }} @@ -81,7 +81,7 @@
{{ else if and (eq .DaysUntilStart 0) (not (eq .ShowcaseJson "[]")) }}
-
+
{{ if gt .DaysUntilEnd 0 }}

Recent updates

@@ -93,7 +93,7 @@ These screenshots and videos were shared by jam participants in #project-showcase on our Discord during the jam. Join us and chat about your favorites!

{{ end }} -
+
@@ -205,7 +205,7 @@ {{ else }}
-
+

Last year's entries

We had many incredible entries last year. Here are a few of our favorites: @@ -263,7 +263,7 @@ {{ end }}

-
+

How to participate

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

-
+

Rules

  • Any tech is allowed, but 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.
  • @@ -338,7 +338,7 @@
-
+

Make it by hand.

diff --git a/src/templates/src/jam_2023_vj_feed.html b/src/templates/src/jam_2023_vj_feed.html index 017f2cdb..d7efc066 100644 --- a/src/templates/src/jam_2023_vj_feed.html +++ b/src/templates/src/jam_2023_vj_feed.html @@ -17,7 +17,7 @@

-
+
{{ if eq .DaysUntilEnd 0 }}

Project updates

diff --git a/src/templates/src/jam_2023_vj_index.html b/src/templates/src/jam_2023_vj_index.html index 55f66c52..a1a51442 100644 --- a/src/templates/src/jam_2023_vj_index.html +++ b/src/templates/src/jam_2023_vj_index.html @@ -72,7 +72,7 @@ $discordInviteURL := "https://discord.gg/hmn" }}
-
+

Too many things in computing are invisible.

@@ -86,7 +86,7 @@ $discordInviteURL := "https://discord.gg/hmn" }}
-
+

Read the recap

Now that the jam is over, see which projects stood out. Full post ➜

@@ -94,7 +94,7 @@ $discordInviteURL := "https://discord.gg/hmn" }} {{ if eq .DaysUntilEnd 0 }}
-
+

Submitted projects

{{ range .JamProjects }} {{ template "project_card.html" . }} {{ end }} @@ -110,7 +110,7 @@ $discordInviteURL := "https://discord.gg/hmn" }}
{{ else if and (eq .DaysUntilStart 0) (not (eq .ShowcaseJson "[]")) }}
-
+
{{ if gt .DaysUntilEnd 0 }}

Recent updates

@@ -129,7 +129,7 @@ $discordInviteURL := "https://discord.gg/hmn" }} jam. Join us and chat about your favorites!

{{ end }} -
+
-
+

Inspiration

@@ -331,7 +331,7 @@ $discordInviteURL := "https://discord.gg/hmn" }}
-
+

How to participate

The jam takes place from Friday, April 14 through Sunday, April 16. Here's @@ -384,7 +384,7 @@ $discordInviteURL := "https://discord.gg/hmn" }}

-
+

Rules

  • Any tech is allowed.
  • diff --git a/src/templates/src/jam_2023_vj_recap.html b/src/templates/src/jam_2023_vj_recap.html index ffe11e18..a393f9d5 100644 --- a/src/templates/src/jam_2023_vj_recap.html +++ b/src/templates/src/jam_2023_vj_recap.html @@ -19,7 +19,7 @@
-
+

Jam recap

diff --git a/src/templates/src/jam_2023_wrj_feed.html b/src/templates/src/jam_2023_wrj_feed.html index 91de9d09..9b1b90b0 100644 --- a/src/templates/src/jam_2023_wrj_feed.html +++ b/src/templates/src/jam_2023_wrj_feed.html @@ -21,7 +21,7 @@
-
+
{{ if eq .DaysUntilEnd 0 }}

Project updates

diff --git a/src/templates/src/jam_2023_wrj_index.html b/src/templates/src/jam_2023_wrj_index.html index a1fa38e9..52a3fdc3 100644 --- a/src/templates/src/jam_2023_wrj_index.html +++ b/src/templates/src/jam_2023_wrj_index.html @@ -23,7 +23,7 @@ {{ if .TwitchEmbedUrl }} -
+
{{ end }} @@ -60,7 +60,7 @@
-
+

The Wheel Reinvention Jam is a one-week jam where we build software from scratch.

@@ -77,7 +77,7 @@ {{ if eq .DaysUntilEnd 0 }}
-
+

Recap show

Watch the livestream celebrating this year's submissions:

@@ -86,7 +86,7 @@
-
+

Submitted projects

{{ range .JamProjects }} @@ -100,7 +100,7 @@
{{ else if and (eq .DaysUntilStart 0) (not (eq .ShowcaseJson "[]")) }}
-
+
{{ if gt .DaysUntilEnd 0 }}

Recent updates

@@ -112,7 +112,7 @@ These screenshots and videos were shared by jam participants in #project-showcase on our Discord during the jam. Join us and chat about your favorites!

{{ end }} -
+
@@ -224,7 +224,7 @@ {{ else }}
-
+

Last year's entries

We had 28 incredible entries last year. Here are a few of our favorites: @@ -306,7 +306,7 @@ {{ end }}

-
+

Why reinvent the wheel?

@@ -340,7 +340,7 @@

-
+

How to participate

The jam takes place from Monday, September 25 through Sunday, October 1. Here's how you can participate: @@ -384,7 +384,7 @@

-
+

Rules

  • Any tech is allowed. Popular tech choices in the community are Raylib, SDL, Dear ImGui, and microui. Or if you're feeling ambitious, you can even use our new app platform, Orca!
  • diff --git a/src/templates/src/jams_index.html b/src/templates/src/jams_index.html index 7c1c8dbf..eb659661 100644 --- a/src/templates/src/jams_index.html +++ b/src/templates/src/jams_index.html @@ -17,31 +17,31 @@
    -
    +
    -
    +
    -
    +
    -
    +
    -
    +
    - +

    LISP Jam

    diff --git a/src/templates/src/landing.html b/src/templates/src/landing.html index bd3aa09f..cbd3e14d 100644 --- a/src/templates/src/landing.html +++ b/src/templates/src/landing.html @@ -67,7 +67,7 @@ -
    +

    We are working to correct the course of the software industry.

    We are a community of low-level programmers with high-level goals. Originally inspired by Casey Muratori's Handmade Hero, we dig deep into our systems and learn how to do things from scratch. We're not satisfied by the latest popular language or the framework of the month. Instead we care about how computers actually work.

    Software quality is declining, and modern development practices are making it worse. We need to change course. Help us get the software industry back on track.

    diff --git a/src/templates/src/layouts/base.html b/src/templates/src/layouts/base.html index 6374fe69..77dda46e 100644 --- a/src/templates/src/layouts/base.html +++ b/src/templates/src/layouts/base.html @@ -22,7 +22,7 @@ - + {{/* */}} @@ -75,7 +75,7 @@ -
    +
    {{ template "header.html" . }}
    We are currently in the process of converting the website to the new design. Some pages, like this one, are still broken. We appreciate your patience. diff --git a/src/templates/src/layouts/jam_2023_visibility_base.html b/src/templates/src/layouts/jam_2023_visibility_base.html index 66fb0955..8a57e834 100644 --- a/src/templates/src/layouts/jam_2023_visibility_base.html +++ b/src/templates/src/layouts/jam_2023_visibility_base.html @@ -348,7 +348,7 @@
    -
    +
    {{ template "header.html" . }}
    @@ -356,7 +356,7 @@ {{ block "content" . }}{{ end }}
    -
    +
    {{ template "footer.html" . }}
    diff --git a/src/templates/src/layouts/role_base.html b/src/templates/src/layouts/role_base.html index 8a97b5a5..14702287 100644 --- a/src/templates/src/layouts/role_base.html +++ b/src/templates/src/layouts/role_base.html @@ -1,7 +1,7 @@ {{ template "base.html" . }} {{ define "content" }} -
    +

    {{ .Role.Name }}

    {{ block "role content" . }}{{ end }} diff --git a/src/templates/src/layouts/timemachine_base.html b/src/templates/src/layouts/timemachine_base.html index 5fc14069..4811db4c 100644 --- a/src/templates/src/layouts/timemachine_base.html +++ b/src/templates/src/layouts/timemachine_base.html @@ -198,12 +198,12 @@
    -
    +
    {{ template "header.html" . }}
    -
    +
    {{ with .Breadcrumbs }}
    {{ range $i, $e := . -}} @@ -217,7 +217,7 @@
    {{ block "content" . }}{{ end }} -
    +
    {{ template "footer.html" . }}
    diff --git a/src/templates/src/layouts/wheeljam_2022_base.html b/src/templates/src/layouts/wheeljam_2022_base.html index da765b66..4ae6ee8f 100644 --- a/src/templates/src/layouts/wheeljam_2022_base.html +++ b/src/templates/src/layouts/wheeljam_2022_base.html @@ -341,13 +341,13 @@
    -
    +
    {{ template "header.html" . }}
    {{ block "content" . }}{{ end }} -
    +
    {{ template "footer.html" . }}
    diff --git a/src/templates/src/layouts/wheeljam_2023_base.html b/src/templates/src/layouts/wheeljam_2023_base.html index d630e579..7f693c61 100644 --- a/src/templates/src/layouts/wheeljam_2023_base.html +++ b/src/templates/src/layouts/wheeljam_2023_base.html @@ -344,13 +344,13 @@
    -
    +
    {{ template "header.html" . }}
    {{ block "content" . }}{{ end }} -
    +
    {{ template "footer.html" . }}
    diff --git a/src/templates/src/manifesto.html b/src/templates/src/manifesto.html index 8d7ab47d..70de5bf3 100644 --- a/src/templates/src/manifesto.html +++ b/src/templates/src/manifesto.html @@ -1,7 +1,7 @@ {{ template "base-2024.html" . }} {{ define "content" }} -
    +

    Computers are amazing.

    Computing has changed our lives for the better. Computers allow us to learn, connect with each other, and express ourselves in amazing new ways. And every year our devices get more powerful, less expensive, and more accessible - computers today can do things we hardly dreamed of twenty years ago.

    diff --git a/src/templates/src/project.css b/src/templates/src/project.css deleted file mode 100644 index 4a9867f7..00000000 --- a/src/templates/src/project.css +++ /dev/null @@ -1,153 +0,0 @@ -{ - { - $c : =hex2color .Color - } - } - - :root { - --theme-color: { - { - $c | color2css - } - } - - ; - - --theme-color-dim: { - { - lightness 0.75 $c | color2css - } - } - - ; - - --theme-color-dimmer: { - { - lightness 0.8 $c | color2css - } - } - - ; - - --theme-color-dimmest: { - { - lightness 0.85 $c | color2css - } - } - - ; - - --theme-color-dark: { - { - lightness 0.35 $c | color2css - } - } - - ; - - --theme-color-light: { - { - lightness 0.55 $c | color2css - } - } - - ; - - --link-color: { - { - lightness 0.35 $c | color2css - } - } - - ; - - --link-hover-color: { - { - lightness 0.45 $c | color2css - } - } - - ; - - --background-even-background: { - { - lightness 0.95 $c | color2css - } - } - - ; - - --input-lite-border: var(--link-color); - } - - @media (prefers-color-scheme: dark) { - :root { - --theme-color-dim: { - { - lightness 0.35 $c | color2css - } - } - - ; - - --theme-color-dimmer: { - { - lightness 0.3 $c | color2css - } - } - - ; - - --theme-color-dimmest: { - { - lightness 0.2 $c | color2css - } - } - - ; - - --theme-color-dark: { - { - lightness 0.30 $c | color2css - } - } - - ; - - --theme-color-light: { - { - lightness 0.55 $c | color2css - } - } - - ; - - --link-color: { - { - lightness 0.55 $c | color2css - } - } - - ; - - --link-hover-color: { - { - lightness 0.65 $c | color2css - } - } - - ; - - --background-even-background: { - { - lightness 0.15 $c | color2css - } - } - - ; - } - } - - .unread .avatar { - border: 2px solid var(--link-color); - } \ No newline at end of file diff --git a/src/templates/src/project_index.html b/src/templates/src/project_index.html index 9e21e39c..b12be391 100644 --- a/src/templates/src/project_index.html +++ b/src/templates/src/project_index.html @@ -2,17 +2,16 @@ {{ define "content" }}
    -
    - {{ if .OfficialProjects }} -
    -

    Official Projects

    -
    - {{ range .OfficialProjects }} - {{ template "project_card.html" . }} - {{ end }} -
    -
    - {{ end }} +
    +

    Featured Projects

    +
    +

    Inspired by Handmade Hero, the Handmade Network community has produced a wide variety of fantastic projects, including apps, debuggers, editors, libraries, and even programming languages.

    +
    +
    + {{ range .OfficialProjects }} + {{ template "project_card.html" . }} + {{ end }} +
    {{ end }} diff --git a/src/templates/src/style_test.html b/src/templates/src/style_test.html index fb0d9a69..e6b4f092 100644 --- a/src/templates/src/style_test.html +++ b/src/templates/src/style_test.html @@ -133,6 +133,10 @@ int main() { +
    +

    Don't believe everything you read on the internet.

    +

    -Abraham Lincoln

    +

    Form styles

    diff --git a/src/templates/src/timemachine.html b/src/templates/src/timemachine.html index 919dd6be..45f64bd1 100644 --- a/src/templates/src/timemachine.html +++ b/src/templates/src/timemachine.html @@ -2,7 +2,7 @@ {{ define "content" }} -
    +
    +
    diff --git a/src/templates/src/timemachine_submit.html b/src/templates/src/timemachine_submit.html index 55a57276..34344524 100644 --- a/src/templates/src/timemachine_submit.html +++ b/src/templates/src/timemachine_submit.html @@ -8,8 +8,8 @@ {{ end }} {{ define "content" }} -
    -
    +
    +
    {{ template "frame title" "Submit A Video" }} {{ csrftoken .Session }} diff --git a/src/templates/src/timemachine_thanks.html b/src/templates/src/timemachine_thanks.html index 8cd1e2a4..8e1e01ff 100644 --- a/src/templates/src/timemachine_thanks.html +++ b/src/templates/src/timemachine_thanks.html @@ -8,7 +8,7 @@ {{ end }} {{ define "content" }} -
    +
    {{ template "frame title" "Submission Complete" }} diff --git a/src/templates/types.go b/src/templates/types.go index 8891429b..572b951f 100644 --- a/src/templates/types.go +++ b/src/templates/types.go @@ -18,7 +18,6 @@ type BaseData struct { CurrentUrl string CurrentProjectUrl string LoginPageUrl string - ProjectCSSUrl string DiscordInviteUrl string NewsletterSignupUrl string diff --git a/src/website/base_data.go b/src/website/base_data.go index efca7ee7..ce5ace4f 100644 --- a/src/website/base_data.go +++ b/src/website/base_data.go @@ -50,7 +50,6 @@ func getBaseData(c *RequestContext, title string, breadcrumbs []templates.Breadc CurrentUrl: c.FullUrl(), CurrentProjectUrl: c.UrlContext.BuildHomepage(), LoginPageUrl: hmnurl.BuildLoginPage(c.FullUrl()), - ProjectCSSUrl: hmnurl.BuildProjectCSS(project.Color1), DiscordInviteUrl: "https://discord.gg/hmn", NewsletterSignupUrl: hmnurl.BuildAPINewsletterSignup(), diff --git a/src/website/projects.go b/src/website/projects.go index c08876d0..80e54e73 100644 --- a/src/website/projects.go +++ b/src/website/projects.go @@ -30,32 +30,6 @@ import ( const maxPersonalProjects = 10 const maxProjectOwners = 5 -func ProjectCSS(c *RequestContext) ResponseData { - color := c.URL().Query().Get("color") - if color == "" { - return c.ErrorResponse(http.StatusBadRequest, NewSafeError(nil, "You must provide a 'color' parameter.\n")) - } - - baseData := getBaseData(c, "", nil) - - templateData := struct { - templates.BaseData - Color string - }{ - BaseData: baseData, - Color: color, - } - - var res ResponseData - res.Header().Add("Content-Type", "text/css") - err := res.WriteTemplate("project.css", templateData, c.Perf) - if err != nil { - return c.ErrorResponse(http.StatusInternalServerError, oops.New(err, "failed to generate project CSS")) - } - - return res -} - type ProjectTemplateData struct { templates.BaseData diff --git a/src/website/routes.go b/src/website/routes.go index 57b6f470..bb9941cd 100644 --- a/src/website/routes.go +++ b/src/website/routes.go @@ -302,7 +302,6 @@ func NewWebsiteRoutes(conn *pgxpool.Pool) http.Handler { anyProject.GET(hmnurl.RegexEpisode, Episode) anyProject.GET(hmnurl.RegexCineraIndex, CineraIndex) - anyProject.GET(hmnurl.RegexProjectCSS, ProjectCSS) anyProject.GET(hmnurl.RegexMarkdownWorkerJS, func(c *RequestContext) ResponseData { var res ResponseData res.MustWriteTemplate("markdown_worker.js", nil, c.Perf) diff --git a/todo-styles.md b/todo-styles.md index f3818a14..49a444cc 100644 --- a/todo-styles.md +++ b/todo-styles.md @@ -60,6 +60,7 @@ - [ ] Make snippet descriptions partially collapse by default - [ ] Make the home page remember which tab you were on - [ ] 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. stack!