trimill.xyz/flaskr/templates/projects/converter/index.html

34 lines
1.5 KiB
HTML

{% set meta={"title": "Unit Converter", "desc": "Convert between units, both ordinary and esoteric"} %}
{% extends "/_base.html" %}
{% block head %}
<script src="main.js"></script>
<script src="measures.js"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
crossorigin="anonymous"></script>
{% endblock %}
{% block content %}
<p>Convert between many different units and scales of length, temparture, mass, and area</p>
<select id="measure" onchange="measureUpdate();">
<option value="length" selected>Length</option>
<option value="temp">Temperature</option>
<option value="mass">Mass</option>
<option value="area">Area</option>
<option value="time">Time</option>
<option value="volume">Volume</option>
<option value="energy">Energy</option>
<option value="computing">Computing</option>
</select><br><br>
<input id="val1" type="text" onchange="recalc();" value="1">
<select id="unit1" onchange="recalc();"></select>
<span class="big"> = </span>
<input id="val2" type="text" onchange="recalc();">
<select id="unit2" onchange="recalc();"></select>
<input type="button" value="Switch" onclick="swap();"><br>
<p>Results may be rounded or have noise in the last decimal digits.
If a result ends with a sequence of '9's, you should round up.
If it ends with '0's, you should ignore them. When converting from very
small units to very large ones, the result may be zero.</p>
</table>
{% endblock %}