Submitted 4 months ago
REST Countries API with color theme switcher
@mrnikhilsingh
Design comparison
SolutionDesign
Solution retrospective
What are you most proud of, and what would you do differently next time?
What I'm most proud of:
- Well-structured HTML code with semantic elements and descriptive class names.
- Use ARIA-compatible icons from Remixicon and Google Fonts for a professional design.
What I would do differently next time:
- Add accessibility attributes, such as alt and aria-label, to ensure usability for everyone.
- Simplify CSS classes and consider using a preprocessor like Sass or Less.
- Add more semantic meaning to the HTML structure, such as wrapping sections in elements.
- Enhance user experience with JavaScript functionality, such as event listeners for the dark mode toggle and back button.
- Structuring the HTML Code
- Accessibility
- Consistency in Design
Community feedback
- @randomduckduckPosted 4 months ago
Nice solution. Love that you used transition effect when switching between Light and Dark modes. And vanilla js solutions are always nice to have.
Being a vanilla js solution means reloading the page when user clicks any plpCard or borderCountries (can be resolved by manipulating history stack of browser). Still you saved userPreference so that same color is preserved across page loads is really nice to have.
Few observations:
- Flag image sizes are not in a single row. Adding align-self : baseline and cropping image height will solve the issue.
- Text search and filter both don't work together. For ex, searching 'das' gives empty results, but then using different filter loads that region list. Can be fixed by either fixing logic (to take both searchTerm and filterTerm when showing list) or clearing search bar when clicking a filter (hacky but quick fix).
Nice solution though!
Marked as helpful1
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