Skip to content

arunprakashxavier/Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿงฎ Sleek Calculator

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.

โœจ Core Features

  • โœ… 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%)
  • ๐Ÿ’พ 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).

๐Ÿ’ป Tech Stack

  • ๐ŸŒ 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.

๐Ÿ“ Folder Structure

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)  

๐Ÿ”ฎ Future Upgrades & Enhancements

Sleek Calculator is set for an exciting evolution! Hereโ€™s a look at planned improvements:

โš™๏ธ Core Functionality Boosters

  • 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.

๐Ÿ–ผ๏ธ UI & UX Elegance

  • 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.

๐Ÿ› ๏ธ Advanced & Technical Improvements

  • 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.

About

Experience a smooth and intuitive web calculator with dual modes (Basic/Advanced), elegant dark/light themes, and satisfying animations. Includes full arithmetic, memory, advanced operations, and keyboard support. ๐Ÿ“ฑ๐Ÿ’ป

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors