Responsive landing page using CSS & JS Grid

Solution retrospective
"I am most proud of implementing the interactive logic and cross-page data transfer. As a freshman just starting with JavaScript, I successfully used localStorage to pass the selected rating from the index page to the thank-you page and dynamically render it into the DOM. Next time, I would focus on optimizing my CSS layout to make the elements more adaptable to different screen sizes without relying on fixed margins."
What challenges did you encounter, and how did you overcome them?"I encountered several challenges while writing the JavaScript logic. For example, I initially tried to add an event listener directly to a NodeList returned by querySelectorAll, which didn't work. I also tried to use the :checked pseudo-class on <button> elements instead of <input type="radio">. To overcome these, I reviewed the documentation, learned the 'exclusive thought' (排他思想) pattern to toggle the .active class, and successfully figured out how to extract and pass data using localStorage.getItem and setItem."
What specific areas of your project would you like help with?"I would love some feedback on my JavaScript architecture. Is my approach to handling the active states and passing data between pages efficient? Are there any best practices I should follow when manipulating the DOM, or is there a simpler way to achieve the same result?"
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on 舜白奈伊’s solution.
Join 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