Skip to content

Omared250/quote_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

quote_app

Table of contents

Overview

The challenge

Users should be able to:

  • Generate a Quote when the page loaded
  • Click in the dice and generate a new Quote

Screenshot

Design Mobile Design Error Design

Links

My process

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • Responsive Design
  • Recursion
  • [Vanilla JS]
  • [Architecture - MVC]

What I learned

With this project I was able to gain more confidence in CSS and HTML, I was also able to work more with the API CALLS and reinforce my knowledge of how to treat and use the information provided through the APIS, as well as practice more the concept of RECURSION in Vanilla JS

const loadAdvice = async function() {
    try {
        await model.loadQuote();
        quoteView.render(model.quote);
        getQuoteByClickDIce();
    } catch (err) {
        quoteView.renderError();
    }
}

const getQuoteByClickDIce = async function() {
    try {
        const dice = document.querySelector('.dice');
        dice.addEventListener('click', async function(e) {
            e.preventDefault();
            quoteView.clearContainer();
            await loadAdvice();
        })
    } catch (err) {
        quoteView.renderError();
    }
}

Author

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published