TamirisCss / countries-api-color-theme-switcher

Frontend Mentor challenge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Screenshot

Links

My process

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • Mobile-first workflow
  • Vanilla JavaScript
  • REST Countries V2 API

What I learned

async function getCountries() {
  const response = await fetch(`https://restcountries.com/v2/all`)
  const data = await response.json();
  countries = data;
  showCountries(countries)
}
getCountries();

Author

About

Frontend Mentor challenge


Languages

Language:JavaScript 36.2%Language:CSS 35.6%Language:HTML 28.2%