Back to projects
Random Joke Generator

Random Joke Generator

Christian Johnson / August 16, 2024


This is a simple web application that fetches random jokes from an external API and displays them on the page with a nice fade-in effect. Just click the Get Random Joke button to generate a new joke.

Features

  • Fetches random jokes from the JokeAPI.
  • Smooth fade-in animation when jokes appear.
  • Minimalist and clean design.

How to Use

  1. Clone this repository:
    git clone https://github.com/headnose/joke-generator.git
    
  2. Open the project folder and run the index.html file in your browser.
  3. Click the Get Random Joke button to see random jokes appear on the page.

Technologies Used

  • HTML: Structure of the webpage.
  • CSS: Styling the page and adding animations.
  • JavaScript: Logic for fetching jokes from the API and updating the page.
  • JokeAPI: External API used to get random jokes.

Files

  • index.html: Main structure of the web app.
  • style.css: Contains all the styles for the page.
  • script.js: JavaScript code to fetch and display jokes.
  • laugh.png: Image of a laughing face displayed at the top of the page.

Future Improvements

  • Add different joke categories.
  • Allow users to share jokes on social media.
  • Implement dark mode.

You can customize the git clone link and any additional details as per your needs!