nkilm / riddles-api

An API which returns a riddle each time a call is made.
https://riddles-api.vercel.app
MIT License
23 stars 8 forks source link

show API response on homepage #1

Closed nkilm closed 1 year ago

nkilm commented 2 years ago

On the homepage of the API - https://riddles-api.vercel.app/, the API response is typed statically, instead make it dynamic. Everytime the page refreshes, the response should also change.

Chaitanya-087 commented 2 years ago

i would like to work on this issue

nkilm commented 2 years ago

Please state your plan for this issue i.e, how you would like to solve this issue?

SarojWasti commented 2 years ago

I have solved the issue with JavaScript. You can reply so that we can have discussion as there is another problem about incorrect homepage display.

nkilm commented 2 years ago

@SarojWasti Okay I'm listening...

SarojWasti commented 2 years ago

I just javascript fetched the API and displayed the output directly to web by queryselect("class").innerHTML. But another issue arose because the longer riddle took more space in the center and re-adjusted itself to left. I wrote some CSS to solve that too. You can review it and merge if you like the solution.

nkilm commented 2 years ago

Okay, cool. I'll assign you.