Skip to content

Commit

Permalink
Password hashing update; minor style tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
toddbirchard committed Dec 16, 2023
1 parent 27d829a commit 0c997a0
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 20 deletions.
2 changes: 1 addition & 1 deletion flask_login_tutorial/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class User(UserMixin, db.Model):

def set_password(self, password):
"""Create hashed password."""
self.password = generate_password_hash(password, method="sha256")
self.password = generate_password_hash(password)

def check_password(self, password):
"""Check hashed password."""
Expand Down
2 changes: 1 addition & 1 deletion flask_login_tutorial/static/dist/css/account.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 15 additions & 18 deletions flask_login_tutorial/static/src/less/account.less
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
@media (max-width: 600px) {
width: auto;
margin: 0;
padding: 30px;
padding: 30px 10vw;
max-width: unset;
}

.logo {
Expand All @@ -29,19 +30,15 @@
img {
width: 50px;
margin: auto;

@media (max-width: 600px) {
width: 40px;
}
}
}

.alert-warning {
color: #856404;
background-color: #fff3cd;
border-color: #ffeeba;
color: @alert-warning-text-color;
background-color: @alert-warning-bg-color;
border-color: @alert-warning-border-color;
font-weight: 300;
font-size: .8em;
font-size: 1em;
margin: 30px 0;
display: flex;
align-items: center;
Expand All @@ -51,7 +48,7 @@
}

.close {
color: #856404;
color: @alert-warning-text-color;
font-weight: 300;
order: 1;
outline: none !important;
Expand Down Expand Up @@ -87,7 +84,7 @@
}

h1 {
font-size: 1.5rem;
font-size: 1.9em;
color: @header-color;
font-weight: 300;
border-bottom: 1px solid #dee2ef;
Expand All @@ -107,16 +104,16 @@
width: -webkit-fill-available;
width: -moz-available;
border-radius: 2px;
border: 1px solid #d4d9e3;
border: 1px solid @input-field-border-color;
font-weight: 200;
color: #4d5060;
font-size: 1.1em;
color: @input-field-font-color;
font-family: @body-font;
transition: @transition;
font-size: .9em;
outline-color: transparent;
outline-style: none;
@media (max-width: 600px) {
font-size: .9em;
font-size: 1em;
}

&::placeholder {
Expand All @@ -125,7 +122,7 @@

&:hover {
border-color: @theme-color;
background: #d9f6ff;
background: @input-field-hover-color;

&::placeholder {
color: @theme-color;
Expand All @@ -138,7 +135,7 @@
box-shadow: unset;

&::placeholder {
color: #d4d9e3;
color: @input-field-placeholder-color;
}
}
}
Expand Down Expand Up @@ -187,7 +184,7 @@
.login-signup {
text-align: center;
font-weight: 300;
font-size: 0.8em;
font-size: 1em;
font-family: @body-font;
margin-top: 20px;

Expand Down
12 changes: 12 additions & 0 deletions flask_login_tutorial/static/src/less/vars.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@
@box-shadow: 0 0 5px rgba(65, 67, 144, 0.15);
@header-color: #5f6988;

// Form Colors
@input-field-border-color: #d4d9e3;
@input-field-font-color: #4d5060;
@input-field-hover-color: #d9f6ff;
@input-field-placeholder-color: #d4d9e3;

// Alert Colors
@alert-warning-text-color: #856404;
@alert-warning-bg-color: #fff3cd;
@alert-warning-border-color: #ffeeba;


// Fonts
@body-font: 'Poppins', sans-serif;

Expand Down

0 comments on commit 0c997a0

Please sign in to comment.