This is a solution to the Random Quote Generator Challenge on Frontend Pro. The project generates random quotes dynamically from an external API and allows users to tweet them easily.
- Fetches random quotes from the ZenQuotes API.
- Displays quotes dynamically on the webpage.
- Allows users to generate new quotes by clicking a button.
- Provides a Twitter share button to tweet quotes easily.
- Responsive design using Bootstrap 5.
Ensure you have the following installed:
- Node.js and npm (for Less preprocessor compilation)
- A code editor like Visual Studio Code
- A web browser to view the project
-
Clone the Repository
git clone https://github.com/Yashi-Singh-9/Random-Quote-Generator.git
-
Navigate to the Project Directory
cd Random-Quote-Generator
-
Install the Less Preprocessor (if not installed already)
npm install -g less
-
Compile Less to CSS
lessc style.less style.css
-
Run the Project
- Open
index.html
in your browser. - Or use VS Code's Live Server extension:
npx live-server
- Open
- HTML5 - For structuring the content.
- Bootstrap 5 - For styling and layout.
- JavaScript (ES6+) - For fetching and displaying quotes dynamically.
- Less - For preprocessed and organized styling.
- ZenQuotes API - For fetching random quotes.
This project enhanced my understanding of:
- Fetching data from an API using
fetch()
with async/await. - Handling API errors and displaying fallback messages.
- Using Bootstrap 5 for responsive layouts.
- Implementing Less for modular and reusable styles.
- Frontend Pro Profile: Yashi-Singh-9
- LinkedIn: Yashi Singh
- Frontend Pro for providing great challenges.
- ZenQuotes API for inspiring quotes.
- Bootstrap Documentation for styling guidance.