Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zun-liang/fem-interactive-rating-component

Frontend Mentor Challenge Solution Interactive Rating Component
https://github.com/zun-liang/fem-interactive-rating-component

css html javascript

Last synced: 9 days ago
JSON representation

Frontend Mentor Challenge Solution Interactive Rating Component

Awesome Lists containing this project

README

        

# Frontend Mentor - Interactive rating component solution

This is a solution to the [Interactive rating component challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/interactive-rating-component-koxpeBUmI). Frontend Mentor challenges help you improve your coding skills by building realistic projects.

## Table of contents

- [Overview](#overview)
- [The challenge](#the-challenge)
- [Screenshot](#screenshot)
- [Links](#links)
- [My process](#my-process)
- [Built with](#built-with)
- [What I learned](#what-i-learned)
- [Continued development](#continued-development)
- [Author](#author)
- [Acknowledgments](#acknowledgments)

## Overview

### The challenge

Users should be able to:

- View the optimal layout for the app depending on their device's screen size
- See hover states for all interactive elements on the page
- Select and submit a number rating
- See the "Thank you" card state after submitting a rating

### Screenshot

![](./screenshot.jpg)

- Screenshot Mobile Rating Page: [link](./screenshots/screenshot-mobile-rating.png)
- Screenshot Mobile Thank You State: [link](./screenshots/screenshot-mobile-thank-you.png)
- Screenshot Desktop Rating Page: [link](./screenshots/screenshot-desktop-rating.png)
- Screenshot Desktop Thank You State: [link](./screenshots/screenshot-desktop-thank-you.png)

### Links

- Solution URL: [here](https://www.frontendmentor.io/solutions/interactive-rating-using-html-css-and-javascript-qSiKPFnacv)
- Live Site URL: [here](https://zun-liang.github.io/fem-interactive-rating-component/)

## My process

### Built with

- HTML
- CSS
- Javascript
- Flexbox
- Mobile-first workflow

### What I learned

- how to use svg in html and css
- best practice for positioning external js file
- css element + element selector (not applied here but found it helpful)
- differences among :root, html, and \* selector
- aspect-ratio
- button:focus
- document.querySelector document.querySelectorAll
- addEventListener
- window alert
- style.display

### Continued development

- DOM
- React

## Author

- Website - [Zun Liang](https://zunldev.com/)
- GitHub - [@zun-liang](https://github.com/zun-liang)
- Frontend Mentor - [@zun-liang](https://www.frontendmentor.io/profile/zun-liang)
- freeCodeCamp - [@zun-liang](https://www.freecodecamp.org/zun-liang)

## Acknowledgments

A lot of thanks to [TsbSankara](https://www.youtube.com/watch?v=cQnUopEeZgw&t=1076s), his solution inspired me how to use javascript working on this challenge.