Skip to content

techking007/Quote-Idea

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Random Quote Generator

A simple Random Quote Generator built using HTML, CSS, and JavaScript.
It fetches random inspirational quotes from an external API and even allows you to tweet your favorite quotes!


✨ Features

  • Fetches a new random quote with the click of a button.
  • Displays the quote and the author.
  • Share quotes directly on Twitter.
  • Fully responsive design for mobile, tablet, and desktop.

πŸš€ Getting Started

Follow these simple steps to run the project locally:

1. Clone the repository or download the files

git clone https://github.com/your-username/random-quote-generator.git

Or simply download the ZIP and extract it.


2. File Structure

random-quote-generator/
β”œβ”€β”€ index.html
β”œβ”€β”€ style.css
└── twitter icon.png
  • index.html β†’ Main HTML file containing the structure and logic.
  • style.css β†’ Styling for the quote box and responsiveness.
  • twitter icon.png β†’ Twitter icon used in the "Tweet" button.

3. Open index.html in your browser

You can simply double-click the index.html file or open it through a local server.


πŸ›  How It Works

  • API Used: Quotable API
    Huge shoutout to Quotable for providing an amazing free API for random quotes!

  • Fetching a Quote:

    • On page load and when you click "New Quote", a new quote is fetched from the Quotable API using fetch().
    • The quote text and author name are updated dynamically.
  • Tweeting the Quote:

    • Clicking the "Tweet" button opens a Twitter sharing window with the quote and author pre-filled.

πŸ“Έ Preview

Random Quote Generator Screenshot


πŸ“š Resources


πŸ“© Contributing

Feel free to fork the repo, make improvements, and create a pull request. Contributions are welcome!


⚑ Acknowledgements

  • Thanks to Quotable API for providing a simple and free way to access awesome quotes.
  • Designed and developed with πŸ’™ using pure HTML, CSS, and JavaScript.

πŸ“„ License

This project is open source and available under the MIT License.

About

A random quote generator with intent tweet functionality

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published