Social Media Tracker Using Sass and Vanilla JS
Design comparison
Solution retrospective
Hi, it's been a long time since i was here but i've been utilizing this time to learn JS from scratch. So this is the very first project in which i have used JS extensively.I focused more on writing JS rather than the UI and would love hearing feedback on my Javascript code. Plus if anybody knows how the folders should be structured then please let me know in the comments.
Community feedback
- @mattstuddertPosted over 4 years ago
Hey Shubham, nice to see you post a new solution. Where have you been learning JS? Your code looks fine, but I'd say you've over-engineered the solution in this instance. You don't need so much JS code to switch between a light and a dark theme. You can simply use it to toggle a class or HTML attribute and then use CSS custom properties to take care of the color changes.
Here's a great article that runs through this approach: https://hankchizljaw.com/wrote/create-a-user-controlled-dark-or-light-mode/
I hope this helps!
1@shubhamthedevPosted over 4 years ago@mattstuddert Yeah i know it's a mess but i went through others solution afterwards and found some insights into how it should be done and thanks for the link i'll go through this.
0
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