Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 6 months ago

Time Tracking Dashboard 🫡

pure-css
P
Josh Kahlbaugh•540
@Joshk7
A solution to the Time tracking dashboard challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

I'm happy with the animations and how they turned out. I might have changed how I handle populating the data for current and previous times on each card.

Currently, this is how I'm doing it:

const populateDashboard = (data, time) => {
    for (let i = 0; i < data.length; i++) {
        const { current, previous } = data[i].timeframes[time];
        currentStats[i].textContent = `${current}hrs`;
        previousStats[i].textContent = `${previous}hrs`;
    }
}

As long as the data is all in order, then this should work.

What challenges did you encounter, and how did you overcome them?

A challenge with styling was the background colors for each card. I had to set the parent container for each card to

position: relative;

and then have a background div set to

position: absolute;
border-bottom-right: 2rem;
border-bottom-left: 2rem;

Additionally, I set bottom border radius to twice that of the container's border radius so that I wouldn't see the corner of the background div.

What specific areas of your project would you like help with?

I'd like any suggestions on how to populate the cards data a better way if possible, thanks!

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Josh Kahlbaugh's solution.

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