BEILOFF Toolkit / v1.0.1

Embeddable service cost calculator for HTML and JavaScript

Let visitors choose a service, enter a quantity and see how the price is calculated. The cleaning example includes rate comparisons, optional work and a downloadable estimate.

How the kit works

Choose a service

The demo has three cleaning services with different square-metre rates. Switching services preserves the area and selected extras.

Enter a quantity and add extras

Enter a whole floor area from 10 to 500 m². Optional work such as oven cleaning adds a flat fee once per estimate. Edit rates and limits in the settings file.

Save an estimate

The breakdown and total update immediately. Download the same lines as a plain-text file. Invalid quantities clear the result and disable saving.

Inside the ZIP

  • README.md
  • demo.css
  • en.html
  • index.html
  • quote.js
  • quote.test.mjs
  • settings.js
  • widget.css
  • widget.js
  • RELEASE.txt

The widget calculates indicative prices in rubles in the browser. Rates are fictional. Confirm the price on the seller’s server when accepting an order.

Getting started

  1. Extract the ZIP, open en.html and download a sample estimate.
  2. Edit the example rates, labels, unit and limits in settings.js. Monetary values are whole kopecks.
  3. Copy the four widget files to your website and paste the HTML snippet from README.md. Set the language for each page.

Change the colours and logo

In widget.css change --action for the button and --bill for the estimate inside :host. Set --paper and --ink for background and text. Adjust the dark theme too. Replace the BEILOFF Toolkit wordmark in the header of index.html and en.html. demo.css styles the surrounding page. Check keyboard focus and the estimate on mobile.

Verify the result

Check the sample: 50 m² at RUB 90 plus RUB 650 for the oven gives RUB 5,150. Compare the download with the screen. Run node --test quote.test.mjs for arithmetic, bounds and configuration checks.

MDN · Custom elements

Release notes

v1.0.1

Added colour and logo customisation instructions to the README.

v1.0.0

Initial release with editable unit rates, flat add-ons, an embeddable widget and a downloadable estimate.

Download free in my account