Skip to content

About

πŸ–¨οΈ Beautiful static HTML calculator β€” 7 themes (Catppuccin, Gruvbox, Dracula, Nord…), PWA install, full keyboard support, works offline

Topics

Resources

Code of conduct

Contributing

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

19 Commits

Folders and files

Repository files navigation

CalculaHTML

CalculaHTML preview

License CI GitHub Pages Last commit Stars

A feature-rich, responsive calculator that runs entirely in the browser: 14 themes plus a System (auto) mode, scientific functions, memory, a history tape, keyboard support, and offline PWA support.

Live demo: https://mark44928.github.io/CalculaHTML/

Features

  • Basic arithmetic: + βˆ’ Γ— Γ·, percentages, sign toggle, backspace
  • Scientific functions: sin cos tan log ln √ xΒ² xΒ³ x^y 1/x n!, constants Ο€ and e
  • Memory: MC MR M+ Mβˆ’ MS
  • History tape with up to 40 entries
  • 14 themes + System (auto light/dark): Dark, Light, Gruvbox, Everforest, Tokyo Night, Dracula, Nord, Catppuccin Mocha, One Dark, Solarized Dark, Rose Pine, Monokai, GitHub Dark, Old Dark
  • Keyboard support, copy result, angle mode (DEG/RAD)
  • Responsive layout, accessible controls, reduced-motion friendly
  • Progressive Web App: installable, offline-capable (manifest + service worker)
  • No frameworks and no build step. Google Fonts load when online and fall back to system fonts offline.

Install as an app (PWA)

  1. Open the live demo in Chrome, Edge, or Safari.
  2. Use Install app / Add to Home Screen.
  3. Launch it like a native app. The service worker caches the app shell so it keeps working offline.

Usage

Live

Open https://mark44928.github.io/CalculaHTML/ β€” nothing to install.

Local

git clone https://github.com/Mark44928/CalculaHTML.git
cd CalculaHTML
python3 -m http.server 8080
# open http://localhost:8080

Opening index.html directly also works, but a local server enables the service worker and PWA install.

Themes

Switch themes from the dropdown or the color swatches. The choice is saved in localStorage. System follows your OS light/dark preference.

Keyboard shortcuts

Key Action
0-9, . input
+ - * / ^ operators
Enter / = evaluate
Backspace delete
Esc clear all
Delete clear entry
% percent

Project structure

CalculaHTML/
β”œβ”€β”€ index.html
β”œβ”€β”€ css/styles.css
β”œβ”€β”€ js/app.js
β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ icon.svg
β”‚   β”œβ”€β”€ icon-192.png / icon-512.png
β”‚   β”œβ”€β”€ maskable-192.png / maskable-512.png
β”‚   β”œβ”€β”€ apple-touch-icon.png
β”‚   β”œβ”€β”€ favicon-32.png
β”‚   └── preview.svg
β”œβ”€β”€ offline.html
β”œβ”€β”€ manifest.webmanifest
β”œβ”€β”€ sw.js
β”œβ”€β”€ package.json
β”œβ”€β”€ README.md
β”œβ”€β”€ AGENTS.md
β”œβ”€β”€ LICENSE
└── .github/workflows/
    β”œβ”€β”€ ci.yml
    └── pages.yml

Development

No dependencies to install.

npm run check        # node --check js/app.js
npm run start        # python3 -m http.server 8080

CI runs the JavaScript syntax check and validates manifest.webmanifest on every push and pull request.

Browser support

Recent Chrome, Edge, Firefox, and Safari. The layout uses color-mix() and modern CSS, so older browsers may not render every theme effect correctly. PWA install depends on the browser.

Contributing

Issues and pull requests are welcome β€” see CONTRIBUTING.md. Keep the project framework-free and dependency-free; this project follows the standard Code of Conduct.

License

MIT β€” see LICENSE.

About

πŸ–¨οΈ Beautiful static HTML calculator β€” 7 themes (Catppuccin, Gruvbox, Dracula, Nord…), PWA install, full keyboard support, works offline

Topics

Resources

Code of conduct

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages