Skip to content

hooiyan/fem-advice-generator-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advice generator app

Table of contents

Overview

Summary

A simple web app built with HTML, CSS, and JavaScript. The user can press on the button to generate a random advice every two seconds.

Links

Screenshot

Desktop

Mobile

Details

Project purpose and goal

The purpose of this project is to revise how to use Fetch API to get data and display data to the user.

Web stack and explanation

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • Desktop-first workflow
  • Advice Slip API

Lesson learned

Although this is a rather simple project, I still learned a thing or two from it. Aside from learning how to use Fetch API, I also learned how to use the setInterval() function to generate random advice within a specific amount of time. Other than that, I learned how to use the box-shadow property to create a shadow effect on the button with this code box-shadow: 0 0 40px -5px var(--neon-green);

Future improvements

The Advice Slip API does provide some other options to fetch data in different ways. I would like to add search functionality to the app or let the user looks through the advice by the id in ascending order.

Useful resources

Author