Skip to content

nhristova/random-quote-machine

Repository files navigation

Random Quote Machine

View at: https://nhristova.github.io/random-quote-machine/

Tech:

  • React (Vite)
  • TypeScript
  • CSS

User stories

  • #1: I can see a wrapper element with a corresponding id="quote-box".
  • #2: Within #quote-box, I can see an element with a corresponding id="text".
  • #3: Within #quote-box, I can see an element with a corresponding id="author".
  • #4: Within #quote-box, I can see a clickable element with a corresponding id="new-quote".
  • #5: Within #quote-box, I can see a clickable a element with a corresponding id="tweet-quote".
  • #6: On first load, my quote machine displays a random quote in the element with id="text".
  • #7: On first load, my quote machine displays the random quote's author in the element with id="author".
  • #8: When the #new-quote button is clicked, my quote machine should fetch a new quote and display it in the #text element.
  • #9: My quote machine should fetch the new quote's author when the #new-quote button is clicked and display it in the #author element.
  • #10: I can tweet the current quote by clicking on the #tweet-quote a element. This a element should include the "twitter.com/intent/tweet" path in its href attribute to tweet the current quote.
  • #11: The #quote-box wrapper element should be horizontally centered. Please run tests with browser's zoom level at 100% and page maximized.

Platform

You can build your project by using this CodePen template and clicking Save to create your own pen. Or you can use this CDN link to run the tests in any environment you like: https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js

Once you're done, submit the URL to your working project with all its tests passing.

Note: Twitter does not allow links to be loaded in an iframe. Try using the target="_blank" or target="_top" attribute on the #tweet-quote element if your tweet won't load. target="_top" will replace the current tab so make sure your work is saved.

Assignment

Free Code Camp https://www.freecodecamp.org/learn/front-end-development-libraries/front-end-development-libraries-projects/build-a-random-quote-machine

Objective: Build an app that is functionally similar to this: https://random-quote-machine.freecodecamp.rocks/.

Image credits: