Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 3 years ago

Landing page with using flexbox and grid + vanilla JavaScript

Tyson Monteiro•180
@TaysonGermano
A solution to the Blogr landing page challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


I would appreciate any feedback from you guys. My CSS is a mess LOL

Code
Couldn’t fetch repository

Please log in to post a comment

Log in with GitHub

Community feedback

  • Raymart Pamplona•16,040
    @pikapikamart
    Posted over 3 years ago

    Hey, awesome work on this one. Desktop layout looks fine just a little shorter than the design, the site is responsive though and the mobile state looks great.

    To be honest, I still find this challenge really hard so bear with me on this one:>

    • For this one, I would prefer to only use header for the topmost part that includes the navbar. The header would be position: absolute onto the top part so that your first section of the main could occupy those spacings up top and still creating that background-image. The reason that I only include the navbar inside the header and not those text on the hero-section is because the primary header is typically reused on different pages since it includes the link, by including those text inside the header you won't be able to do this right.
    • I wouldn't include the header-logo inside the nav since it is not being treated as a link, if you somehow use a tag to wrap the logo, then you can include it, but remember to label the a tag properly on where the link would take the user.
    • Those 3 items, product ,company, connect should be a button and not a link because the items on the dropdown per category are the ones that should be links.
    1. ( Hide img element: Decorative images should be hidden for screen-reader at all times by using alt="" and aria-hidden="true" to the img tag or only aria-hidden="true" if the image is using svg.)
    • The arrow-icon per category should be hidden, use method number 1. A more proper markup per category looks somewhat like this:
    <nav>
     <ul>
      <li>
        <button class="button__product aria-expanded="false">Product</button>
        <ul class="category__product>
          { links in here }
        </ul>
      </li>
     </ul> 
    </nav>
    

    Then you could just something like:

    .category__product {
      display: none;
    }
    
    .button__product[aria-expanded="true"] + .category__product{
      display: none
    }
    

    As you can see, you should use the aria-expanded="false" as default attribute on the button and it will be set to true by javascript if the user toggles the button and vice-versa.

    • learn more is better to use a tag rather than button since it looks more a page link rather than a modal right.

    FOOTER

    • Use a more proper alt value for the website-logo.
    • Those links could have been inside a nav element since those are still your website's navigational links.
    • Also, same as the markup that I proposed earlier, you could use ul inside the nav and each li would be its own category. The first li would wrap the the product category and so on.

    MOBILE

    • Hamburger menu should be using a button since it is an interactive component.

    SUPPOSING BUTTON IS USED

    • The button should have a default attribute of aria-expanded="false" and it will be set to true when the users toggles it and vice-versa.
    • The hamburger button should have either aria-label attribute or sr-only text inside it which defines what the button does. You could use aria-label="navigation dropdown menu" as the text-value.
    • The img inside the hamburger-menu should have been hidden properly by adding aria-hidden="true" on it.

    Aside from those, great job again on this one.

    Marked as helpful

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

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 all CSS, SCSS and Less files in your repository.

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.

How does the JavaScript validation report work?

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

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

Oops! 😬

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

Log in with GitHub