This project is a web application that includes features such as checking login status, displaying top news articles, and showing the current date, time, and location. ππ°βπΊοΈ
To use this project, follow these steps:
- Clone the repository:
git clone https://github.com/your-username/project-name.git
π₯ - Open the project directory:
cd project-name
- Open the
index.html
file in a web browser. π
- Upon opening the web application, the login status is checked. π
- If the user is not logged in, they will see a "Login" button. Clicking on the button will redirect the user to the login page. ππ
- If the user is logged in, they will see a "Logout" button and their user ID displayed. ππ
- Clicking on the "Logout" button will remove the user ID from local storage and redirect the user to the homepage. πͺ
- The web application fetches the top headlines from the News API and displays them in two different sections. π°
- The first section displays the top 5 news articles as clickable elements. Clicking on an article will redirect the user to the full article. ππ
- The second section displays a list of articles with their title, image, publication date, and description. ποΈπ π
- The web application also displays the current date, time, and location. π
βπΊοΈ
- The date and time are obtained using JavaScript's
Date
object and displayed on the webpage. π β - The location is obtained using the user's geolocation data. If the location is available, it will be displayed. Otherwise, a default message will be shown. πΊοΈβ
- The date and time are obtained using JavaScript's
- Login status checking πβ
- Login and logout functionality ππ
- Displaying top news articles π°π
- Clickable article elements ππ
- Displaying current date, time, and location π βπΊοΈ
Contributions to this project are welcome. To contribute, follow these steps:
- Fork the repository. π΄
- Create a new branch. πΏ
- Make your changes and commit them. π‘
- Push your changes to your fork. π€
- Submit a pull request. π
Let's make this project even more amazing together! π