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

Frontend Mentor - Advice generator app solution

Marcin Garskiβ€’ 350

@margsoftbf

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

Solution retrospective


The next challenge, which i finish. Now im focused on the JS so i try working with challenge which have the JS. If someone see something wrong or what i can do better it will be great for me.

Community feedback

Ivanβ€’ 2,630

@isprutfromua

Posted

Hi there. You did a good job πŸ‘

keep improving your programming skills

your solution looks great, however, if you want to improve it, you can follow these steps:

🟒 your initial layout has no advice number. It looks as bug)

🟒 try to follow a single code style throughout the program. In almost all places you use arrow functions, and only for handle the fetch request - the usual anonymous function. Also try to use destructing.

.then(({slip}) => {
    const {id, advice} = slip;
    titleId.textContent = id;
    randomText.textContent = advice;
})

Looks more cleaner, right?

🟒 Change id class to box__id instead of box__title--id, because it's not a modificator

I hope my feedback will be helpful

Good luck and fun coding 🀝⌨️

Marked as helpful

1

Marcin Garskiβ€’ 350

@margsoftbf

Posted

@isprutfromua Thanks, for help i changed everything what you said. Thanks a lot :)

0
Ivanβ€’ 2,630

@isprutfromua

Posted

@margsoftbf Hi there

I'm glad it was useful to you

Cheers, peace and happy coding!

0
Allyson S.β€’ 190

@allyson-s-code

Posted

I think it looks great! I thought your code was easy to read, too.

I have to say I was overcomplicating matters with my own version of this project with the two sizes of svgs. I was reading about viewbox (for way toooo long) and trying a javascript function for the change in media size. Your solution is simple, just css display: none and display: block. Perfect! It is so helpful looking at other peoples code!

Well done!

Marked as helpful

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