-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
190 lines (189 loc) · 7.31 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<!--!
* Simple Length Weight Converter (https://shafygunawan.github.io/simple-length-weight-converter)
* Copyright 2022 Shafy Gunawan (https://www.linkedin.com/in/shafygunawan/)
* Licensed under MIT (https://github.com/shafygunawan/simple-length-weight-converter/blob/main/LICENSE)
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Simple Length Weight Converter</title>
<link rel="stylesheet" href="./css/bootstrap.min.css" />
</head>
<body>
<div class="container py-5">
<div class="row">
<div class="col-lg-6 offset-lg-3">
<h1 class="text-center mb-5">Unit Conversion</h1>
<ul class="nav nav-tabs" id="myTab" role="tablist">
<li class="nav-item" role="presentation">
<button
class="nav-link active"
id="length-tab"
data-bs-toggle="tab"
data-bs-target="#length-tab-pane"
type="button"
role="tab"
aria-controls="length-tab-pane"
aria-selected="true"
>
Length
</button>
</li>
<li class="nav-item" role="presentation">
<button
class="nav-link"
id="weight-tab"
data-bs-toggle="tab"
data-bs-target="#weight-tab-pane"
type="button"
role="tab"
aria-controls="weight-tab-pane"
aria-selected="false"
>
Weight
</button>
</li>
</ul>
<div class="tab-content" id="myTabContent">
<div
class="tab-pane fade show active"
id="length-tab-pane"
role="tabpanel"
aria-labelledby="length-tab"
tabindex="0"
>
<form class="py-5" data-form="length">
<h2 class="h4 mb-4">Length unit conversion</h2>
<div class="mb-3">
<label for="length-from" class="form-label"
>Initial Unit:</label
>
<select
id="length-from"
class="form-select"
aria-label="From unit select"
required
name="from"
>
<option selected disabled value="">Select the unit</option>
<option value="km">Kilometer (km)</option>
<option value="hm">Hektometer (hm)</option>
<option value="dam">Dekameter (dam)</option>
<option value="m">Meter (m)</option>
<option value="dm">Desimeter (dm)</option>
<option value="cm">Centimeter (cm)</option>
<option value="mm">Milimeter (mm)</option>
</select>
</div>
<div class="mb-3">
<label for="length-to" class="form-label">End Unit:</label>
<select
id="length-to"
class="form-select"
aria-label="To unit select"
required
name="to"
>
<option selected disabled value="">Select the unit</option>
<option value="km">Kilometer (km)</option>
<option value="hm">Hektometer (hm)</option>
<option value="dam">Dekameter (dam)</option>
<option value="m">Meter (m)</option>
<option value="dm">Desimeter (dm)</option>
<option value="cm">Centimeter (cm)</option>
<option value="mm">Milimeter (mm)</option>
</select>
</div>
<div class="mb-3">
<label for="length-number" class="form-label"
>Value to be Converted:</label
>
<input
type="number"
class="form-control"
id="length-number"
required
name="number"
/>
</div>
<button type="submit" class="btn btn-primary mt-3">
Convert
</button>
</form>
</div>
<div
class="tab-pane fade"
id="weight-tab-pane"
role="tabpanel"
aria-labelledby="weight-tab"
tabindex="0"
>
<form class="py-5" data-form="weight">
<h2 class="h4 mb-4">Weight unit conversion</h2>
<div class="mb-3">
<label for="weight-from" class="form-label"
>Initial Unit:</label
>
<select
id="weight-from"
class="form-select"
aria-label="From unit select"
required
name="from"
>
<option selected disabled value="">Select the unit</option>
<option value="kg">Kilogram (kg)</option>
<option value="hg">Hektogram (hg)</option>
<option value="dag">Dekagram (dag)</option>
<option value="g">Gram (g)</option>
<option value="dg">Desigram (dg)</option>
<option value="cg">Centigram (cg)</option>
<option value="mg">Miligram (mg)</option>
</select>
</div>
<div class="mb-3">
<label for="weight-to" class="form-label">End Unit:</label>
<select
id="weight-to"
class="form-select"
aria-label="To unit select"
required
name="to"
>
<option selected disabled value="">Select the unit</option>
<option value="kg">Kilogram (kg)</option>
<option value="hg">Hektogram (hg)</option>
<option value="dag">Dekagram (dag)</option>
<option value="g">Gram (g)</option>
<option value="dg">Desigram (dg)</option>
<option value="cg">Centigram (cg)</option>
<option value="mg">Miligram (mg)</option>
</select>
</div>
<div class="mb-3">
<label for="weight-number" class="form-label"
>Value to be Converted:</label
>
<input
type="number"
class="form-control"
id="weight-number"
required
name="number"
/>
</div>
<button type="submit" class="btn btn-primary mt-3">
Convert
</button>
</form>
</div>
</div>
</div>
</div>
</div>
<script src="./js/bootstrap.bundle.min.js"></script>
<script src="./js/script.js"></script>
</body>
</html>