This is a solution to the Advice generator app challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
- View the optimal layout for the app depending on their device's screen size
- See hover states for all interactive elements on the page
- Generate a new piece of advice by clicking the dice icon
- Solution URL: https://github.com/vljones133/advice-generator
- Live Site URL: https://advice-generator-vjonesdev.vercel.app
- Semantic HTML5 markup
- CSS custom properties, converted to SASS
- Flexbox
- Mobile-first workflow
- React - JS library
- SASS - CSS extension language
- TypeScript - JS with syntax for types
- Testing - JS testing framework
.spin {
animation: spin 1s linear;
}
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
<picture>
<source srcSet={pauseMobile} media='(max-width: 575px)' />
<img src={pauseDesktop} alt='pause' />
</picture>
<button
className={clicked ? "spin" : ""}
onClick={fetchAdviceAndSpin}
>
<img src={dice} alt='roll the dice' />
</button>
- Frontend Mentor - @VLJones133