-
Notifications
You must be signed in to change notification settings - Fork 38
elyan/newsletter #18
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?
elyan/newsletter #18
Conversation
98e3b3d to
f0dd90e
Compare
f0dd90e to
3d2b1c9
Compare
R0EYK
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.
Hi, I have left you some notes on your code.
Good job overall, code is stractured nice and is easy to read.
| <!-- displays site properly based on user's device. :O --> | ||
|
|
||
| <!-- This is for the requested font --> | ||
| <link rel="preconnect" href="https://fonts.googleapis.com"> |
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.
These days its considered best practice to import the fonts and use them in your css , you can do it really easily
@font-face {
font-family:Roboto ;
src: url(./assets/fonts/Roboto-Regular.ttf);
}
.body {
font-family: 'Roboto';
}
This would apply that font to all elements in your body and it looks cleaner
| Join 60,000+ product managers receiving monthly updates on: | ||
|
|
||
| <!-- Sign-up form end --> | ||
| <div class="bullet-list"> |
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 my OCD but in some codebases or companys, they will be hard with naming conventions,
so if you started naming your classes with camel case convention (someVariable), try to stick with it and do not have some-variable
|
|
||
| <!-- Success message start --> | ||
| <div class="emailPart"> | ||
| <form action="" method="post" target="_self"> |
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 <form> action , method and target are meant to help us send the form data to some API endpoint which we are not trying to do now, so we can remove these to avoid the form sending weird api requests currently
| <div class="emailPart"> | ||
| <form action="" method="post" target="_self"> | ||
| <h5>Email address:</h5> | ||
| <input type="email" placeholder="email@company.com" class="emailBox" name="email" id="email" required><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.
Good job on using these input attributes, many HTML elements gives us attributes which we normally would have to use JavaScript to get, but being aware of them can save us coding time
| } | ||
|
|
||
| .hidden { | ||
| display: none !important; |
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.
Do we actually need to imporant here ?
| max-width: 700px; | ||
| background-color: white; | ||
| border-radius: 3%; | ||
| overflow: hidden; |
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.
Border radius and paddings are usually given with some other measurment value instead of percentages, try using rem,
this would give you much more consistent layout
| } | ||
|
|
||
| .submitButton{ | ||
| 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.
Consider using CSS variables for these colors, it will make the code easier to understand and you will have a single source of truth for your collor pallete
|
|
||
| if (!emailAddress) { | ||
| console.error("Error: Could not find the email input field! Check your HTML IDs."); | ||
| return; |
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 we need to validate ourselves here? We are the developers so if we have an element with an id called "email"
we know this would exist so no reason to check for it
No description provided.