-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstocks.html
executable file
·242 lines (206 loc) · 9.4 KB
/
stocks.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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Stock Tracker PRO</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.7.1.min.js"
integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous">
</script>
<link href="styles.css" rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="icon" type="image/png" href="favicon.png">
</head>
<body>
<nav class="navbar navbar-expand-lg bg-body-tertiary" id="main-bar">
<div class="container-fluid">
<a class="navbar-brand" href="#"></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="./index.html">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./vonbergb.html">Gunnar</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./easterj3.html">Jeremy</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./stocks.html">Stocks</a>
</li>
<li class="nav-item">
<a class="nav-link" id="historyNavButton" href="./history.html">History</a>
</li>
</ul>
<ul class="navbar-nav navbar-right">
<li class="nav-item">
<button type="button" class="btn" onclick="logout()" id ='logoutButton'>
Logout
</button>
<button type="button" id="loginNavButton" class="btn btn-outline-success" data-bs-toggle="modal"
data-bs-target="#loginModal">
Login
</button>
<button type="button" id = "signUpNavButton" class="btn" data-bs-toggle="modal" data-bs-target="#signUpModal">
Sign Up
</button>
</li>
</ul>
</div>
</div>
</nav>
<header class="bg-primary text-white text-center p-5">
<h1>Stocks</h1>
<p>Retrieve Stock Information from Different Exchanges</p>
</header>
<div class="row centered-row">
<div class="col-md-12">
<div class="container">
<!--Start select exchange dropdown-->
<div class="row centered-row">
<div class="col-md-4">
<div class="dropdown text-center mt-3">
<button class="btn btn-secondary dropdown-toggle w-100" id="exchangeDropdownButton" type="button" data-bs-toggle="dropdown" aria-expanded="false">
Select Exchange
</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item" data-value="XNYS">NYSE</a></li>
<li><a class="dropdown-item" data-value="XNAS">Nasdaq</a></li>
<li><a class="dropdown-item" data-value="LTSE">LTSE</a></li>
<li><a class="dropdown-item" data-value="IEXG">IEXG</a></li>
<li><a class="dropdown-item" data-value="MIHI">MIAX</a></li>
<li><a class="dropdown-item" data-value="MEMX">MEMX</a></li>
</ul>
</div>
</div>
<!--End select exchange dropdown-->
<div class="col-md-4">
<div class="dropdown text-center mt-3">
<button class="btn btn-secondary dropdown-toggle w-100" id="selectStockButton" type="button" data-bs-toggle="dropdown" aria-expanded="false">
Select Stock
</button>
<ul class="dropdown-menu" id ='stock-dropdown'>
</ul>
</div>
</div>
<div class="col-md-4 mt-3 d-flex justify-content-center align-items-center">
<button class="btn btn-primary w-100" id="addFavoritesButton" onclick="addStockToFavorites()" disabled>Add Stock to Favorites</button>
</div>
</div>
<!--End select stock dropdown-->
</div> <!--End container-->
</div> <!--End left column-->
<div class="col-md-6 mt-3"> <!--Start right column-->
<!--Start selected stock info card-->
<div class="card mx-3">
<div class="card-header">
1-Day Selected Stock Info
</div>
<div class="card-body">
<h5 class="card-title mb-3" id="selectedStockName">Selected Stock Name (TCKR)</h5>
<!--Top row of card-->
<div class="row centered-row">
<div class="col-md-6">
<h5 class="card-text text-info" id="selectedStockLow">Low: </h5>
</div>
<!--End low div, start high-->
<div class="col-md-6">
<h5 class="card-text text-warning" id="selectedStockHigh">High: </h5>
</div>
</div>
<!--End top row of card-->
<div class="row centered-row my-3">
<div class="col-md-6">
<h5 class="card-text" id = 'selectedStockClose'>Close: </h5>
</div>
<!--End close div, start open-->
<div class="col-md-6">
<h5 class="card-text text-secondary" id='selectedStockOpen'>Open: </h5>
</div>
</div>
<div class="row centered-row my-3">
<div class="col-md-6">
<h5 class="card-text" id='selectedStockChange'>Daily Change: </h5>
</div>
<div class="col-md-6">
<h5 class="card-text text-primary" id='selectedStockVolume'>Volume: </h5>
</div>
</div>
</div>
</div>
<!--End selected stock info card-->
</div> <!--End right column-->
<div class="col-md-6">
<canvas id="stockChart" class="mt-2"></canvas>
</div>
</div> <!--End encompassing row-->
<div class="row centered-row">
<div class="col-md-12">
<h2 class="text-center mt-3 bg-primary text-white p-3">Relevant News Articles</h2>
</div>
</div>
<!--News article cards-->
<div class="container-fluid" id="newsContainer"></div>
<!--Favorite stocks section-->
<div class="row centered-row">
<div class="col-md-12 mt-3">
<h2 class="text-center text-white bg-primary p-3">Favorite Stocks</h2>
</div>
</div> <!--End favorites row-->
<div class="row centered-row">
<div class="container-fluid" id="favoriteStockContainer"></div>
</div>
<footer class="bg-light text-center text-lg-start mt-auto py-3">
<div class="text-center p-3" style="background-color: rgba(0, 0, 0, 0.2);">
© 2024 Jeremy Easter • Gunnar Von Bergen
</div>
</footer>
<div class="modal" id="loginModal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-body">
<label for="loginUsername">Username:</label>
<input type="text" class="form-control" id ="loginUsername" name="loginUsername" placeholder="Username">
<label for="loginPassword">Password:</label>
<input type="password" class="form-control" id="loginPassword" name="loginPassword" placeholder="Password">
<div class="modal-footer">
<button type="button" id="loginButton" onclick="login()" class="btn btn-primary">Login</button>
<button type="button" id="closeLoginButton" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
<div class="modal" id="signUpModal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-body">
<label for="signUpName">Name:</label>
<input type="text" class="form-control" id="signUpName" name="signUpName" placeholder="Name">
<label for="signUpUsername">Username:</label>
<input type="text" class="form-control" id="signUpUsername" name="signUpUsername" placeholder="Username">
<label for="signUpPassword">Password:</label>
<input type="password" class="form-control" id="signUpPassword" name="signUpPassword" placeholder="Password">
<label for="signUpPassword">Confirm Password:</label>
<input type="password" class="form-control" id="signUpPasswordConfirm" name="signUpPasswordConfirm" placeholder="Confirm Password">
<div class="modal-footer">
<button type="button" id="signUpButton" onclick="signUp()" class="btn btn-primary">Sign Up</button>
<button type="button" id="closeSignUpButton" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="script.js"></script>
</body>
</html>