Skip to content

grvsnh/Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

20 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿงฎ Calculator

A premium, responsive web calculator with beautiful animations and intuitive controls.
Experience seamless calculations with Dark/Light themes and persistent history.

Live Demo MIT License Made with Love


โœจ Key Features

๐Ÿงฎ Core Functionality

  • โœ… Basic Operations: Addition (+), Subtraction (โˆ’), Multiplication (ร—), Division (รท)
  • โœ… Advanced Functions: Percentage (%), Backspace, Clear All
  • โœ… Smart Input: Prevents invalid operations, handles decimals intelligently
  • โœ… Error Handling: Graceful error messages for invalid calculations

๐ŸŽจ Visual Experience

  • ๐ŸŒ— Dual Themes: Stunning Dark Mode ๐ŸŒ™ and Light Mode โ˜€๏ธ toggle
  • โœจ Smooth Animations: 60fps buttery transitions and micro-interactions
  • ๐ŸŽญ Beautiful UI: Glassmorphism design with floating background particles
  • ๐Ÿ“ฑ Fully Responsive: Perfect on desktop, tablet, and mobile devices

๐Ÿ“š Smart History

  • ๐Ÿ“ Persistent Storage: Your calculations saved between sessions
  • ๐Ÿ” Interactive History: Click any previous calculation to reuse
  • ๐Ÿงน Easy Management: One-click clear with visual feedback
  • ๐ŸŽฏ Quick Access: Slide-out panel with smooth animations

โŒจ๏ธ Keyboard Support

  • ๐ŸŽฎ Full Keyboard Control: Calculate without touching the mouse
  • ๐Ÿš€ Smart Shortcuts: Intuitive key mappings for efficiency
  • ๐ŸŽฏ Accessibility: Screen reader friendly with proper ARIA labels

๐Ÿ“ธ Screenshots

๐Ÿ–ฅ๏ธ Desktop Experience

๐ŸŒ™ Dark Mode โ˜€๏ธ Light Mode
Dark Mode Light Mode

๐Ÿ“š History Panel States

๐Ÿ“‹ Empty History ๐Ÿ“Š With Calculations
Empty History Filled History

โŒจ๏ธ Keyboard Shortcuts

Key Action Description
0-9 Numbers Input digits
+ - * / Operations Basic math operators
Enter Calculate Execute calculation (same as = button)
Escape Clear/Close Clear all or close history panel
Backspace Delete Remove last character
% Percentage Convert to percentage
. Decimal Add decimal point
H History Toggle history panel

๐ŸŽฏ Pro Tips

  • Press H anytime to quickly access your calculation history
  • Use Escape to clear everything or close panels
  • Enter works just like clicking the equals button
  • Click anywhere outside the history panel to close it

๐Ÿš€ Live Demo

Experience the calculator now:
๐Ÿ”— https://grvsnh.github.io/Calculator/


๐Ÿ› ๏ธ Technical Details

Built With

  • ๐ŸŽจ Frontend: Pure HTML5, CSS3, Vanilla JavaScript
  • โœจ Styling: Advanced CSS animations, glassmorphism effects
  • ๐Ÿ’พ Storage: localStorage for persistent history
  • ๐Ÿ“ฑ Design: Mobile-first responsive approach

Performance Features

  • โšก 60fps animations with optimized CSS transitions
  • ๐ŸŽฏ Efficient DOM manipulation with minimal reflows
  • ๐Ÿ’พ Smart memory management for history storage
  • ๐Ÿ“ฑ Mobile optimizations with disabled particles on small screens

๐ŸŽฎ How to Use

Basic Calculations

  1. Click numbers and operators or use your keyboard
  2. Press = or Enter to calculate
  3. Use AC or Escape to clear

History Management

  1. Click the ๐Ÿ“š button or press H to open history
  2. Click any previous calculation to reuse its result
  3. Use ๐Ÿงน button to clear all history
  4. Click outside the panel to close

Theme Switching

  1. Click the beautiful moon/sun toggle in the top-right
  2. Enjoy the smooth transition between themes
  3. Your preference is remembered!

๐ŸŒŸ Roadmap & Future Plans

๐Ÿš€ Coming Soon:

  • ๐Ÿงฎ Scientific Calculator (sin, cos, tan, log, etc.)
  • ๐Ÿ—๏ธ Engineering Calculator (unit conversions, constants)
  • ๐Ÿ’ป Programmer Calculator (binary, hex, bit operations)
  • โš–๏ธ BMI Calculator (health & fitness)
  • ๐Ÿ“Š Graphing Calculator (plot functions visually)
  • ๐ŸŽจ Custom Themes (create your own color schemes)
  • ๐Ÿ”Š Sound Effects (optional audio feedback)

๐Ÿค Contributing

We welcome contributions! Here's how you can help:

Ways to Contribute

  • ๐Ÿ› Bug Reports: Found an issue? Let us know!
  • ๐Ÿ’ก Feature Requests: Have ideas? Share them!
  • ๐Ÿ”ง Code Improvements: Submit a pull request!
  • ๐Ÿ“ Documentation: Help improve our docs
  • ๐ŸŽจ UI/UX: Design improvements welcome

Getting Started


# Fork the repository

git clone https://github.com/grvsnh/Calculator.git

# Navigate to project

cd Calculator

# Open in your browser

open index.html

# Start coding! ๐ŸŽ‰

Pull Request Guidelines

  • Follow existing code style
  • Test your changes thoroughly
  • Update documentation if needed
  • Add meaningful commit messages

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

TL;DR: You can use, modify, and distribute this freely! ๐ŸŽ‰


โญ Show Your Support

If you found this project helpful:

  • โญ Star this repository
  • ๐Ÿด Fork it for your own use
  • ๐Ÿ“ข Share with friends
  • ๐Ÿ’ฌ Leave feedback in issues

๐Ÿ™ Acknowledgments

  • ๐ŸŽจ Design Inspiration: Modern calculators and glassmorphism trends
  • ๐Ÿ’ก Animation Ideas: CSS animation community
  • ๐Ÿง  Math Logic: Standard calculator algorithms
  • โค๏ธ Community: All contributors and users!

๐Ÿ‘ฅ Contributors

Thanks to these amazing people who have contributed to this project:


Built with ๐Ÿ’ป passion, โ˜• coffee, and โœจ creativity

"Making calculations beautiful, one click at a time."

GitHub

About

A stylish calculator with light/dark mode, history display, and smooth animations. Built with HTML, CSS, and JavaScript.

Resources

License

Contributing

Stars

Watchers

Forks

Contributors