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
- Semantic HTML5 markup
- CSS custom properties
- Vanilla JavaScript
- CSS Grid
- Mobile-first workflow
I chose this project to practice getting data from an API and the handling of errors in this process.
I decided to add a light/dark mode theme switch and also a typewriter text effect to learn new skills.
- CSS-TRICKS Complete guide to Dark Mode - This helped me to understand the different options to implement a theme togler and also how to combine the user's color scheme preference and a theme toggler.
- CSS-TRICKS How to scale SVG - I was looking for a way to scale the svg based on the screen size, rather than using two different images as provided in the design. The solution, to define a viewBox attribute in the svg!
- w3 schools Typing effect - Explains how to create the typing effect I've used for the advice.
- Frontend Mentor - @cr1deg0