Compare commits
2 commits
d68e43be98
...
0995fa63f0
Author | SHA1 | Date | |
---|---|---|---|
0995fa63f0 | |||
fd57189337 |
2 changed files with 16 additions and 8 deletions
BIN
Nunito.woff2
BIN
Nunito.woff2
Binary file not shown.
24
index.html
24
index.html
|
@ -5,11 +5,6 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>Fuel App</title>
|
<title>Fuel App</title>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
@font-face {
|
|
||||||
src: url("Nunito.woff2") format("woff2");
|
|
||||||
font-family: Nunito;
|
|
||||||
font-weight: 200 1000;
|
|
||||||
}
|
|
||||||
body {
|
body {
|
||||||
margin:40px auto;
|
margin:40px auto;
|
||||||
max-width:650px;
|
max-width:650px;
|
||||||
|
@ -17,7 +12,7 @@ body {
|
||||||
font-size:18px;
|
font-size:18px;
|
||||||
color:#444;
|
color:#444;
|
||||||
padding:0 10px;
|
padding:0 10px;
|
||||||
font-family: Nunito, serif;
|
font-family: ui-rounded, 'Hiragino Maru Gothic ProN', Quicksand, Comfortaa, Manjari, Nunito, 'Arial Rounded MT', 'Arial Rounded MT Bold', Calibri, source-sans-pro, sans-serif;
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
}
|
}
|
||||||
h1,h2,h3{ line-height:1.2 }
|
h1,h2,h3{ line-height:1.2 }
|
||||||
|
@ -57,8 +52,17 @@ body {
|
||||||
<h1>⛽<br>Fuel App</h1>
|
<h1>⛽<br>Fuel App</h1>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div id="app"></div>
|
<div id="app">
|
||||||
|
<noscript>JavaScript is required to use this calculator.</noscript>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
const el = document.getElementById('app');
|
||||||
|
if (el) {
|
||||||
|
const timer = setTimeout(function() { console.log('ran'); el.textContent = "Loading…" }, 500);
|
||||||
|
el.dataset.timer = timer;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { reactive, html } from './arrow.min.mjs';
|
import { reactive, html } from './arrow.min.mjs';
|
||||||
|
|
||||||
|
@ -81,6 +85,10 @@ function updateValue(e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const app = document.getElementById('app');
|
||||||
|
clearTimeout(parseInt(app.dataset.timer, 10));
|
||||||
|
app.replaceChildren(); // Clear loading text
|
||||||
|
|
||||||
html`
|
html`
|
||||||
<form>
|
<form>
|
||||||
<label for="price">Price</label>
|
<label for="price">Price</label>
|
||||||
|
@ -99,7 +107,7 @@ html`
|
||||||
<p class="total">
|
<p class="total">
|
||||||
$${() => calculate().toFixed(2)}
|
$${() => calculate().toFixed(2)}
|
||||||
</p>
|
</p>
|
||||||
`(document.getElementById('app'))
|
`(app)
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue