-
Notifications
You must be signed in to change notification settings - Fork 38
[IMPROVE] wip #28
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?
[IMPROVE] wip #28
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.
Left you some comments, they are relevant for every place in the code
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| <link rel="stylesheet" href="style.css"> | ||
| <script type="text/javascript" src="./script.js"></script> | ||
| <!-- displays site properly based on user's device --> |
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 remove this comment
| <body> | ||
|
|
||
| <!-- Sign-up form start --> | ||
| <div class="wholeForm"> |
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.
just a suggestion - formContainer
| </ul> | ||
| <div class="emailBox"> | ||
| <h6 class="emailTitle"> Email address </h6> | ||
| <input id="inputData" placeholder="email@company.com" type="text" id="fname" name="fname"><br><br> |
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.
Why do you need id? could you use class instead?
| <h6 class="emailTitle"> Email address </h6> | ||
| <input id="inputData" placeholder="email@company.com" type="text" id="fname" name="fname"><br><br> | ||
| </div> | ||
| <button type="button" class="buttonClass" onclick="onSubClick()"> |
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.
the class is very general, can you try to find more specific name?
| <form class="mainForm" action=""> | ||
| <img src="./assets/images/icon-success.svg"> | ||
| <h1> | ||
| Thanks for subscribing! <span id="username"></span> |
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 here about the id
| Please open it and click the button inside to confirm your subscription. | ||
| </h5> | ||
|
|
||
| <button type="button" class="disButtonClass" onclick="onDislick()"> |
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 dont have to add the class part
| @@ -0,0 +1,6 @@ | |||
| let email = localStorage.getItem("userEmail"); | |||
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 extract everything related to local storage into a service and expose all of the methods from that service
| @@ -0,0 +1,6 @@ | |||
| let email = localStorage.getItem("userEmail"); | |||
| document.getElementById("currentValue").textContent = 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 can add null check for the element
| function onSubClick() { | ||
| const email = document.getElementById('inputData').value; | ||
| localStorage.setItem("userEmail", email); | ||
| window.location.href = "./msgPage.html"; |
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.
hardcoded strings should come from constants file
| @@ -0,0 +1,136 @@ | |||
| body { | |||
| background-color: hsl(235, 18%, 26%); | |||
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.
colors should come from css variables
No description provided.