-
Notifications
You must be signed in to change notification settings - Fork 38
elad-abutbul #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
elad-abutbul #14
Conversation
Tamir198
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work overall, left you some commetns
| @@ -0,0 +1,8 @@ | |||
| :root { | |||
| --red: hsl(4, 100%, 67%); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good practice to use css variables
| display: flex; | ||
| flex-direction: column; | ||
| } | ||
| .font-weight-600{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would change this name into something like font-bold so in the future you will be able to change the value of this the selector name will remain relevant
| justify-content: center; | ||
| align-items: center; | ||
| } | ||
| .button { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you give a button class button that a bit redundant, try to give this a better more meaningful name.
The name should indicate what the button should so like submit-button etc...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It’s a generic button class because there are two buttons — one in the signup page and one in the success page. They look the same, so there’s no reason to give them different class names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could give them the same class with more meaningful meaning like what they are doing
If you will add another button that will not looks like this then it can be confusing to have button class
| transition: 0.2s ease-in; | ||
| } | ||
| .button:hover { | ||
| background: linear-gradient(90deg, hsl(347, 100%, 66%), hsl(13, 100%, 61%)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This as well can be saved inside css variable
| box-shadow: 0 12px 20px rgba(255, 83, 123, 0.35); | ||
| } | ||
|
|
||
| /* */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove those comments, they are not contributing to the understanding of the code
|
|
||
|
|
||
|
|
||
| // handlerim | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the same reason above we can remove this comments
|
|
||
| const email = emailInput.value.trim(); | ||
|
|
||
| if (isValidEmail(email)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should also check that the email is defined and not undefined or null
|
|
||
| emailInput.classList.remove("input-error"); | ||
|
|
||
| errorMsg.style.display = "none"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its better to add class name and via css give this element styling of hidden or displayed
|
|
||
| emailInput.classList.add("input-error"); | ||
|
|
||
| errorMsg.style.display = "block"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same in here
| function toggleViews(toggle) { | ||
|
|
||
| if (toggle=="signup") { | ||
| signup.style.display = "flex"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this function you can have early return and by doing so you will not need the else statement:
function toggleViews(toggle) {
if (toggle === "signup") {
signup.style.display = "flex";
success.style.display = "none";
return;
}
signup.style.display = "none";
success.style.display = "flex";
}
No description provided.