Skip to content

Latest commit

 

History

History
84 lines (63 loc) · 2.38 KB

README.md

File metadata and controls

84 lines (63 loc) · 2.38 KB

Frontend Mentor - Advice generator app solution

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.

Table of contents

Overview

The challenge

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

Screenshot

Links

My process

Built with

  • 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

Code Snippets

.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>

Author

Website LinkedIn Twitter