-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
332 lines (278 loc) · 12.6 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
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
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
<!doctype html>
<html lang="en">
<head>
<title>Hack or Snooze</title>
<meta name="title" content="Akib Rahman">
<meta name="author" content="Akib Rahman">
<meta name="description" content="A Hacker News Clone, with Fresh Viewpoint! Using the API: https://hackorsnoozeapi.docs.apiary.io/#reference | Hosted On Github Pages">
<!-- Facebook, LinkedIn -->
<meta property="og:url" content="https://akibrhast.github.io/Hack-Or-Snooze/"/>
<meta property="og:title" content="Hack Or Snooze"/>
<meta property="og:description" content="A Hacker News Clone, with Fresh Viewpoint! Using the API: https://hackorsnoozeapi.docs.apiary.io/#reference | Hosted On Github Pages"/>
<meta property="og:site_name" content="Hack Or Snooze"/>
<meta property="og:image" content="https://raw.githubusercontent.com/akibrhast/Hack-Or-Snooze/master/uncurl.png"/>
<!-- Twitter -->
<meta property="twitter:card" content="A Hacker News Clone, with Fresh Viewpoint! Using the API: https://hackorsnoozeapi.docs.apiary.io/#reference | Hosted On Github Pages">
<meta property="twitter:url" content="https://akibrhast.github.io/Hack-Or-Snooze/">
<meta property="twitter:title" content="Hack Or Snooze">
<meta property="twitter:description" content="A Hacker News Clone, with Fresh Viewpoint! Using the API: https://hackorsnoozeapi.docs.apiary.io/#reference | Hosted On Github Pages">
<meta property="twitter:image" content="https://raw.githubusercontent.com/akibrhast/Hack-Or-Snooze/master/uncurl.png">
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Favicon -->
<link rel="icon" type="image/png" href="./uncurl.png"/>
<!-- Font Awesome CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css" integrity="sha512-+4zCK9k+qNFUR5X+cKL9EIR+ZOhtIloNl9GIKS57V1MyNsYpYcUrUeQc9vNfzsWfV28IaLL3i96P9sdNyeRssA==" crossorigin="anonymous" />
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<style>
body{
background-color: #f1f1f1;
padding-top:70px;
padding-bottom: 70px
}
.navbar{
box-shadow: 0px 5px 5px 2px #9e9e9e
}
</style>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
<a class="navbar-brand" href="#">Hack or Snooze</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup"
aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse " id="navbarNavAltMarkup">
<ul class="navbar-nav mr-auto mt-2 mt-lg-0 invisible" id="loggedinitems">
<li class="nav-item">
<a class="nav-link" href="#" id="submit-story-button">Post Story</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#" id="favourite-story-button">Favourites</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#" id="own-story-button">My Submissions</a>
</li>
</ul>
<ul class="navbar-nav">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle text-capitalize" href="#" role="button" id="navDropDown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Login Here To Submit Your Own Post
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="#" id="profile" style="display: none;">Profile</a>
<a class="dropdown-item" href="#" id="register">Register</a>
<a class="dropdown-item" href="#" id="login">Login</a>
<a class="dropdown-item" href="#" id="logout" style="display: none;">Logout</a>
</div>
</li>
</ul>
</div>
</nav>
<!-- LoginModal -->
<div class="modal" id="login-modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Login Form</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form id = "login-form">
<div class="form-group">
<input type="text"
class="form-control"
id="login-username"
placeholder="Your Username"
value="" />
</div>
<div class="form-group">
<input type="password"
class="form-control"
placeholder="Your Password"
id="login-password"
value="" />
</div>
<div class="form-group">
<input type="submit" class="btn btn-primary" value="Login" />
</div>
</form>
</div>
</div>
</div>
</div>
<!-- LoginModal End -->
<!-- RegisterModal -->
<div class="modal" id="register-modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Login Form</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form id = "register-form">
<div class="form-group">
<input type="text"
class="form-control"
id="create-account-name"
placeholder="Your Name"
value="" />
</div>
<div class="form-group">
<input type="text"
class="form-control"
id="create-account-username"
placeholder="Your Username"
value="" />
</div>
<div class="form-group">
<input type="password"
class="form-control"
placeholder="Your Password"
id="create-account-password"
value="" />
</div>
<div class="form-group">
<input type="submit" class="btn btn-primary" value="Login" />
</div>
</form>
</div>
</div>
</div>
</div>
<!-- RegisterModal End -->
<!-- Submit Story Modal -->
<div class="modal" id="submit-story-modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Submit Story</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form id = "submit-story-form">
<div class="form-group">
<input type="text"
class="form-control"
id="author"
placeholder="Author"
value="" />
</div>
<div class="form-group">
<input type="text"
class="form-control"
id="title"
placeholder="Title"
value="" />
</div>
<div class="form-group">
<input type="text"
class="form-control"
placeholder="URL"
id="url"
value="" />
</div>
<div class="form-group">
<input type="submit" class="btn btn-primary" value="Submit" />
</div>
</form>
</div>
</div>
</div>
</div>
<!-- End Submit Story Modal -->
<!-- Favourites Modal -->
<div class="modal" id="favourite-modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Favourites</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="container" id="favourite-stories-container">
</div>
</div>
</div>
</div>
</div>
<!-- End Favourites Modal -->
<!-- Own Story Modals -->
<div class="modal" id="own-story-modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Stories Submitted By You</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="container" id="own-stories-containers">
</div>
</div>
</div>
</div>
</div>
<!-- End Own Story Modals -->
<!-- Profile Modal -->
<div class="modal" id="profile-modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Profile Page</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="row" id="profile-name">
</div>
<div class="row" id="profile-username">
</div>
<div class="row" id="profile-account-date">
</div>
</div>
</div>
</div>
</div>
<!-- End Profile Modal -->
<div class="container" id="all-stories-container">
</div>
</body>
<script src="https://unpkg.com/axios/dist/axios.js"></script>
<script src="base-api-classes.js"></script>
<script src="base-ui.js"></script>
</html>
<!-- <b><a class="nav-link navbar-brand" href="#" id="nav-all">Hack or Snooze</a></b>
<section class="main-nav-links hidden">
<span>|</span>
<a class="nav-link" href="#" id="nav-submit">submit</a>
<span>|</span>
<a class="nav-link" href="#" id="nav-favorites">favorites</a>
<span>|</span>
<a class="nav-link" href="#" id="nav-my-stories">my stories</a>
</section>
<a class="nav-link nav-right" href="#" id="nav-login">login/create user</a>
<span class="nav-link nav-right hidden" id="nav-welcome">
<a href="#" id="nav-user-profile"></a>
</span>
<a class="hidden" id="nav-logout" href="#">
<small>(logout)</small>
</a> -->