
Design comparison
Solution retrospective
I'm proud to have used an API for the first time. I'm encouraged to tackle other complex projects using API content.
What challenges did you encounter, and how did you overcome them?I was googling as many other developers to solve that.
What specific areas of your project would you like help with?I think it would be better to recap responsive technique in developing HTML/CSS content.
Community feedback
- P@AydanKaraPosted about 1 month ago
🔥 Great effort @bojanognjen!
The project is well-structured, API integration is well-done, and the layout is responsive. A few tweaks to semantic HTML, accessibility, and JS code structure would make this even better. 🚀
- Semantic HTML & Accessibility
- Consider using semantic elements like
<section>
,<article>
, or<header>
instead of generic<div>
elements to improve readability and accessibility. - The
<span>
elements used for buttons (Daily, Weekly, Monthly) should be actual buttons (<button>
) for better accessibility and keyboard navigation.
- Layout & Responsiveness
- The CSS grid system is well-implemented for different screen sizes.
- You set
padding-top: 5rem
inbody
by default. Instead you can try to set padding like this:
@media (max-width: 768px) { body { padding-block: 5rem; } }
This way the content will be centered better on desktop view.
- Code Quality & Readability
- The color styling of active buttons (.span-first) should be handled using CSS classes instead of inline JavaScript changes to keep logic and styles separate.
- Avoid deep DOM traversal:
box.children[1].children[1].children[0].textContent = arrayObject.timeframes[key].current + 'hrs';
This makes the code harder to maintain. Use
querySelector
with meaningfulclass
names instead.I hope my feedbacks helps you. If you have any questions, don't hesitate to ask. I'd be happy if I can help you with anything.
1P@bojanognjenPosted about 1 month ago@AydanKara Thank you a lot my friend, this is my first API project on Frontendmentor. Feel free to leave me a comment every time I post a project! Thank you.
1P@AydanKaraPosted about 1 month ago@bojanognjen For your first API project in Frontend Mentor, you did an excellent job. If you found my comment useful, please mark it as helpful. Thank you.
1
Please log in to post a comment
Log in with GitHubJoin 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