Lesson 16, Tuesday, 2023-11-21
Today's lesson will be the last lesson before starting with the project, and we will be doing a small project to get you up and running!
The structure is very loose, it is up to you to explore and find what you enjoy!
https://dog.ceo/dog-api/documentation/random
Display a random dog image
https://kinduff.github.io/dog-api/
Fetch dog facts
Create a simple webpage, that fetches dog images from the API. Pair it with the second API and show some dog facts together with images.
Query the holidays of over 100 countries
Show the holidays in Germany for 2024.
BONUS: Add a dropdown to select holidays for one state only.
https://leafletjs.com/examples/quick-start/
an open-source JavaScript library for mobile-friendly interactive maps
Render a map using the Leaflet library. Can you add a pin showing your current position?
https://github.com/geosigno/simpleParallax.js
Simple and tiny JavaScript library that adds parallax animations on any images
Can you add parallax to some images?
https://docs.joinmastodon.org/client/public/
Fetching public timelines
Can you show the published posts and author?
Note that there are many different Mastodon instances to choose from, and they might have different API restrictions. One of the larger ones is "https://mastodon.social", and its API can be accessed without any API keys or registration.
A lot of APIs can be found here for example: https://publicapis.io/
Additionally, some websites lists royalty free images, for example https://pixabay.com/
You don't have to do all of this, these are just ideas!
Iterate on what you have and add more functionality and/or content.
- Allow the users to open the original source (with a link)
- Add
next
andprevious
pages buttons - Show loading while the data is being fetched.
- Show the content creation or publishing date.
- Allow the user to search for a keyword
- Or show article earlier or later than a certain date
- Allow the user to read the original content, by embedding it in an iframe
- Automatically load more content when the user scrolls to the end