Skip to content

R-udren/calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Most advanced Latvian calculator

Vanilla JavaScript calculator with basic arithmetic operations, history of calculations, and keyboard support. The calculator has a responsive design and supports both light and dark themes.

Features

  • Basic arithmetic operations
  • History of calculations in local storage
  • Validation of input on the fly
  • Dark and light themes
  • Keyboard support, including history navigation
  • Responsive design
  • Latvian language support (isn't planned)
  • Display of intermediate results
  • Editable input field with cursor support

Light theme: img.png

Dark theme: img.png

Installation

  1. Clone the repository
    git clone https://github.com/R-udren/calculator.git 
  2. Navigate to the project directory
    cd calculator
  3. Install the dependencies
    npm install
  4. Start the development server
    npm run dev
  5. Build the production-ready files
    npm run build
  6. Preview the built app (optional, ensures everything works as expected after the build)
    npm run preview

Usage

  • Use the calculator as you would any other calculator
  • Use the keyboard to navigate the calculator and history
    • Enter or = to calculate
    • ArrowUp and ArrowDown to navigate history
    • Backspace or Delete to delete the last character
    • Escape, C, Ctrl + Backspace to clear the input
    • Ctrl + c to copy the result to the clipboard

About

Simple vanilla JS calculator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published