From b3ee685a70a84c67f3e86013c3ad8c487bcdcbeb Mon Sep 17 00:00:00 2001 From: syeopite Date: Wed, 26 Jul 2023 13:56:49 -0700 Subject: [PATCH] Add infrastructure for /signup page --- assets/css/signin-signout.css | 7 +++++++ src/invidious/routes/login.cr | 3 +++ src/invidious/routing.cr | 1 + src/invidious/views/user/login.ecr | 11 ++++++++--- 4 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 assets/css/signin-signout.css diff --git a/assets/css/signin-signout.css b/assets/css/signin-signout.css new file mode 100644 index 00000000..15b39280 --- /dev/null +++ b/assets/css/signin-signout.css @@ -0,0 +1,7 @@ +#signin-button { + float: right; +} + +.account-page-action-bar { + margin-top: 1em; +} diff --git a/src/invidious/routes/login.cr b/src/invidious/routes/login.cr index 071dd035..6eaf3071 100644 --- a/src/invidious/routes/login.cr +++ b/src/invidious/routes/login.cr @@ -27,6 +27,9 @@ module Invidious::Routes::Login templated "user/login" end + def self.signup_page(env) + end + def self.login(env) locale = env.get("preferences").as(Preferences).locale diff --git a/src/invidious/routing.cr b/src/invidious/routing.cr index 9c43171c..9ba67411 100644 --- a/src/invidious/routing.cr +++ b/src/invidious/routing.cr @@ -55,6 +55,7 @@ module Invidious::Routing def register_user_routes # User login/out get "/login", Routes::Login, :login_page + get "/signup", Routes::Login, :signup_page post "/login", Routes::Login, :login post "/signout", Routes::Login, :signout diff --git a/src/invidious/views/user/login.ecr b/src/invidious/views/user/login.ecr index 2b03d280..078eaa5c 100644 --- a/src/invidious/views/user/login.ecr +++ b/src/invidious/views/user/login.ecr @@ -1,5 +1,6 @@ <% content_for "header" do %> <%= translate(locale, "Log in") %> - Invidious + <% end %>
@@ -64,9 +65,13 @@ <% end %> <% else %> - + <% end %>