-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
60 lines (50 loc) · 2.68 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<!-- Begin Jekyll SEO tag v2.3.0 -->
<title>Welcome to GitHub Pages | test</title>
<meta property="og:title" content="Welcome to GitHub Pages" />
<meta property="og:locale" content="en_US" />
<link rel="canonical" href="https://mouro001.github.io/" />
<meta property="og:url" content="https://mouro001.github.io/" />
<meta property="og:site_name" content="test" />
<script type="application/ld+json">
{"name":"test","description":null,"author":null,"@type":"WebSite","url":"https://mouro001.github.io/","image":null,"publisher":null,"headline":"Welcome to GitHub Pages","dateModified":null,"datePublished":null,"sameAs":null,"mainEntityOfPage":null,"@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<meta name="description" content=""/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#157878">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="/assets/css/style.css?v=389d9d13e592a55dd1c615ea434ee15d1e38d9d2">
</head>
<body>
<section class="page-header">
<h1 class="project-name">How many stacks in <input id="number" type="number" style="width: 150px;background-color: rgba(1,1,1,0);outline: none;" value="123"> items?</h1>
<h2 id="result" class="project-tagline">1 stack and 59 items</h2>
<a href="https://github.com/mouro001/mouro001.github.com/" class="btn">View on GitHub</a>
</section>
<section class="main-content">
<footer class="site-footer">
<span class="site-footer-owner"><a href="https://github.com/mouro001/mouro001.github.io">How Many</a> is maintained by <a href="https://github.com/mouro001">Mouro</a>.</span>
<span class="site-footer-credits">This page was generated by <a href="https://pages.github.com">GitHub Pages</a>.</span>
</footer>
</section>
<script>
document.getElementById("number").addEventListener('input', update);
function count(number){
var result = new Object();
result.stacks = Math.floor(number/64);
result.remaining = number % 64;
return result;
}
function update(){
var result = count(this.value);
var expanded = result.stacks > 0 ? (result.stacks + " stack"+(result.stacks > 1 ? "s": "")) : "";
expanded += result.stacks > 0 & result.remaining > 0 ? " and " : "";
expanded += result.remaining > 0 ? result.remaining + " item" + (result.remaining > 1 ? "s": "") : "";
document.getElementById("result").textContent = expanded;
}
</script>
</body>
</html>