-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
151 lines (111 loc) · 4.04 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
<!DOCTYPE html>
<html lang="pt-BR" xml:lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" sizes="32x32" href="./images/favicon-32x32.ico">
<link rel="stylesheet" href="src/style/index.css">
<link rel="stylesheet" href="src/style/response.css">
<title translate="yes">Tip calculator app</title>
</head>
<body>
<h1 translate="no">spli<br>tter</h1>
<main>
<form>
<section id="bill-content">
<div class="bill">
<label for="one">Conta</label>
<div class="bill-input">
<p>Não pode ser zero</p>
<img src="src/images/icon-dollar.svg" alt="icon dolar">
<input type="number" name="price" class="input-num" placeholder="0" id="one" onkeypress="OnClickEnter(event)"
required>
</div>
</div>
<div class="porcent-content">
<span>Selecionar % da Gorjeta</span>
<div class="porcent">
<button type="button" class="porcent-item" name="item" onclick="calcPercentage('5')"> 5% </button>
<button type="button" class="porcent-item" name="item" onclick="calcPercentage('10')"> 10% </button>
<button type="button" class="porcent-item" name="item" onclick="calcPercentage('15')"> 15% </button>
<button type="button" class="porcent-item" name="item" onclick="calcPercentage('25')"> 25% </button>
<button type="button" class="porcent-item" name="item" onclick="calcPercentage('50')"> 50% </button>
<input type="number" id="custom-porcent" class="porcent-item" value="" placeholder="custom"
onkeypress="OnClickEnter(event)"
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);"
maxlength="3" translate="no">
</div>
</div>
<div class="num-people">
<label for="two">Número de Pessoas</label>
<div class="people-input">
<p>Não pode ser zero</p>
<img src="src/images/icon-person.svg" alt="icon person">
<input type="number" name="persons" class="input-num" placeholder="0" id="two" onkeypress="OnClickEnter(event)"
required>
</div>
</div>
</section>
<section id="count-content">
<div class="tip-amount-content">
<div>
<p class="title">quantidade de gorjeta</p>
<p>/ person</p>
</div>
<div class="cotage">
<span>$</span><span id="tip-person">0.00</span>
</div>
</div>
<div class="total-content">
<div>
<p class="title">total</p>
<p>/ person</p>
</div>
<div class="cotage">
<span>$</span><span id="total-person">0.00</span>
</div>
</div>
<button type="button" class="reset" translate="no" disabled>reset</button>
</section>
</form>
</main>
<footer class="attribution">
<a href="http://maxwellads.vercel.app">© Maxwell Alves dos Santos 2022</a>
<a href="https://www.frontendmentor.io?ref=challenge" target="_blank">- Frontend Mentor</a>
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.10.3/gsap.min.js"></script>
<script>
TweenMax.staggerFrom('h1', 1.4, {
delay: 0.2,
opacity: 0,
y: -10,
ease: Expo.easeOut
});
TweenMax.staggerFrom('main', 1, {
delay: 0.2,
opacity: 0,
y: 50,
ease: Expo.easeInOut
});
TweenMax.staggerFrom('#bill-content', 1, {
delay: 0.5,
opacity: 0,
x: -50,
ease: Expo.easeInOut
});
TweenMax.staggerFrom('#count-content', 1, {
delay: 0.5,
opacity: 0,
x: 50,
ease: Expo.easeInOut
});
TweenMax.staggerFrom('.attribution', 1.6, {
delay: 0.5,
opacity: 0,
x: 50,
ease: Expo.easeInOut
});
</script>
<script src="src/script/index.js"></script>
</body>
</html>