Skip to content

alexgcode/rest-api-countries-frontendmentor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frontend Mentor - REST Countries API with color theme switcher solution

This is a solution to the REST Countries API with color theme switcher challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Overview

The challenge

Users should be able to:

  • See all countries from the API on the homepage
  • Search for a country using an input field
  • Filter countries by region
  • Click on a country to see more detailed information on a separate page
  • Click through to the border countries on the detail page
  • Toggle the color scheme between light and dark mode (optional)

Screenshot

Links

  • Solution URL: code
  • Live Site URL: live

My process

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • CSS Grid (for country cards layout)
  • Desktop-first workflow
  • vanilla Javascript
  • Sass - css pre processor

What I learned

Remember how to pass data between 2 different pages with js using get parameters

Use of filter(a js array property) with include to create a search name input.

Use of this css trick to make the grid responsive

repeat(auto-fit, minmax(min(100%,200px),1fr)); 

Adding an observer to detect changes in the dom.

Useful resources

Author

About

a page with rest api consuming from frontendmentor.io challenge

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published