This is a tiny little calculator written in Vanilla JS and PHP.
π Calculations page
- Performing calculations
- Saving results as CSV on the server
- Displaying results from CSV as HTML table
- Clone this repository and install dependencies with
npm i
- Run
npm run dev
to start local dev server - Run
npm run build
to compile ready-to-deploy bundle todist
folder - Run
npm run server
to run local PHP server ondist
folder
src
- all source filessrc/scss
- scss stylessrc/scss/style.scss
- SCSS entry pointsrc/js
- all JavaScript filessrc/js/main.js
- JS entry pointsrc/views
- template for html-webpack-pluginphp
- all PHP filesdist
- compiled production bundlewebpack
- whole webpack config
- However it was not mentioned in the original design, additional navigation and header was added for better usability
- It would be nice if large results would scroll, however
overflow: scroll
was adding nasty scrollbars on windows - As this page is collecting user's IP address, some kind of disclaimer should be implemented
- Also, user should have a possibility to remove his personal data from the server
- Results table is not filtered by newest to oldest for now
- A Service Worker and offline functionality could be a nice addition to the calculator page
- Current implementation of a toast message seems a bit intrusive. There is no way to close it, or to interact with it. I was thinking about using toastr, but using whole package just for one little toast message is probably an overkill