Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Api Advice generator

Andrea 110

@AndreaFifo

Desktop design screenshot for the Advice generator app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
  • API
2junior
View challenge

Design comparison


SolutionDesign

Community feedback

Shiva 670

@shivaprakash-sudo

Posted

Hello Andrea,

Congrats on finishing the challenge!

I like what you did with the h1 element's font size for smaller screens.

Few suggestions:

  • This one is for everyone actually, which is about the Advice API caching the data. This makes the app not work on Firefox and also making advice delays in other browsers. All you need to do to overcome this is to put { cache: "no-cache" } as the second argument in fetch statement.
  • For the initial advice, you can use window.onload function to call the advice API when the user comes to the website.
  • For the advice-text and id-advice, you don't need to use span elements, you can directly use those for the parent elements themselves.
  • Try to put alt="" for images, for accessibility reasons.
  • Here we don't need to use picture as we only have one source, you can use it when there are multiple sources.
  • Finally, try to wrap the content inside the body in main for accessibility reasons.

Happy coding and good luck on next projects.

0

Andrea 110

@AndreaFifo

Posted

@shivaprakash-sudo Thanks mate, i will follow your suggestions. I used picture because actually there are 2 images of the svg above the bottom, the desktop one and the mobile one, so this is why i used it.

0
Shiva 670

@shivaprakash-sudo

Posted

@AndreaFifo

I understand what you were trying to do, but picture is used when there are multiple sources (e.g. jpg, png, jpeg, etc.) for the same image, but here we have two different images.

0
Andrea 110

@AndreaFifo

Posted

@shivaprakash-sudo So instead of picture, what can i use to do something similar?

0
Shiva 670

@shivaprakash-sudo

Posted

@AndreaFifo

You can just put two image tags in a container and hide the bigger image for smaller screens and vice versa.

0
Andrea 110

@AndreaFifo

Posted

@shivaprakash-sudo Ok thanks. Another thing, how can i contact you? Because i want to show you a project that i've done recently and i'd like to receive your opinion about.

0
Shiva 670

@shivaprakash-sudo

Posted

@AndreaFifo

You can contact me on LinkedIn, the link is in my profile. If you want to show me your live site or code personally, then you can setup an online meeting in Zoom or Teams.

0

Please log in to post a comment

Log in with GitHub
Discord logo

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