Skip to content

omar-the-junior/rest-countries-api-page-vue3

Repository files navigation

REST Countries API with color theme switcher solution using VueJS

This is a solution to the REST Countries API with color theme switcher challenge on Frontend Mentor.

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

All countries desktop preview

Links

My process

Built with

Useful resources

  • custom click-ouside directive - This answer on StackOverflow helped know how to create a cusom click-outside directive that triggers an event when clicked ouside the parent element I used it to close the dropdown when clicking outside of it.
  • Data fetching after navigation - This helped me understand how to fetch data after navigation in Vue Router.

Project Setup For running locally

pnpm install

Compile and Hot-Reload for Development

pnpm dev

Type-Check, Compile and Minify for Production

pnpm build

Run Unit Tests with Vitest

pnpm test:unit

Lint with ESLint

pnpm lint

Author