Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/evavic44/advice-generator
♾️ An advice generator application that uses the Advice Slip API to generate advices
https://github.com/evavic44/advice-generator
advice advice-api advice-generator advice-slip-json-api css frontendmentor html javascript json rest-api
Last synced: 6 days ago
JSON representation
♾️ An advice generator application that uses the Advice Slip API to generate advices
- Host: GitHub
- URL: https://github.com/evavic44/advice-generator
- Owner: Evavic44
- Created: 2022-03-06T13:43:04.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-03-10T04:24:50.000Z (over 2 years ago)
- Last Synced: 2024-10-06T04:01:41.596Z (about 1 month ago)
- Topics: advice, advice-api, advice-generator, advice-slip-json-api, css, frontendmentor, html, javascript, json, rest-api
- Language: HTML
- Homepage: https://advice-generator-challenge.netlify.app
- Size: 536 KB
- Stars: 4
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Advice generator App
[![Netlify Status](https://api.netlify.com/api/v1/badges/9369ff42-c13e-44d0-95b2-784ceb255214/deploy-status)](https://app.netlify.com/sites/advice-generator-challenge/deploys)
![Advice-generator-banner](https://user-images.githubusercontent.com/62628408/156934417-62060d7a-360a-4e69-a167-f2412197428c.png)
## Welcome! 👋
Thanks for checking out this front-end coding challenge by [Frontend Mentor](https://www.frontendmentor.io) a platform for helping you improve your coding skills by building realistic projects.
**To do this challenge, you need a basic understanding of HTML, CSS and JavaScript.**
## The challenge
Your challenge is to build out this advice generator app using the [Advice Slip API](https://api.adviceslip.com) and get it looking as close to the design as possible.
You can use any tools you like to help you complete the challenge. So if you've got something you'd like to practice, feel free to give it a go.
Your 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## Support
[Join our Slack community](https://www.frontendmentor.io/slack) and ask questions in the **#help** channel.## 📝 Learning
### Picture Tag
The picture tag is a semantic html element used in adding multiple images, according to [W3schools](https://www.w3schools.com/tags/tag_picture.asp), the most common use of the element is for art direction in responsive designs. Instead of having one image that is scaled up or down based on the viewport width, multiple images can be designed to more nicely fill the browser viewport.Since we have a small and large image for the line, we can use the picture element to specify what image to show based on a given viewport. Example:
```html
```
In the code above, at 601px and above, (from tablet to desktop and beyond) we want to load the desktop divider image and on 550px and below, we want to load the mobile divider image and then we have a fallback image in case of any browser support issues. No css, no hiding the image manually, 😎 cool right?
### Semantic Tags
`: For wrapping the advice element
To practice writing cleaner and more accesible code, I made sure to use semantic html elemnents like:
- `
- ``: For the images
- ``: For wrapping the whole content
- ``: For the card container itself.