项目作者: virtualvivek

项目描述 :
This light-weight library provides iOS 13 style calculators for web applications written in html, css and AngularJs .Including Basic calculator, BMI calculator, Macro kcal calculator, Grade calculator, Timer and more.
高级语言: JavaScript
项目地址: git://github.com/virtualvivek/iOS-13-Calculators.git
创建时间: 2019-10-28T18:07:51Z
项目社区:https://github.com/virtualvivek/iOS-13-Calculators

开源协议:Apache License 2.0

下载





Web



Framework



Repo. Size


License: Apache


Release




Demo



A light-weight library provides ios 13 style calculators for web applications


​ See a similar dark version here -
Dark version of ios Calculator




Overview


An ios 13 style calculators for web browsers.
Easily Embbed and use calculated results easily in your pages.
This project is inspired from the light theme introduced by apple inc. to apply styles in html css format.


Installation

Include ios-calculators folder in your target project file.

Add where you want to add between your layout using a preprocessing language-

  1. <?php include 'include/Calculator.html';?>

OR

Simply copy the html code and add between you page.

Requirements

  1. <script type='text/javascript' src='angular.min.js'></script>


Basic Calculator

Usage

To use values returned by the Basic calculator-

  1. use {{c_value}}
  2. Eg: <input type="text" placeholder="Result" value="{{c_value}}"/>

OR through ng tag-

  1. ng-model="c_value"

BMI Calculator

Usage

To use values returned by the BMI calculator-

  1. use {{b_value}}
  2. Eg: <input type="text" placeholder="BMI value" value="{{b_value}}"/>

OR through ng tag-

  1. ng-model="b_value"

Timer

Usage

Standalone timer app here : ios-13-Calculators/iosTimer

To use values returned by the Timer-

  1. use {{counter | formatTimer}}
  2. Eg:
  3. <input type="text" placeholder="BMI value" value="{{counter | formatTimer}}"/>









Grade Calculator

Usage

To use values returned by the Grade calculator-

  1. use id 'avg_grades'
  2. Eg: <input type="text" id="avg_grades" placeholder="Grade" value="avg_grades"/>

OR through assign value-

  1. var value = document.getElementById("avg_grades").value;


Macro Calculator

Usage

To use values returned by the Macro calculator-

  1. use class 'calories' using structure:
  2. <h3 class="calories"><span>0</span> kcal</h3>

OR through assign value-

  1. var value = document.getElementById("calories").innerHtml;




Browser Compatibility

Chrome Firefox Edge Safari Opera
Latest ✔ Latest ✔ Latest ✔ 9.1+ ✔ Latest ✔

License

ios13-Calculators is licensed under Apache-2.0 license. View license.

Copyright (c) 2019-21 Vivek Verma