Design comparison
Solution retrospective
Any feedback is welcome
Community feedback
- @Comet466Posted about 3 years ago
hi joel, one thing if you use the cross icon to delete an item, the counter doesnt update
Marked as helpful0 - @Carlos-A-PPosted about 3 years ago
Hey Joel, a few things I noticed:
- Style-wise, the font is a little small going into desktop view, other than that the layout looks great!
Some suggestions:
-
The theme doesn't seem to save when I refresh the page, you can use local storage to save the users theme. You can learn more about local storage here
-
Here's an example from my todo project of how I used local storage:
-
I used the
onclick
event attribute but you can also useaddEventListener
instead
<button onclick="toggleDark()"></button>
//--------------------------theme changer function toggleDark() { // if user toggles light-theme, remove dark theme and save light theme in local storage if (body.classList.contains('dark-theme')) { body.classList.remove('dark-theme') localStorage.setItem("theme", "") } else { // if user toggles dark-theme, add dark-theme class and save dark theme in local storage body.classList.add('dark-theme') localStorage.setItem("theme", "dark-theme") } } //if item is set to dark theme, add dark-theme to body if (localStorage.getItem("theme") === "dark-theme") { body.classList.add('dark-theme') } //----------------------------------------
I also used local storage to also save my list-items div in a local storage item. I hope this helps and good luck coding!
Marked as helpful0
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