Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted almost 2 years ago

REST Countries API with color theme switcher

animation, pinia, typescript, vue, sass/scss
Caramello•180
@BuzzFizzer
A solution to the REST Countries API with color theme switcher challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


console.log("Hello Programmers"),

Even though this project posed some challenges for me, I thoroughly enjoyed working on it, so much so that I took extra time to add additional features.

Technologies Used:

  • TypeScript
  • SCSS/Sass
  • Vue.js
  • Vue Router
  • Pinia
  • AutoAnimate

Extra Features:

  • Pagination: Added the ability to limit results per page, and a page navgation strip to allow easy movement between pages.
  • Sorting: Added the ability to sort countries based on name and population in an ascending or descending fashion.
  • Animation: Used a combination of AutoAnimate, transitions, and animations to create as smooth experience when traversing the page. This includes moving between result pages, changing website theme, when items are moved, shown or hidden, or when hovering over items.

Difficulties Encountered:

  • Route Transitions: I have used Vue's transition component to animate the route transitions a few times in the past, but unfortunately, it didn't work for me on this project for some reason. (I'll look into it further and update this project if I find anything)

If you have any suggestions on how I can improve my code, I would greatly appreciate it if you could leave a comment. Thank you in advance. (✿◠‿◠)

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

  • BrovoJD•190
    @Jaheim-Douglas
    Posted almost 2 years ago

    As a beginner at HTML, CSS and javascript I marvel at your work and hope to get as good as you keep up the good work

  • Gabr22•280
    @MohamedGabr20233
    Posted almost 2 years ago

    your work is magnificent, do u have any advice for a beginner like me who only know html and css (not advance ) and learning JS

  • Mehmet Akif AKKUŞ•170
    @mehmetakifakkus
    Posted almost 2 years ago

    Congratulations for completing this challenge!

    I loved what you added as additional features, I especially will give AutoAnimate a chance in one of my future projects.

    • In my project I added storing the latest search value and filter value when you visit the country detail and go back to the main page. It uses URL search params. You may think adding this as a feature. link if you want to visit

Join 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
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit all CSS, SCSS and Less files in your repository.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

How does the JavaScript validation report work?

When a solution is submitted, we use eslint to run an automated check on the JavaScript code.

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub