Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 1 year ago

Base Apparel coming soon page

Nrosta•530
@Nrotsa
A solution to the Base Apparel coming soon page challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Hi, here is my solution to this challenge.

It's not the best solution, but I focused mainly on js. I'm sure there's a better way to check if there's an email in the input, so I'd really appreciate feedback on this matter.

If you have any ideas on what I can improve in the code or notice any errors, please let me know.

Feedback is welcome

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Ehsan Tatasadi•1,800
    @tatasadi
    Posted over 1 year ago

    Hey there,

    Good job on completing this challenge! Your implementation showcases a good understanding of HTML and CSS fundamentals. Here are some suggestions to refine your project further:

    Fixed Position of Attribution: The current fixed positioning of the attribution can cause overlapping issues on smaller devices. To prevent this, consider placing the attribution within the flow of the document, perhaps at the bottom of the main content. This will ensure it doesn't overlap with other elements on smaller screens.

    Email Validation Logic: The JavaScript logic for email validation could be more robust. Instead of just checking for the presence of an "@" symbol, use a regular expression to validate the email format. For example:

    const emailRegex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
    
    if (!emailRegex.test(emailInput.value)) {
        // Show error
    } else {
        // Success action
    }
    

    This will provide a more accurate validation for email addresses.

    See this link for more info.

    Alt Attribute for Error Icon: Always include an alt attribute for images to improve accessibility. For the error icon, you can add alt="Error icon" to describe the image. This helps screen readers and users who cannot see the image understand its purpose.

    Consistent Units in CSS: You've used both em and rem units for padding in your button style. It's best to stick to one unit for consistency. rem units are often preferred for responsive designs as they are relative to the root font size and provide more consistent scaling.

    Implementing these suggestions will enhance the functionality, accessibility, and responsiveness of your project. Keep up the good work!

    Marked as helpful
  • Nrosta•530
    @Nrotsa
    Posted over 1 year ago

    Hi Ehsan Tatasadi. Thank you very much for your valuable feedback. I will implement all your suggestions in future projects. Thank you also for the link to the page with detailed information about the email validation logic, now I understand it and I can now implement it in my code :)

Join 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
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit 1st-party linked stylesheets, and styles within <style> tags.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub