Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/mikeheul/js_randomquotes

Random Quotes app
https://github.com/mikeheul/js_randomquotes

fetch-api javascript json localstorage

Last synced: 5 days ago
JSON representation

Random Quotes app

Awesome Lists containing this project

README

        

# JS Random Quotes Project

This project is a simple web application that displays random quotes and allows users to mark their favorite quotes. The quotes are fetched from a predefined array of objects, and users can add or remove quotes from their favorites list.

## Features

- Display 5 random quotes on the main page.
- Clicking the "Get Random Quote" button generates a new set of random quotes.
- Each quote can be marked as a favorite by clicking the heart icon.
- Favorited quotes are stored in the local storage, and the heart icon reflects the user's preferences.
- A modal allows users to view their favorite quotes.

## Usage

1. Open `index.html` in a web browser to view the main page.
2. Click the "Get Random Quote" button to display a new set of 5 random quotes.
3. Click the heart icon on any quote to add it to your favorites.
4. Click the "Voir les favoris" link to open a modal displaying your favorite quotes.
5. Close the modal by clicking the close button or outside the modal.

## Technologies Used

- HTML
- CSS
- JavaScript
- Font Awesome for icons

## Project Structure

- `index.html`: Main HTML file.
- `css/style.css`: Stylesheet for the project.
- `js/quotes.js`: Array of predefined quotes.
- `js/script.js`: JavaScript file containing the main functionality.