-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathszchrttallie.html
81 lines (74 loc) · 3.84 KB
/
szchrttallie.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
<html>
<style>
.custom-range::-webkit-slider-thumb {
background-color: #EB5B9F !important;
}
.custom-range:focus::-webkit-slider-thumb{box-shadow:none !important}
.custom-range:focus::-moz-range-thumb{box-shadow:none !important}
.custom-range:focus::-ms-thumb{box-shadow:none !important}
</style>
<head>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>
<body>
<div class="measure-content" style="text-align: left;width: 90%;margin: 0 auto;margin-top: 1%;">
<p>Ermittel deine Größe, indem du unten deine Maße eingibst. Du musst nur deinen Tallieumfang und dein Gewicht wissen.</p>
<p>Hilfreiche Links: <br> <a target="_blank" rel="noopener noreferrer" href="https://de.wikihow.com/Die-eigene-Taille-messen">Wie messe ich meinen Tallienumfang?</a></p>
<div class="text-left">
<h5 class="ml-1"> <label for="height">Tallienumfang: <span id="heightInfo"></span></label></b>
<input type="range" id="height" class="custom-range" value="56" min="56" max="115" step="1" oninput="ChangeHeight(this.value)" style="margin: 10px 0 10px 0;">
</div>
<div class="text-left">
<h5 class="ml-1"> <label for="weight">Gewicht: <span id="weightInfo"></span></label></b>
<input type="range" id="weight" class="custom-range" value="40" min="40" max="110" step="1" oninput="ChangeWeight(this.value)" style="margin: 10px 0 10px 0;">
</div>
<div class="mt-2 text-center">
<h5>Deine Größe:</h5>
<center style="margin-top: 10px;"><div style="/* margin-top: 12px; */width: 200px;height: 100px;border: 1px solid;font-size: 50px;text-align: center;vertical-align: middle;line-height: 100px;margin: 0 auto;" id="size"> </div></center>
<p style="font-size: 0.6rem;">*N/A = Nicht Verfügbar</p>
</div>
</div>
<script>
var weight = 40, height = 56;
window.onload = () => {
document.getElementById("heightInfo").innerText = 56 + " cm";
document.getElementById("weightInfo").innerText = 40 + " kg";
}
function ChangeHeight(data) {
height = data;
document.getElementById("heightInfo").innerText = data + " cm";
UpdateSize();
}
function ChangeWeight(data) {
weight = data;
document.getElementById("weightInfo").innerText = data + " kg";
UpdateSize();
}
function UpdateSize() {
console.log('Height ' + height + ' Weight ' + weight)
if(height > 115 || weight > 110){
document.getElementById("size").innerText = "N/A";
}
else if(weight >= 40 && weight <= 50
&& height>=56 && height <=65){
document.getElementById("size").innerText = "S";
}
else if(weight >= 50 && weight <= 65
&& height>=66 && height <=75){
document.getElementById("size").innerText = "M";
}
else if(weight >= 65 && weight <= 80
&& height>=76 && height <=88){
document.getElementById("size").innerText = "L";
}
else if(weight >= 80 && weight <= 100
&& height>=89 && height <=101){
document.getElementById("size").innerText = "XL";
}
else{
document.getElementById("size").innerText = "N/A";
}
}
</script>
</body>
</html>