Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Dashboard using SCSS, Grid, BEM and Vanilla JS

Patrick 800

@PPechmann

Desktop design screenshot for the Time tracking dashboard coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


Got a nice little practice on CSS Grid again! This time I used the BEM methodology (haven´t used it in a long time).

This was my first time working with JSON data, which I always imagined way more complicated than it actually was.

I am very happy with the resut and as always, look forward to your expertise in form of a constructive feedback :)

Happy coding to everyone!

Community feedback

Elaine 11,400

@elaineleung

Posted

Hi Patrick, well done putting this together, and yes, working with JSON is actually not so hard! 🙂

I'm viewing this on Firefox, and I did try to click around on the timeframe labels, but the information did not get changed, so I tested it on Chrome, and everything worked. You may want to try it out on Firefox too if you have it, and if you want to try another way for getting JSON data instead of using import, you can use fetch(), which is what I used in my solution.

Some other quick comments I have:

  1. I noticed you using position: absolute with transform for centering the component; you can try adding in the body selector either display: grid with place-content: center or use display: flex with align-items:center and justify-content:center, and since the body selector already has min-height: 100vh, that should work right away after removing all the absolute positioning properties.

  2. I think at around the 800-900px breakpoint, the component becomes rather small with some white space around the sides, and the text gets hard to read. Maybe you can try another grid layout, or remove the fixed width you have on the cards, which is not really needed anyway because you're using grid-template-columns, and that should set the column automatically if the right values are used, and that can also allow for better responsiveness!

That's all the quick comments I have, and if you're interested in another JSON challenge, you can check out the expenses chart component. Happy coding!

Marked as helpful

1

Please log in to post a comment

Log in with GitHub
Discord logo

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