-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
121 lines (113 loc) · 3.93 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Ratio Calculator</title>
<meta name="description" content="Web Calculator for the aspect ratio.">
<meta property="og:title" content="Ratio Calculator">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Monda:wght@400;700&display=swap" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="./css/main.css">
</head>
<body>
<main>
<section class="text-center px-4 py-4 hero-unit">
<div class="row">
<div class="col-lg-6 col-md-8 mx-auto">
<h1 class="fw-bold">Ratio Calculator</h1>
<!-- <p class="lead">
Calcurate ratio.
</p> -->
<div class="input-area mb-2">
<!-- TODO: use bootstrap form-group -->
<input id="px-input" type="number" class="input-medium" placeholder="width" autofocus>
px
<span id="px-input-tooltip" class="d-none">Invalid Number!</span>
</div>
<div>
<input type="radio" name="width-or-height" id="widthMode" value="w" checked>
<label for="widthMode">width</label>
<input type="radio" name="width-or-height" id="heightMode" value="h">
<label for="heightMode">height</label>
</div>
<span>
</span>
</div>
</div>
</section>
<div class="py-5">
<div class="container">
<div class="row mb-5">
<div class="col-md-4">
<div id="sixteenToNine-ratio" class="box">
<h2 class="fw-bold">16:9</h2>
</div>
</div>
<div class="col-md-2">
<p>width: <span id="sixteenToNine_w" class="px-text fw-bold"></span> px</p>
<p>height: <span id="sixteenToNine_h" class="px-text fw-bold"></span> px</p>
</div>
<div class="col-md-4">
<div id="goldenRatio" class="box">
<h2 class="fw-bold">Golden Ratio</h2>
</div>
</div>
<div class="col-md-2">
<p>width: <span id="goldenRatio_w" class="px-text fw-bold"></span> px</p>
<p>height: <span id="goldenRatio_h" class="px-text fw-bold"></span> px</p>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div id="threeToTwo-ratio" class="box">
<h2 class="fw-bold">3:2</h2>
</div>
</div>
<div class="col-md-2">
<p>width: <span id="threeToTwo_w" class="px-text fw-bold"></span> px</p>
<p>height: <span id="threeToTwo_h" class="px-text fw-bold"></span> px</p>
</div>
<div class="col-md-4">
<div id="fourToThree" class="box">
<h2 class="fw-bold">4:3</h2>
</div>
</div>
<div class="col-md-2">
<p>width: <span id="fourToThree_w" class="px-text fw-bold"></span> px</p>
<p>height: <span id="fourToThree_h" class="px-text fw-bold"></span> px</p>
</div>
</div>
</div>
</div>
</main>
<footer class="text-center bg-dark py-4">
<div class="col-lg-6 mx-auto">
<div class="mb-2">
<a class="twitter-share-button" href="https://twitter.com/intent/tweet">Tweet</a>
<iframe
src="https://www.facebook.com/plugins/share_button.php?href=https%3A%2F%2Fratiocalculator.toshimaru.net&layout=button&size=small&width=69&height=20"
width="69" height="20" style="border:none;overflow:hidden" allow="encrypted-media"></iframe>
</div>
<p class="mb-0">Designed and coded by <a href="https://twitter.com/toshimaru_e">@toshimaru_e</a>.</p>
</div>
</footer>
<script type="module" src="/js/main.js"></script>
<script>window.twttr = (function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0],
t = window.twttr || {};
if (d.getElementById(id)) return t;
js = d.createElement(s);
js.id = id;
js.src = "https://platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js, fjs);
t._e = [];
t.ready = function (f) {
t._e.push(f);
};
return t;
}(document, "script", "twitter-wjs"));</script>
</body>
</html>