tilde.town/age2.html

39 lines
823 B
HTML

<!DOCTYPE html>
<meta charset="utf-8">
<title>how old am I?</title>
<style>
body {
min-height: 100vh;
margin: 0; padding: 0;
display: flex;
flex: column nowrap;
align-items: center;
background: #455;
} main {
font: 18px/1.23 monospace;
max-width: 70ch;
width: 100%;
padding: 2ch;
margin: auto;
border: 1px solid;
color: #455;
background: #fee;
} .age,.countdown {
padding: 4px;
} .age { background: yellow; }
.cumulative .desc:not(:last-child)::after {
content: ", ";
}
.cumulative .desc:nth-last-child(2)::after {
content: ", and" !important;
}
.countdown { background: lime; }</style>
<body>
<main id="main">hmm....</main>
<script src="age.js"> </script>
<script>
window.onload = init;
var updateID = window.setInterval(update, 1000);
</script>
</body>