Finished Random Quote Machine

Finished Random Quote Machine
0.0 0

#1

I finally finished my Random Quote Machine

I lost some precious time with:

I learned something about:

  • CORS (very little but i know it is a hassle :slight_smile: )
  • looping through json objects, because i used an API which is publically accessible and returns only 1 quote of the day. So i had to work around it, access the free categories, and alter my link… (workaround)
  • toyed a bit with velocity.js

I reallly think freeCodeCamp should mention CORS and which API to use.
This costs so much time to find it all out by yourself.


#2

I’ve discovered a new API which made it incredibly more easy to get quotes.
It looks the same but the code is much simpler / shorter.
You’ll only see the difference if you pay attention to the code (API endpoint and code to generate new quote)

Old one
New one

Edit: i got it to run on codepen by disabling the velocity code (javascript library):
Codepen
Although code pen does not allow me to change the background color, only the text color.
On my personal webspace this seems to work…

Thanks for your feedback.