From 0e770aa13994f18f4d37bdddc670acfd17187e35 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 12 Dec 2023 13:54:34 +0100 Subject: Improve login page. --- views/create.pug | 72 +++++++++++++++++++++++++++++++------------------------- views/join.pug | 2 +- views/login.pug | 4 ++++ views/signup.pug | 2 +- 4 files changed, 46 insertions(+), 34 deletions(-) (limited to 'views') diff --git a/views/create.pug b/views/create.pug index 7a8a6b8..4e52da4 100644 --- a/views/create.pug +++ b/views/create.pug @@ -13,6 +13,9 @@ html div.logo +gamecover(title.title_id) + if !user + p.error You are not logged in! + form(method="post" action="/create/"+title.title_id) if Array.isArray(scenarios) if scenarios.length > 1 @@ -38,43 +41,48 @@ html | !{ title.create_html } - p Notice: - br - input(type="text" autocomplete="off" name="notice" size=45 placeholder="What are you looking for?") + if user + p Notice: + br + input(type="text" autocomplete="off" name="notice" size=45 placeholder="What are you looking for?") + + p Pace: + br + label + input(type="radio" name="pace" value="0" checked) + | Any - p Pace: - br - label - input(type="radio" name="pace" value="0" checked) - | Any + br + label + input(type="radio" name="pace" value="1") + | #{EMOJI_LIVE} Live - br - label - input(type="radio" name="pace" value="1") - | #{EMOJI_LIVE} Live + br + label + input(type="radio" name="pace" value="2") + | #{EMOJI_FAST} Fast – many moves per day - br - label - input(type="radio" name="pace" value="2") - | #{EMOJI_FAST} Fast – many moves per day + br + label + input(type="radio" name="pace" value="3") + | #{EMOJI_SLOW} Slow – one move per day - br - label - input(type="radio" name="pace" value="3") - | #{EMOJI_SLOW} Slow – one move per day + p + label + input(type="checkbox" name="is_random" value="true") + | Random player roles - p - label - input(type="checkbox" name="is_random" value="true") - | Random player roles + p + label + input(type="checkbox" name="is_private" value="true") + | Private - p - label - input(type="checkbox" name="is_private" value="true") - | Private + if limit + p.error= limit + else + p + button(type="submit") Create - if limit - p.error= limit else - p - button(type="submit") Create + p Login or sign up to play. + diff --git a/views/join.pug b/views/join.pug index 280e2e6..2fc9287 100644 --- a/views/join.pug +++ b/views/join.pug @@ -103,4 +103,4 @@ html button.hide#start_button(onclick="start()" disabled) Start if !user && !ready - p Login or sign up to play this game. + p Login or sign up to play. diff --git a/views/login.pug b/views/login.pug index 72154f0..a470b59 100644 --- a/views/login.pug +++ b/views/login.pug @@ -11,6 +11,10 @@ html if flash p.error= flash + if redirect + p You need to be logged in to view this page! + p Log in below, or sign up for a free account. + if user p You're already logged in! else diff --git a/views/signup.pug b/views/signup.pug index 70de257..8ce41a2 100644 --- a/views/signup.pug +++ b/views/signup.pug @@ -29,7 +29,7 @@ html br input(type="email" name="mail" required) br - i Your mail address is only used for turn notifications and password recovery. + i Your mail address is only used for game notifications and password recovery. br i It will not be visible to other players. p -- cgit v1.2.3