Example project
- Check out Tailwind
- Use Tailwind to show beautiful biographies of your friends
- Think about adding new friends to your list of friends
- Use the localstorage to save your list of friends and keep it updated even when adding new friends
- You will need
JSON.parse
andJSON.stringify
for this, so you may want to take a look at the docs and at the example at the very bottom
- Show a Delete button for every friend entry. For this you could use
document.createElement('button')
- If you successfully added the button, try registering an event listener. Whenever we click the button, we want to log something in the console
- Go through your code and try to really understand it. Change a thing here and there and see how it influences the behaviour
- Take a first look at the Fetch API. The next session will be about external APIs!
- We can limit the size of requested facts. We could only fetch 25 but in total there are many more facts. That is why the API offers pagination by adding a
page
URL parameter, e.g. https://catfact.ninja/facts?page=4. Think about how you would implement a pagination and try implementing it
- Add a form to the page to filter by a given beer name using the
beer_name
request parameter