Giter Club home page Giter Club logo

news-website's Introduction

News App

This is a simple News App web application that allows users to browse news articles based on different categories such as IPL, Finance, and Politics, or search for news by entering a specific keyword. The app fetches data from the News API and displays the news articles in a user-friendly format.

Features

  • Browse news articles by categories: IPL, Finance, and Politics.
  • Search for news articles using a keyword.
  • Click on a news card to open the full article in a new tab.
  • Toggle between Dark and Light mode for a personalized viewing experience.

Technologies Used

  • HTML5
  • CSS3
  • JavaScript
  • Fetch API for making API calls
  • News API for fetching news data
  • Google Fonts for font styles

How to Use

  1. Clone the repository or download the project files.

      git clone https://github.com/your-username/news-app.git
  2. Open the index.html file in your web browser.

  3. The app will load with news articles related to "Technology" by default.

  4. Browse news articles using the navigation links (IPL, Finance, and Politics) or use the search bar to enter a keyword and search for specific news articles.

  5. Click on any news card to view the full article in a new tab.

  6. Toggle between Dark and Light mode by clicking the "Toggle Dark/Light Mode" button in the navigation bar.

Dark/Light Mode

  • The app provides a Dark/Light mode toggle feature, which allows users to switch between different color schemes based on their preference. When the app is opened, it checks if the user's system preferences are set to dark mode using the prefers-color-scheme media query. If dark mode is preferred, the app automatically sets the theme to dark. Otherwise, it uses the default light mode.

  • Users can manually toggle between dark and light mode by clicking the "Toggle Dark/Light Mode" button in the navigation bar. The selected mode is saved in localStorage, so the chosen theme will be applied on subsequent visits to the website.

API Key

  • Please note that the app uses the News API to fetch news articles. The API key is provided as a constant variable in the script.js file. If you encounter any issues with API requests, ensure that the API key is valid and active.

Credits

License

  • This project is licensed under the MIT License. Feel free to use, modify, and distribute the code as per the terms of the MIT License.

news-website's People

Contributors

om-shankar-thakur avatar

Watchers

 avatar

news-website's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.