{"id":22962189,"url":"https://github.com/adityanandanx/time-tracking-dashboard-solution","last_synced_at":"2025-04-02T03:24:15.909Z","repository":{"id":157046642,"uuid":"418087983","full_name":"adityanandanx/Time-tracking-dashboard-solution","owner":"adityanandanx","description":"This is my solution to the Time tracking dashboard challenge on Frontend Mentor. ","archived":false,"fork":false,"pushed_at":"2021-10-17T11:20:43.000Z","size":351,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-07T18:17:43.307Z","etag":null,"topics":["frontend","frontend-web","frontendmentor","frontendmentor-challenge","frontendpractice","time-trac","website"],"latest_commit_sha":null,"homepage":"https://imadi-arch.github.io/Time-tracking-dashboard-solution/","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adityanandanx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-17T10:07:21.000Z","updated_at":"2021-10-19T06:37:46.000Z","dependencies_parsed_at":"2024-04-28T09:36:05.188Z","dependency_job_id":null,"html_url":"https://github.com/adityanandanx/Time-tracking-dashboard-solution","commit_stats":null,"previous_names":["adityanandanx/time-tracking-dashboard-solution"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adityanandanx%2FTime-tracking-dashboard-solution","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adityanandanx%2FTime-tracking-dashboard-solution/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adityanandanx%2FTime-tracking-dashboard-solution/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adityanandanx%2FTime-tracking-dashboard-solution/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adityanandanx","download_url":"https://codeload.github.com/adityanandanx/Time-tracking-dashboard-solution/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246748493,"owners_count":20827319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["frontend","frontend-web","frontendmentor","frontendmentor-challenge","frontendpractice","time-trac","website"],"created_at":"2024-12-14T19:15:46.422Z","updated_at":"2025-04-02T03:24:15.894Z","avatar_url":"https://github.com/adityanandanx.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Frontend Mentor - Time tracking dashboard solution\n\nThis is a solution to the [Time tracking dashboard challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/time-tracking-dashboard-UIQ7167Jw). Frontend Mentor challenges help you improve your coding skills by building realistic projects.\n\n## Table of contents\n\n- [Overview](#overview)\n  - [The challenge](#the-challenge)\n  - [Screenshot](#screenshot)\n  \u003c!-- - [Links](#links) --\u003e\n- [My process](#my-process)\n  - [Built with](#built-with)\n  - [What I learned](#what-i-learned)\n  - [Continued development](#continued-development)\n  - [Useful resources](#useful-resources)\n- [Author](#author)\n- [Acknowledgments](#acknowledgments)\n\n## Overview\n\n### The challenge\n\nUsers should be able to:\n\n- View the optimal layout for the site depending on their device's screen size\n- See hover states for all interactive elements on the page\n- Switch between viewing Daily, Weekly, and Monthly stats\n\n### Screenshot\n\n![](./screenshot.png)\n\n\u003c!-- ### Links\n\n- Solution URL: [Add solution URL here](https://your-solution-url.com)\n- Live Site URL: [Add live site URL here](https://your-live-site-url.com) --\u003e\n\n## My process\n\n### Built with\n\n- Semantic HTML5 markup\n- CSS custom properties\n- Flexbox\n- CSS Grid\n\n### What I learned\n\nI learnt quite a few things actually, the most important one being how to fetch data from an API (well the process is same as of fetching a local json file) and then changing the DOM based on that data.\n\nThis function below is what i'm the most proud of:-\n\n```js\nfunction updateDOMwithData(json, timeframe) {\n  const container = document.querySelector(\"#grid-container\");\n\n  // getting the profile element\n  const profile = document.querySelector(\".profile\");\n  // then clearing all stuff\n  container.innerHTML = \"\";\n  // inserting the profile element\n  container.insertAdjacentElement(\"afterbegin\", profile);\n\n  // inserting all the cards according to the data given\n  json.forEach((element) =\u003e {\n    container.insertAdjacentHTML(\n      \"beforeend\",\n      `\n    \u003cdiv class=\"card ${element.title.replace(\" \", \"-\").toLowerCase()}\"\u003e\n      \u003cdiv class=\"card-content\"\u003e\n        \u003cdiv class=\"card-top-bar\"\u003e\n          \u003cdiv class=\"card-title\"\u003e${element.title}\u003c/div\u003e\n          \u003cimg class=\"ellipsis\" src=\"./images/icon-ellipsis.svg\" alt=\"ellipsis\"\u003e\n        \u003c/div\u003e\n        \u003ch1 class=\"card-time\"\u003e${element.timeframes[timeframe].current}hrs\u003c/h1\u003e\n        \u003cp class=\"subtle\"\u003eLast ${\n          timeframe === \"daily\"\n            ? \"day\"\n            : timeframe === \"weekly\"\n            ? \"week\"\n            : timeframe === \"monthly\"\n            ? \"month\"\n            : \"error\"\n        } - ${element.timeframes[timeframe].previous}hrs\u003c/p\u003e\n      \u003c/div\u003e\n    \u003c/div\u003e\n    `\n    );\n  });\n}\n```\n\n### Continued development\n\nWorking with APIs will be a must to stay in this field... so yeah i'll probably keep focusing on that in my future projects.\n\n## Author\n\n- Website - [!MAD!](http://imadi-arch.github.io/)\n- Frontend Mentor - [@iMADi-ARCH](https://www.frontendmentor.io/profile/iMADi-ARCH)\n- Twitter - [@iMADi69235681](https://twitter.com/iMADi69235681)\n- LinkedIn - [Aditya Nandan](https://www.linkedin.com/in/aditya-nandan-thats-it/)\n\n## Acknowledgments\n\nTy to [Vatsal](https://github.com/vatsalbansal123) for helping me :)\nGo follow em.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadityanandanx%2Ftime-tracking-dashboard-solution","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadityanandanx%2Ftime-tracking-dashboard-solution","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadityanandanx%2Ftime-tracking-dashboard-solution/lists"}