This project is a simple, responsive calculator web application that supports basic arithmetic operations. The calculator is designed to work seamlessly across various screen sizes, from mobile devices to desktop screens. It includes a dark mode toggle for better accessibility and user experience.
- Basic arithmetic operations: addition, subtraction, multiplication, and division.
- Clear (AC) and delete (DEL) functions.
- Percentage calculation.
- Responsive design for all screen sizes.
- Dark mode toggle.
- HTML
- CSS
- JavaScript
- Bootstrap Icons
To run this project locally, you need a web browser (like Chrome, Firefox, or Safari).
-
Clone the repository:
git clone https://github.com/yourusername/calculator.git
-
Navigate to the project directory:
cd calculator
-
Open
index.html
in your preferred web browser:open index.html
index.html
: The main HTML file containing the structure of the calculator.style.css
: The CSS file containing styles for the calculator.calculator.js
: The JavaScript file containing the functionality for the calculator.
- Open the calculator in your web browser.
- Use the buttons to perform arithmetic operations:
- AC: Clear the input.
- %: Calculate the percentage.
- DEL: Delete the last digit.
- + - * /: Perform addition, subtraction, multiplication, and division.
- Dark Mode: Toggle the dark mode using the sun icon at the top.
You can customize the calculator by modifying the CSS and JavaScript files:
- CSS: Adjust styles in
style.css
to change the appearance. - JavaScript: Modify
calculator.js
to change the functionality.
Contributions are welcome! Please fork this repository and submit a pull request for any improvements or bug fixes.
-
Fork the repository.
-
Create a new branch:
git checkout -b feature/your-feature-name
-
Make your changes and commit them:
git commit -m 'Add some feature'
-
Push to the branch:
git push origin feature/your-feature-name
-
Open a pull request.
- Thanks to Bootstrap Icons for the icon set.
- Inspired by basic calculator designs and tutorials.