A simple, responsive cat image grid using TheCatAPI.
- 3-column grid on desktop, 2 on tablet, 1 on mobile
- Square (1:1) images with lazy loading
- Refreshes images automatically every 30 minutes without reloading the page
- No API key stored in the repository
Just open index.html in your browser.
To avoid rate limits, you can use your own key at runtime (not committed):
- Open the page
- In the browser console, run:
localStorage.setItem('CAT_API_KEY', 'YOUR_API_KEY_HERE') location.reload()
- Create a new GitHub repo (no files):
cat-gallery - Push the local repo (see commands below)
- In the repo Settings → Pages, set the branch to
mainand/ (root) - Your site will be available at
https://<your-username>.github.io/cat-gallery/
After you create an empty GitHub repository, run:
cd /Users/brysontham/cat-gallery
git add .
git commit -m "Initial commit: Cat Gallery"
# Replace the URL with your repo URL
git remote add origin https://github.com/<your-username>/cat-gallery.git
git branch -M main
git push -u origin main