Open philipsquire opened 3 years ago
Your code is looking pretty good here, Philip! I like the functions that you've written to initialize the page and change the theme. 👍
I can't see your hosted site using the link in Code Lab though:
Can you run the Surge command from the Project tab to upload to your hosted site and comment back so I can verify everything works as expected?
Thanks! 🚀
Sorry about that! I just uploaded it!
No worries, it happens a lot once Surge is introduced. I think I need a better way to draw attention to the hosting site in the project requirements. 😅
Everything's working great on your hosted site and I don't have any recommendations for improvement. Nicely done! 💯 :shipit:
Build a website that allows the user to switch between day and night color themes and remembers their choice
@egillespie Can you take a look at this? It's hosted here and meets the following criteria:
localStorage
body
element is always up-to-date with the current theme (eitherday-theme
ornight-theme
) -- you can usedocument.body.setAttribute('class', 'some-class-name')
to set the class on thebody
day-theme
, the background of the website is light-colored, with a darker color for the textnight-theme
, the background of the website is a very dark color, with a lighter color for the text1
the first time)