-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
121 lines (103 loc) · 3.67 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.0" />
<title>Currency Converter</title>
<link rel="stylesheet" href="css/styles.css" />
<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=Alegreya:ital,wght@0,400..900;1,400..900&display=swap"
rel="stylesheet"
/>
</head>
<body>
<div id="market-status" class="status"></div>
<h1>Currency Converter App</h1>
<div id="message"></div>
<div class="forms-container">
<!-- form for adding a new exchange rate -->
<form class="form" id="add-rate-form">
<h2>Add new exchange rate</h2>
<label for="base-currency">Base Currency:</label>
<input type="text" id="base-currency" name="base-currency" required />
<label for="target-currency">Target Currency:</label>
<input
type="text"
id="target-currency"
name="target-currency"
required
/>
<label for="exchange-rate">Exchange Rate:</label>
<input
type="number"
id="exchange-rate"
name="exchange-rate"
step="0.001"
min="0"
required
/>
<button class="buttons" type="submit">Add Currency</button>
</form>
<!-- form for converting currency -->
<form class="form" id="convert-form">
<h2>Convert currency</h2>
<label for="from-currency">From Currency:</label>
<input type="text" id="from-currency" name="from-currency" required />
<label for="to-currency">To Currency:</label>
<input type="text" id="to-currency" name="to-currency" required />
<label for="amount">Amount:</label>
<input type="number" id="amount" name="amount" required />
<button class="buttons" type="submit">Convert</button>
</form>
<!-- form for updating existing exchange rate -->
<form class="form" id="update-rate-form">
<h2>Update existing exchange rate</h2>
<label for="update-base-currency">Base Currency:</label>
<input
type="text"
id="update-base-currency"
name="update-base-currency"
required
/>
<label for="update-target-currency">Target Currency:</label>
<input
type="text"
id="update-target-currency"
name="update-target-currency"
required
/>
<label for="update-exchange-rate">New Exchange Rate:</label>
<input
type="number"
id="update-exchange-rate"
name="update-exchange-rate"
step="0.001"
min="0"
required
/>
<button class="buttons" type="submit">Update Rate</button>
</form>
</div>
<!-- Form for searching a currency rate -->
<form id="search-form">
<input type="text" id="search-from" placeholder="From currency" />
<input type="text" id="search-to" placeholder="To currency" />
<button class="buttons" type="submit">Search</button>
</form>
<!-- Result of search -->
<div id="search-result"></div>
<!-- Grid for displaying currency rates -->
<div id="currency-grid"></div>
<!-- clear button -->
<button class="buttons" type="submit" id="reset-button">Clear Rates</button>
<h6>Be careful by clicking the clear button. It will clear all rates.</h6>
<br />
<hr />
<footer>
<div>All rights reserved. ©2024</div>
</footer>
<script src="js/app.js"></script>
</body>
</html>