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

time tracking HTML CSS JavaScript

Luis 220

@luisv79

Desktop design screenshot for the Time tracking dashboard coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Community feedback

P

@Jomagene

Posted

Feedback @luisv79 Congratulations on completing the challenge and implementing the required features—the content updates correctly when options are selected, and the hover effects and responsiveness are nicely done.

One suggestion: when a menu item is clicked, the active state isn't visually indicated. To enhance user experience, you could highlight the selected item by keeping it styled in white while others are dimmed.

Based on your code structure, you can achieve this by adding an "active" class to the clicked menu item and removing it from the others:

dailyBtn.addEventListener("click", () => {
  dibujarElementos(dailyArray);
  dailyBtn.classList.add("active");
  weeklyBtn.classList.remove("active");
  monthlyBtn.classList.remove("active");
});

weeklyBtn.addEventListener("click", () => {
  dibujarElementos(weeklyArray);
  weeklyBtn.classList.add("active");
  dailyBtn.classList.remove("active");
  monthlyBtn.classList.remove("active");
});

monthlyBtn.addEventListener("click", () => {
  dibujarElementos(monthlyArray);
  monthlyBtn.classList.add("active");
  dailyBtn.classList.remove("active");
  weeklyBtn.classList.remove("active");
});

And add this to your CSS:

.active {
  color: white;
}

This will visually indicate the active menu item, improving the user experience. Hope this was helpful!

0

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