Welcome to Sleek Calculator โ a modern, web-based calculator built with clean HTML, stylish CSS, and robust JavaScript. It boasts a responsive design, dynamic dark/light themes, and a range of basic to advanced mathematical functions. Experience an intuitive interface with visually appealing, smooth animations.
-
โ Basic Arithmetic: Addition (
+), Subtraction (-), Multiplication (*), Division (/). -
๐ง Advanced Operations:
- Percentage (
%) - Square (
xยฒ) & Square Root (โ) - Power (
x^y) & Reciprocal (1/x) - Sign Toggle (
+/-) - Custom GST Calculation (
9%)
- Percentage (
-
๐พ Memory Functions: Store (
MS), Recall (MR), Clear (MC). -
๐ฅ๏ธ Dynamic Display:
- Clear, easy-to-read output for expressions and results.
- Smart precision handling for long numbers.
- Visual memory status indicator ('M').
-
๐จ User Interface & Experience:
- Dual Mode: Switch between Basic and Advanced layouts.
- ๐ฑ Tailored Mobile Advanced View: Features a custom, sketch-based button layout for the Advanced Calculator specifically designed for intuitive use on smaller screens.
- ๐ Dynamic Theming: Toggle Dark/Light modes (preference saved via
localStorage). - ๐ฑ Responsive Design: Adapts seamlessly to various screen sizes beyond the specific advanced mobile layout.
- ๐ซ Smooth Animations: For button interactions and mode transitions.
-
โจ๏ธ Input & Control:
- Intuitive on-screen button input.
- Keyboard support for most operations.
- Essential Clear (
C) and Backspace (โ) functions.
-
๐ Calculation History: Internally tracks the last 10 calculations (viewable in the browser console).
- ๐ HTML5: Provides the foundational structure of the web page.
- ๐จ CSS3: Powers all styling, layout, custom themes, and animations.
- (Note: May utilize Bootstrap 5.3 for general page layout if integrated beyond the calculator itself.)
- โ๏ธ JavaScript (ES6+): Drives the core logic, calculations, DOM manipulation, event handling, and theme management.
The project is organized as follows:
project-root/
โโโ css/
โ โโโ style.css # Custom CSS for styling and animations
โโโ img/
โ โโโ favicon.png # Browser tab icon
โโโ js/
โ โโโ script.js # Core JavaScript logic and functionality
โโโ index.html # Main HTML entry point for the application
โโโ README.md # Project overview and documentation (this file)
Sleek Calculator is set for an exciting evolution! Hereโs a look at planned improvements:
- Parentheses & Expressions: Implement full
()support for complex mathematical expressions. - Advanced Math Suite: Add comprehensive trigonometric functions (with angle modes), logarithms, and exponentials.
- Enhanced Memory Operations: Introduce M+, M-, and potentially multiple memory slots for greater flexibility.
- Practical Conversions: Integrate unit converters (length, mass, temp) and real-time currency conversion.
- Quick Access Tools: Include an "Ans" key for recalling the last result and quick access to constants like ฯ and e.
- Interactive Calculation History: Display a clickable history log directly within the calculator UI for easy review and reuse.
- Superior Number Readability: Implement thousands separators and allow user-configurable decimal precision.
- Smarter Error Handling: Provide specific, user-friendly messages for calculation errors (e.g., "Division by zero").
- Theme Personalization: Offer more theme choices or options for users to customize accent colors.
- Engaging Sensory Feedback: Introduce optional audio cues for button presses and haptic feedback on compatible devices.
- Versatile Notations & Number Bases: Full control over scientific notation and support for BIN/OCT/DEC/HEX operations.
- Robust Fraction Handling: Enable precise calculations and clear display of fractions.
- Offline-Ready PWA: Transform into an installable Progressive Web App for seamless offline functionality.
- Accessibility (A11y) Excellence: Commit to WCAG compliance, ensuring full keyboard navigation and screen reader compatibility.
- Solid Foundations: Implement comprehensive unit and E2E testing, alongside continuous code architecture refinement for stability and scalability.