This is a simple web application that uses the Unsplash API to fetch and display a collection of random photos. The photos are fetched dynamically as the user scrolls down the page.
- Fetches random photos from the Unsplash API.
- Implements infinite scrolling to load more photos as the user reaches the bottom of the page.
- Clicking on a photo opens the Unsplash link in a new tab.
- Provides a loading animation while fetching and displaying the photos.
- HTML
- CSS
- JavaScript
-
Clone the repository:
-
Open the project folder in your preferred code editor.
-
Open the
index.html
file in a web browser. -
Scroll down the page to load more photos dynamically.
To use the Unsplash API, you will need an API key. Follow these steps to obtain your API key:
-
Create an account on the Unsplash website.
-
Visit the Unsplash Developer Portal and create a new application.
-
Copy your API key.
-
In the
script.js
file, replace theapiKey
variable with your API key.
Feel free to customize the application by modifying the CSS styles in the style.css
file. You can adjust the font, layout, or any other aspect to fit your preference.
- Unsplash - The API used to fetch random photos.