Responsive Coming Soon Page using HTML, CSS, JavaScript.
Design comparison
Solution retrospective
Any advice or changes that would improve my code would be appreciated. Thanks in advance for any help or feedback!
Community feedback
- @kens-visualsPosted about 3 years ago
Hey @DanielJvV 👋🏻
I have some suggestion about your JS file.
- First, instead of
mouseenter
andmouseleave
you can just simply add:hover
with your CSS, in my opinion those two events are a bit of overkill for this scenario. - Next, there should be two types of messages, like in the following pseudocode:
if(input is empty) { errorText = ' 'Whoops! It looks like you forgot to add your email''; } else if (email is invalid) { errorText = 'Please provide a valid email address'; }
- Lastly, you should validate the input with RegEx, which will cover edge cases as well. Otherwise, if I insert
@.co
I don't get any errors, although this is not a valid email.
I hope this was helpful 👨🏻💻 if you need a reference point, you can check out my solution. Other than that, you did a great job, especially with responsiveness. Cheers 👾
Marked as helpful0@DanielJvVPosted about 3 years ago@kens-visuals Thanks for the feedback. I don't know how to change the colour of the icons to white when using :hover. So I decided to get white and blue icons then swap them out when you enter or leave the div... Haha I was trying to fill the gap in my knowledge. I've tried finding the answer online with no luck. I'll look into RegEx thanks.
0@kens-visualsPosted about 3 years ago@DanielJvV you're welcome 😇 oh that's smart 🤔 I mean, at the end of the day, the goal is to finish the project anyway possible right? 😅 Well, if you need a reference, you can check out my solution.
Marked as helpful0 - First, instead of
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord