This is a solution to the Time tracking dashboard challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
- View the optimal layout for the site depending on their device's screen size
- See hover states for all interactive elements on the page
- Switch between viewing Daily, Weekly, and Monthly stats
- Solution URL: Add solution URL here
- Live Site URL: https://shafqatrasool11.github.io/time-tracking-dashboard-main/
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- CSS Grid
While solving this challenge I learned how to hide/show multiple elements using a single javascript function, use variables in css for the first time.
//Javascript function I used to show/hide multiple elements
function showArticles(classToShow) {
const allArticles = document.querySelectorAll('.box__data');
allArticles.forEach((article) => {
if (article.classList.contains(classToShow)) {
article.style.display = 'flex';
} else {
article.style.display = 'none';
}
});
}
I will be focused in refining my javascript and learning new concepts in it.
- Website - Shafqat Rasool
- Frontend Mentor - @shafqatrasool11
- linkedin - Shafqat Rasool