-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
135 lines (119 loc) · 3.87 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>RevoU Mini Project | TriCalc</title>
<!-- Google Font - Poppins -->
<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=Poppins:wght@400;600;800&display=swap"
rel="stylesheet"
/>
<!-- Website Icon -->
<link rel="website icon" type="png" href="assets/triangle-icon.png" />
<!-- My CSS -->
<link rel="stylesheet" href="css/style.css" />
</head>
<body>
<!-- HEADER -->
<header>
<h1 class="logo title">TriCalc</h1>
</header>
<!-- MAIN CONTENT -->
<main id="main">
<div class="container left">
<!-- TRIANGLE FIGURE -->
<img
src="assets/triangle.svg"
alt="triangle figure"
class="triangle-figure"
/>
<!-- Title -->
<h3 class="title">Area of triangle</h3>
<!-- SWITCH BUTTON -->
<p class="switch-button">
Switch to <a href="#perimeter" id="switch-link">Perimeter</a>
</p>
<!-- FORMULA -->
<div class="formula-group">
<h2 class="subtitle">Formula</h2>
<p class="formula">Area = 1/2 × base × height</p>
</div>
<!-- CALC -->
<div class="calc-group desktop-right mobile-bottom">
<!-- SUBTITLE - CALC -->
<h2 class="subtitle">Count</h2>
<!-- FORM - CALC -->
<div class="input-fields">
<!-- INPUT BASE -->
<div class="input-group">
<div class="label-input">
<label for="base">base</label>
<input
type="number"
id="base-input"
name="base"
value="0"
min="0"
oninput="validateInput('base-input', 'base-error');"
/>
</div>
<span id="base-error" class="error-message"></span>
</div>
<!-- INPUT HEIGHT -->
<div class="input-group">
<div class="label-input">
<label for="height">height</label>
<input
type="number"
id="height-input"
name="height"
value="0"
min="0"
oninput="validateInput('height-input', 'height-error');"
/>
</div>
<span id="height-error" class="error-message"></span>
</div>
</div>
<!-- COUNT BUTTON -->
<button class="count-button" onclick="getArea()">Count</button>
</div>
</div>
<div class="container right">
<!-- CALC RESULT -->
<p class="calc-result">
<strong
>RESULT <span id="result-number" class="number">0</span></strong
>
</p>
<!-- STEPS -->
<div class="calc-steps">
<!-- STEPS BUTTON -->
<button class="steps-button">Learn the Steps</button>
<!-- CALC PROCESS -->
<div class="calc-process">
<p>L = 1/2 × b × h</p>
<p>
L = 1/2 ×
<span id="base-number" class="number">0</span> ×
<span id="height-number" class="number">0</span>
</p>
</div>
</div>
<!-- RESET BUTTON -->
<button class="reset-button" onclick="reset()">Reset</button>
</div>
</main>
<!-- FOOTER -->
<footer>
<p class="credit">
© 2024 | <a href="https://github.com/josephines1">joDev</a>
</p>
</footer>
<!-- My JS -->
<script src="js/script.js"></script>
</body>
</html>