Advice generator app HTML/CSS/JS

Solution retrospective
Hi to all
This project was made with Html, CSS, and JS vanilla
Any feedback will be appreciated.
Thanks.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @DavidMorgade
Hello Alan, pretty good job finishing the challenge, congratulations!
For me the layouts looks perfect and the fetch is working perfectly.
Would recommend you to remove
the console.log()
, is a little thing that sometimes we forget!, but is a good practice for future projects where you don't want some info of your app to be shown accidentally.An at last, I would add a bit of transition on hover to your button, so it looks even better, try adding
transition: box-shadow 0.5s linear;
to your.card-footer button
, it will look smoothier and will boost the user experience of your application!Hope my feedback helped you!
Marked as helpful - @elaineleung
Hi Alan, since David gave you some great advice already, I'll just mention something about the API. Right now I'm viewing this on Firefox and I'm unable to load the next advice, which is a commonly seen issue due to caching. If you have Firefox you can also check it out yourself. What you can do is add a header object in fetch with a line for cache, like this:
fetch("https://api.adviceslip.com/advice", { cache: 'no-cache' })
You can also try to add some error handling to your
async/await
function!Marked as helpful
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord