Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lukeb06/aa09-catstagram
https://github.com/lukeb06/aa09-catstagram
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/lukeb06/aa09-catstagram
- Owner: lukeb06
- Created: 2024-11-22T01:29:42.000Z (about 2 months ago)
- Default Branch: master
- Last Pushed: 2024-12-03T01:04:37.000Z (about 1 month ago)
- Last Synced: 2024-12-03T02:23:15.577Z (about 1 month ago)
- Language: JavaScript
- Size: 303 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README-phase-1.md
Awesome Lists containing this project
README
# Catstagram, Phase 1: Fetch A New Cat Image On Page Load
Today, you will be building out the HTML structure of the page using
JavaScript and using the Cats API to display a new cat whenever the page is
loaded.## Setup
Download this starter repo from the GitHub repository and open it in VS Code.
Run `node app.js` from the root directory to start the server that will serve
the static assets in the practice. Navigate to [http://localhost:5000] in your
browser to see the __public/index.html__ file rendered.## Instructions
Take some time to browse through each file. __public/index.html__ is where your
page will exist and where your scripts will inject DOM elements into.You'll be primarily working in the __public/index.js__ file today, and at the
current moment, it's empty. Your job will be to write a `window.onload`
callback. This callback should inject the page with all the necessary elements
to match __wireframes/phase-1.png__. The image will have to be fetched from the
Cats API. Make sure you look through the [API documentation].Don't forget to connect __index.html__ with __index.js__!
If you wish, you may also add your own flair to the styling. You can choose to
create a CSS file, use inline-styles with JavaScript, or a mix of both.[API documentation]: https://developers.thecatapi.com/view-account/ylX4blBYT9FaoVd6OhvR?report=bOoHBz-8t
[http://localhost:5000]: http://localhost:5000