From 73ce36e7e6ff97d137cde60d576165038ea30724 Mon Sep 17 00:00:00 2001 From: sanjayzorojuro Date: Sun, 6 Sep 2026 14:34:00 +0530 Subject: [PATCH] Add readme.md for the joke generator --- joke-generator/readme.md | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 joke-generator/readme.md diff --git a/joke-generator/readme.md b/joke-generator/readme.md new file mode 100644 index 000000000..633be3c3c --- /dev/null +++ b/joke-generator/readme.md @@ -0,0 +1,42 @@ +# 😂 Random Joke Generator + +A simple, beginner-friendly web app that fetches and displays a random joke at the click of a button. + +## API Used + +This project uses the **[Official Joke API](https://official-joke-api.appspot.com/)**: + +- Endpoint: `https://official-joke-api.appspot.com/random_joke` +- No API key or authentication required +- Returns a JSON object like: + ```json + { + "id": 1, + "type": "general", + "setup": "What did the ocean say to the beach?", + "punchline": "Nothing, it just waved." + } + ``` + +## How to Run + +1. Clone or download this folder (`mini-projects/joke-generator/`). +2. Open `index.html` directly in your browser (double-click it, or right-click → "Open with" your browser). +3. Click the **Generate Joke** button to fetch a new random joke. + +No build tools, installations, or servers required — it's plain HTML, CSS, and JavaScript. + +## File Structure + +``` +joke-generator/ +├── index.html # Page structure +├── style.css # Styling +├── script.js # Fetch logic + button interaction +└── README.md # This file +``` + +## Notes for Contributors + +- Code is intentionally kept simple and commented for beginners. +- Feel free to suggest improvements (e.g., adding joke categories, a "copy to clipboard" button, or dark mode) via a new PR. \ No newline at end of file