Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/priyanshjain9414/quote-generator

A simple web application that fetches random quotes from various categories and allows users to save their favorite quotes.
https://github.com/priyanshjain9414/quote-generator

api api-ninja css html html-css-javascript javascript

Last synced: 14 days ago
JSON representation

A simple web application that fetches random quotes from various categories and allows users to save their favorite quotes.

Awesome Lists containing this project

README

        

# Random Quote Generator

## Description

The Random Quote Generator is a simple web application that fetches random quotes from the **API Ninja** and displays them to the user. Users can choose from various categories to get quotes that inspire, motivate, or entertain. This project aims to provide a fun and interactive way to discover new quotes.

## Features

- Fetch random quotes based on selected categories.
- Display the quote text and author.
- Button to generate a new quote.
- Save favorite quotes with a simple alert feature.

## Technologies Used

- HTML
- CSS
- JavaScript
- API Ninja (for fetching quotes)

## Installation

1. Clone the repository:
```bash
git clone https://github.com/yourusername/random-quote-generator.git
```
2. Navigate to the project directory:
```bash
cd random-quote-generator
```
3. Open index.html in your preferred web browser.

## Usage

1. **Select a Category:** Choose a category from the dropdown menu.
2. **Get a Quote:** Click the "Get a Quote" button to fetch a random quote from the selected category. The quote and its author will be displayed on the screen.
3. **Save Favorite:** Click the "Save Favorite" button to save your favorite quote (for demonstration, this will display an alert).

## API Key

To use the API Ninja for fetching quotes, you will need to sign up and obtain an API key. Replace the placeholder `YOUR_API_KEY` in `script.js` with your actual API key.

## Contributing

Contributions are welcome! If you have suggestions or improvements, please open an issue or submit a pull request.