Coder Social home page Coder Social logo

matheus-lincon / advice-generator-app Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 405 KB

HTML,CSS, JavaScript and API advice app from Front-End Mentor.

License: GNU General Public License v3.0

HTML 33.85% JavaScript 16.97% CSS 49.18%
html css javascript api consume-api advice-generator advice-slip-json-api frontendmentor frontendmentor-challenge

advice-generator-app's Introduction

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:

  • Generate a random advice by pressing a dice button

Screenshot


Links

My process

Built with

  • Semantic HTML5 markup
  • JavaScript
  • API Consuming
  • Flexbox
  • Position relative & absolute
  • Mobile-first workflow

What I learned

This advice app helped me to understand a little bit about how to consume API.

There are a lot of ways you can do it. In my case, to this project I used Axios CDN, you can see more here Axios.

Here some code:

<body>
  <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
</body>
const URL = 'https://api.adviceslip.com/'
function getAdvice() {
  axios
    .get(url)
    .then((response) => console.log(response)) // success!
    .catch((error) => console.log(error)) // error!
}

Useful resources

  • Advice Slip JSON API - This API helped me to make the app. It's pretty simple to use, no complications.

Author


advice-generator-app's People

Contributors

matheus-lincon avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.