From 02a41f56bd1f47dfdafdcb0681c70bff4ea9252a Mon Sep 17 00:00:00 2001 From: Asaf Gartner Date: Thu, 20 Jun 2024 18:29:36 +0300 Subject: [PATCH] Updated a bunch of pages --- src/templates/src/auth_do_password_reset.html | 57 ++++++------ src/templates/src/auth_email_validation.html | 26 +++--- src/templates/src/auth_login.html | 86 +++++++++---------- src/templates/src/auth_password_reset.html | 58 ++++++------- .../src/auth_password_reset_sent.html | 4 +- src/templates/src/auth_register.html | 70 +++++++-------- src/templates/src/auth_register_success.html | 4 +- src/templates/src/conferences.html | 6 +- src/templates/src/jams_index.html | 4 +- src/templates/src/reject.html | 10 +-- src/website/auth.go | 19 +++- 11 files changed, 165 insertions(+), 179 deletions(-) diff --git a/src/templates/src/auth_do_password_reset.html b/src/templates/src/auth_do_password_reset.html index 1e341d4..cfe0bad 100644 --- a/src/templates/src/auth_do_password_reset.html +++ b/src/templates/src/auth_do_password_reset.html @@ -1,38 +1,33 @@ -{{ template "base.html" . }} +{{ template "base-2024.html" . }} {{ define "content" }} -
-
-

Hi, {{ .Username }}!

-
- +
+

Hi, {{ .Username }}!

+
Please enter a new password.
+ + - {{/*NOTE: The username field isn't `type="hidden"` because this way browser will offer to save the username along with the password */}} - + {{/*NOTE: The username field isn't `type="hidden"` because this way browser will offer to save the username along with the password */}} + -
Please enter a new password.
+ -
- - -
- - - -
+ +
{{ end }} diff --git a/src/templates/src/auth_email_validation.html b/src/templates/src/auth_email_validation.html index c151684..afff138 100644 --- a/src/templates/src/auth_email_validation.html +++ b/src/templates/src/auth_email_validation.html @@ -1,8 +1,16 @@ -{{ template "base.html" . }} +{{ template "base-2024.html" . }} {{ define "content" }} -
-
+
+

Hi, {{ .Username }}!

+

+ You're almost done signing up. +

+

+ To complete your registration and log in, please enter the password you used during the registration process. +

+ + @@ -14,23 +22,15 @@ value="{{ .Username }}" readonly /> - -

Hi, {{ .Username }}!

-

- You're almost done signing up. -

-

- To complete your registration and log in, please enter the password you used during the registration process. -

- - diff --git a/src/templates/src/auth_login.html b/src/templates/src/auth_login.html index 4a40738..bf075bf 100644 --- a/src/templates/src/auth_login.html +++ b/src/templates/src/auth_login.html @@ -1,55 +1,47 @@ -{{ template "base.html" . }} +{{ template "base-2024.html" . }} {{ define "content" }} -
-
-

Log in

- - - -
- - -
+
+

Log in

+ + + + -
-
- - Forgot your password? -
- -
- -
- -
+ + Forgot your password? + +
+ +
-
- Need an account? Sign up. -
+
+ Need an account? Sign up. +
-
-
Third-party login
-
- - Log in with Discord - -
+
+
Third-party login
+ - -
+
+
{{ end }} diff --git a/src/templates/src/auth_password_reset.html b/src/templates/src/auth_password_reset.html index 3fd1b4f..7a7ebbb 100644 --- a/src/templates/src/auth_password_reset.html +++ b/src/templates/src/auth_password_reset.html @@ -1,40 +1,32 @@ -{{ template "base.html" . }} +{{ template "base-2024.html" . }} {{ define "content" }} -
-
-

Reset your password

-
-
- - -
+
+

Reset your password

+ + -
- - -
+ -
- -
+ -
- Note: To avoid spamming you with password reset links, we limit the number of requests per account every 24 hours. -
- -
+
+ Note: To avoid spamming you with password reset links, we limit the number of requests per account every 24 hours. +
+
{{ end }} diff --git a/src/templates/src/auth_password_reset_sent.html b/src/templates/src/auth_password_reset_sent.html index 9bb126f..0fd295f 100644 --- a/src/templates/src/auth_password_reset_sent.html +++ b/src/templates/src/auth_password_reset_sent.html @@ -1,7 +1,7 @@ -{{ template "base.html" . }} +{{ template "base-2024.html" . }} {{ define "content" }} -
+

A password reset link was sent.

It will expire in 24 hours. diff --git a/src/templates/src/auth_register.html b/src/templates/src/auth_register.html index 1201dfb..0ae8905 100644 --- a/src/templates/src/auth_register.html +++ b/src/templates/src/auth_register.html @@ -1,56 +1,48 @@ -{{ template "base.html" . }} +{{ template "base-2024.html" . }} {{ define "content" }} -

+
-

Sign up

-
+

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 */}} -
- - -
+ -
- - -
+ -
- - -
+ -
- - -
+ {{/* TODO(asaf): Consider adding some bot-mitigation thing here */}}
- +
diff --git a/src/templates/src/auth_register_success.html b/src/templates/src/auth_register_success.html index d63fec7..6283a98 100644 --- a/src/templates/src/auth_register_success.html +++ b/src/templates/src/auth_register_success.html @@ -1,7 +1,7 @@ -{{ template "base.html" . }} +{{ template "base-2024.html" . }} {{ define "content" }} -
+

Verify your email

We've sent you an email with a confirmation link. Please follow it to complete the registration process. diff --git a/src/templates/src/conferences.html b/src/templates/src/conferences.html index 1d2af84..685e3d6 100644 --- a/src/templates/src/conferences.html +++ b/src/templates/src/conferences.html @@ -1,9 +1,9 @@ -{{ template "base.html" . }} +{{ template "base-2024.html" . }} {{ define "content" }} {{ $bannerclass := "overflow-hidden br2 mt2 h4 h5-ns cover bg-center" }} -

-
+
+

HandmadeCon

diff --git a/src/templates/src/jams_index.html b/src/templates/src/jams_index.html index 015cde3..bb1f110 100644 --- a/src/templates/src/jams_index.html +++ b/src/templates/src/jams_index.html @@ -1,4 +1,4 @@ -{{ template "base.html" . }} +{{ template "base-2024.html" . }} {{ define "extrahead" }}