Skip to content

sandragonzalezdiaz1/xml-joke-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

😂 Joke Generator

HTML CSS JavaScript API Status

A small web application that fetches jokes from the external API JokeAPI and displays them dynamically based on the selected category and language.

This project was built as part of my learning process to practice working with APIs and asynchronous requests in JavaScript.


🚀 Live Demo

🔗 Try the app here:
https://sandragonzalezdiaz1.github.io/xml-joke-generator/


📖 About the Project

The goal of this project is to practice consuming REST APIs and handling asynchronous data in the browser.

The application allows users to select a joke category and language, then retrieves jokes from the API and displays them dynamically.

It also includes error handling and a loading indicator to improve the user experience.


✨ Features

  • 🎭 Select different joke categories
  • 🌍 Choose the joke language
  • 🔄 Asynchronous API requests using XMLHttpRequest
  • ⚠️ HTTP error handling
  • ⏳ Loading indicator while fetching data

🛠️ Technologies

  • HTML5
  • CSS3
  • JavaScript
  • XMLHttpRequest
  • JokeAPI

🖼️ Screenshots

Programming jokes in English

Programming jokes

Example when no jokes are available for the selected category or language

No jokes available


📁 Project Structure

xml-joke-generator
│
├── index.html
├── css
│   └── styles.css
├── js
│   └── app.js
├── assets
│   ├── screenshot_1.png
│   └── screenshot_2.png
└── README.md


📚 What I Practiced

This project helped me practice:

  • Consuming external REST APIs
  • Making asynchronous requests
  • Handling XML data
  • Working with the DOM
  • Managing API errors

🚧 Future Improvements

  • Add more joke filters
  • Allow users to save favorite jokes
  • Replace XMLHttpRequest with Fetch API
  • Improve UI animations

👩‍💻 Author

Sandra González Díaz

GitHub:
https://github.com/sandragonzalezdiaz1

About

Web application that fetches jokes from an external API and displays them dynamically based on the selected category and language.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors