diff --git a/app/blueprints/users/account.py b/app/blueprints/users/account.py index 458d382..c996541 100644 --- a/app/blueprints/users/account.py +++ b/app/blueprints/users/account.py @@ -33,8 +33,8 @@ from . import bp class LoginForm(FlaskForm): username = StringField("Username or email", [InputRequired()]) password = PasswordField("Password", [InputRequired(), Length(6, 100)]) - remember_me = BooleanField("Remember me") - submit = SubmitField("Login") + remember_me = BooleanField("Remember me", default=True) + submit = SubmitField("Sign in") def handle_login(form): @@ -86,6 +86,9 @@ def login(): if ret: return ret + if request.method == "GET": + form.remember_me.data = True + return render_template("users/login.html", form=form) diff --git a/app/scss/components.scss b/app/scss/components.scss index 8e5c6bc..31b7268 100644 --- a/app/scss/components.scss +++ b/app/scss/components.scss @@ -169,3 +169,43 @@ blockquote { margin-bottom: 0.5em; } } + + +.signin { + width: 100%; + max-width: 330px; + padding: 15px; + margin: 0 auto; + + .form-control { + position: relative; + box-sizing: border-box; + height: auto; + padding: 10px; + font-size: 16px; + } + + .form-group { + margin-bottom: 0; + } + + .form-control:focus { + z-index: 2; + } + + .checkbox { + font-weight: 400; + } + + input[type="text"] { + margin-bottom: -1px; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; + } + + input[type="password"] { + margin-bottom: 10px; + border-top-left-radius: 0; + border-top-right-radius: 0; + } +} diff --git a/app/templates/base.html b/app/templates/base.html index 5c4f9a7..842e8bf 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -7,7 +7,7 @@