Giter Site home page Giter Site logo

sarahkwon / rest-countries-website Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.23 MB

Web application for displaying country information

Home Page: https://main--rest-countries-website-fem.netlify.app/

HTML 7.95% CSS 30.73% JavaScript 61.32%
css3 dark-theme flexbox-grid html-semantics html5 reactjs rest-api

rest-countries-website's Introduction

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)

Screenshots

Light Mode

image image

Dark Mode

image image

Links

My process

For this project I used React for front-end functionality, CSS/HTML for styling, and Axios to fetch data. I started off with developing the front-end. For both the home and details page, I decided to create the individual components and style them first so that formatting the page afterwards becomes a simpler process.

For the REST Countries API, I used React's useState and useEffect hooks to fetch and store the data, and displayed them using JavaScript's map function. If a user goes to a country details page, the app gets more data for that specific country and displays it for the user.

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • CSS Grid
  • React - JS library
  • Love

What I learned

Before this project, I mainly used UI libraries to get the job done for the front-end. However, I wanted to have a good grasp on HTML and CSS fundamentals, so I learned the concepts behind Flexbox, CSS Grid, and HTML5 semantics. I also learned how to implement dark mode!

Useful resources

  • Flexbox Froggy - I had a hard time understanding flexbox until I completed this tutorial
  • Grid Garden - Made by the same creators of Flexbox Froggy, they made it very easy to understand the concepts behind CSS Grids
  • Easy Dark Mode - A tutorial on how to implement dark mode

Author

rest-countries-website's People

Contributors

sarahkwon avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.