-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
624 lines (544 loc) · 24.3 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
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
<!doctype html>
<html lang="en">
<head>
<meta charset = "utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<script src="https://www.gstatic.com/firebasejs/5.10.1/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/5.10.1/firebase-auth.js"></script>
<script>
//Initialize Firebase authentication
const config = {
apiKey: "AIzaSyDHnMD4FJcvRcy2NsVKRJ-FGHT_geeC2O8",
authDomain: "prog-web-app-beacc.firebaseapp.com",
databaseURL: "https://prog-web-app-beacc.firebaseio.com",
projectId: "prog-web-app-beacc",
storageBucket: "prog-web-app-beacc.appspot.com",
messagingSenderId: "40206756427"
};
firebase.initializeApp(config);
const auth = firebase.auth();
</script>
<title>WebForum</title>
</head>
<body>
<!---Collapsible Navigation Bar-->
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="#" style="color:#008080;"><strong>WebForum</strong></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-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 mr-auto">
<li class="nav-item">
<a href="#userdirectory" class="btn btn-info" data-toggle="modal" data-target="#userdirectory" role="button" id ="listusers" style=" margin-right:7px; margin-top:5px;">User Directory</a>
</li>
<li class="nav-item">
<a href="#postlibrary" class="btn btn-info" data-toggle="modal" data-target="#postlibrary" role="button" id ="listposts" style=" margin-right:7px;margin-top:5px;">Post Library</a>
</li>
<li class="nav-item">
<a href="#myposts" class="btn btn-info d-none" data-toggle="modal" data-target="#myposts" role="button" id ="mypostsbtn" style=" margin-right:7px;margin-top:5px;">My Posts</a>
</li>
<li class="nav-item">
<a href="#login" data-toggle="modal" data-target="#login" class="btn btn-info" role="button" id="loginnavbutton" style=" margin-right:7px;margin-top:5px;">Login</a>
</li>
<li class="nav-item">
<a href="#register" data-toggle="modal" data-target="#register" class="btn btn-info" role="button" id = "regnavbutton" style=" margin-right:7px;margin-top:5px;">Register</a>
</li>
<li class="nav-item">
<a href="" class="btn btn-info d-none" role="button" id ="btnLogout" style=" margin-right:7px;margin-top:5px;">Logout</a>
</li>
</ul>
</div>
</nav>
<!-- Login Modal-->
<div class="modal fade" id="login" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<!-- Header -->
<div class="modal-header">
<h4 class="modal-title">Login</h4>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<!-- Body -->
<div class="modal-body">
<p style="font-size:16px; margin-top:15px;">If you are an existing user, please login below.</p>
<form id="form_login" action=":8090">
<div class="form-group">
<input type="email" class="form-control" placeholder="Email" id="username_login" required>
</div>
<div class="form-group">
<input type="password" class="form-control" placeholder="Password" id="password_login" required>
</div>
<!--alert if failed login-->
<button id="btnLogin" type="submit" class="btn btn-info" data-dismiss="modal">Log In</button>
</form>
</div>
<!-- Footer -->
<div class="modal-footer">
<p style="font-size:16px; margin-top:12px;">Not yet registered with WebForum?</p>
<button type ="button" class="btn btn-info" data-dismiss="modal" data-toggle="modal" data-target="#register">Create an Account</button>
</div>
</div>
</div>
</div>
<!-- User Registration Modal-->
<div class="modal fade" id="register" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<!-- Header -->
<div class="modal-header">
<h4 class="modal-title">User Registration</h4>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<!-- Body -->
<div class="modal-body">
<p style="font-size:16px; margin-top:15px;">Not yet registered? To access our services, create an account with WebForum.</p>
<form id="form_register" action=":8090">
<div class="form-group">
<input type="text" class="form-control" placeholder="First Name" id="first_reg" required>
</div>
<div class="form-group">
<input type="text" class="form-control" placeholder="Last Name" id="last_reg" required>
</div>
<div class="form-group">
<input type="email" class="form-control" placeholder="Email" id="username_reg" required>
</div>
<div class="form-group">
<textarea class="form-control" rows="3" placeholder="Profile Bio" id="bio_reg" required></textarea>
</div>
<div class="form-group">
<input type="password" class="form-control" placeholder="Password" id="password_reg" required>
</div>
<div class="form-group">
<input type="password" class="form-control" placeholder="Confirm Password" id="confirmpass_reg" required>
</div>
<!--alert if registration failed-->
<button id="btnRegister" type="submit" class="btn btn-info" data-dismiss="modal" >Register</button>
</form>
</div>
<!-- Footer -->
<div class="modal-footer">
<p style="font-size:16px; margin-top:12px;">Already have a WebForum account?</p>
<button type ="button" class="btn btn-info" data-dismiss="modal" data-toggle="modal" data-target="#login">Login</button>
</div>
</div>
</div>
</div>
<!-- Create Post Modal-->
<div class="modal fade" id="createpost" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg" style="width:900px;">
<div class="modal-content">
<!-- Header -->
<div class="modal-header">
<h4 class="modal-title">Create a New Post</h4>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<!-- Body -->
<div class="modal-body">
<p style="font-size:16px; margin-top:15px;">Create a new post on WebForum.</p>
<form id="form_create_post" action="/:8090">
<div class="form-group">
<input type="text" class="form-control" placeholder="Post Title" id="post_title" required>
</div>
<div class="form-group">
<input type="date" class="form-control" placeholder="Date (yyyy-mm-dd)" id="date" required>
</div>
<div class="form-group">
<textarea class="form-control" rows="5" placeholder="Enter post content..." id="post_content" required></textarea>
</div>
<!--alert if failed login-->
<button type="submit" id="submit" class="btn btn-info">Create Post</button>
</form>
</div>
<!-- Footer -->
<div class="modal-footer">
</div>
</div>
</div>
</div>
<!-- User Directory Modal-->
<div class="modal fade" id="userdirectory" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<!-- Header -->
<div class="modal-header">
<h4 class="modal-title">User Directory</h4>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<!-- Body -->
<div class="modal-body">
<p style="font-size:16px; margin-top:15px;">Discover current WebForum users.</p>
<label for="usersearchquery" ><strong>Enter a search query:</strong></label>
<input type="text" style="border: 1px solid #008080; border-radius: 4px" id="usersearchquery" size="35"><br>
<button class="btn btn-info" id="useremailsearchbtn" style="margin-right: 5px; margin-top:7px;" onclick="searchUsersbyEmail()" data-dismiss="modal" data-toggle="modal" data-target="#searchresults_useremail">Search by Email Address</button>
<button class="btn btn-info" id="userfnamesearchbtn" style="margin-top:7px;" onclick="searchUsersbyFName()" data-dismiss="modal" data-toggle="modal" data-target="#searchresults_userfname">Search by First Name</button>
<button class="btn btn-info" id="userlnamesearchbtn" style="margin-top:7px;" onclick="searchUsersbyLName()" data-dismiss="modal" data-toggle="modal" data-target="#searchresults_userlname">Search by Last Name</button>
<div id="usercontent"></div>
</div>
<!---Perform search query by user email address-->
<script>
function searchUsersbyEmail() {
return document.getElementById('usersearchquery').value;
}
document.getElementById('useremailsearchbtn').addEventListener('click', async function(event){
url = '/users/'
queried = searchUsersbyEmail()
let response = await fetch(url+queried);
let body = await response.text();
let userlist = [JSON.parse(body)];
if (userlist[0].nonefound == "No user found with this email address.") {
$("#search_resultsuseremail").html("");
search_resultsuseremail.innerHTML += `
<br>
<p>No users found with this email address.</p>`
}
else{
$("#search_resultsuseremail").html("");
for(let i = 0; i < userlist.length; i++){
search_resultsuseremail.innerHTML += `
<br>
<div class="card bg-light" style="" data-id="${userlist[i].username}">
<div class="card-body">
<h4 style="font-size: 22px; color: #16A2B8;">${userlist[i].fname} ${userlist[i].lname}</h4>
<h6 class="card-subtitle mb-2 text-muted"> ${userlist[i].username}</h6>
<p><strong>Profile Bio:</strong> ${userlist[i].bio}</p>
</div>
</div>`
console.log('Search query sent via fetch')
}}
});
</script>
<!---Perform search query by user first name-->
<script>
function searchUsersbyFName() {
return document.getElementById('usersearchquery').value;
}
document.getElementById('userfnamesearchbtn').addEventListener('click', async function(event){
url = '/users/fname/'
queried = searchUsersbyFName()
let response = await fetch(url+queried);
let body = await response.text();
let userlist = [JSON.parse(body)];
if (userlist[0].nonefound == "No user found with this first name.") {
$("#search_resultsuserfname").html("");
search_resultsuserfname.innerHTML += `
<br>
<p>No users found with this first name.</p>`
}
else{
$("#search_resultsuserfname").html("");
for(let i = 0; i < userlist.length; i++){
search_resultsuserfname.innerHTML += `
<br>
<div class="card bg-light" style="" data-id="${userlist[i].username}">
<div class="card-body">
<h4 style="font-size: 22px; color: #16A2B8;">${userlist[i].fname} ${userlist[i].lname}</h4>
<h6 class="card-subtitle mb-2 text-muted"> ${userlist[i].username}</h6>
<p><strong>Profile Bio:</strong> ${userlist[i].bio}</p>
</div>
</div>`
console.log('Search query sent via fetch')
}}
});
</script>
<!---Perform search query by user last name-->
<script>
function searchUsersbyLName() {
return document.getElementById('usersearchquery').value;
}
document.getElementById('userlnamesearchbtn').addEventListener('click', async function(event){
url = '/users/lname/'
queried = searchUsersbyLName()
let response = await fetch(url+queried);
let body = await response.text();
let userlist = [JSON.parse(body)];
if (userlist[0].nonefound == "No user found with this last name.") {
$("#search_resultsuserlname").html("");
search_resultsuserlname.innerHTML += `
<br>
<p>No users found with this last name.</p>`
}
else{
$("#search_resultsuserlname").html("");
for(let i = 0; i < userlist.length; i++){
search_resultsuserlname.innerHTML += `
<br>
<div class="card bg-light" style="" data-id="${userlist[i].username}">
<div class="card-body">
<h4 style="font-size: 22px; color: #16A2B8;">${userlist[i].fname} ${userlist[i].lname}</h4>
<h6 class="card-subtitle mb-2 text-muted"> ${userlist[i].username}</h6>
<p><strong>Profile Bio:</strong> ${userlist[i].bio}</p>
</div>
</div>`
console.log('Search query sent via fetch')
}}
});
</script>
<!-- Footer -->
<div class="modal-footer">
<p style="font-size:16px; margin-top:12px;">Not yet registered with WebForum?</p>
<button type ="button" class="btn btn-info" data-dismiss="modal" data-toggle="modal" data-target="#register">Create an Account</button>
</div>
</div>
</div>
</div>
<!-- Search Users by Email Modal-->
<div class="modal fade" id="searchresults_useremail" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<!-- Header -->
<div class="modal-header">
<h4 class="modal-title">Search Results</h4>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<!-- Body -->
<div class="modal-body">
<p style="font-size:16px; margin-top:15px;">Searching for user queried by email address.
<div id="search_resultsuseremail"></div>
</div>
<!-- Footer -->
<div class="modal-footer">
<p style="font-size:16px; margin-top:12px;">Looking for a different user?</p>
<button type ="button" class="btn btn-info" data-dismiss="modal" data-toggle="modal" data-target="#userdirectory">Inititate New Search</button>
</div>
</div>
</div>
</div>
<!-- Search Users by First Name Modal-->
<div class="modal fade" id="searchresults_userfname" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<!-- Header -->
<div class="modal-header">
<h4 class="modal-title">Search Results</h4>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<!-- Body -->
<div class="modal-body">
<p style="font-size:16px; margin-top:15px;">Searching for user queried by first name.
<div id="search_resultsuserfname"></div>
</div>
<!-- Footer -->
<div class="modal-footer">
<p style="font-size:16px; margin-top:12px;">Looking for a different post?</p>
<button type ="button" class="btn btn-info" data-dismiss="modal" data-toggle="modal" data-target="#userdirectory">Inititate New Search</button>
</div>
</div>
</div>
</div>
<!-- Search Users by Last Name Modal-->
<div class="modal fade" id="searchresults_userlname" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<!-- Header -->
<div class="modal-header">
<h4 class="modal-title">Search Results</h4>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<!-- Body -->
<div class="modal-body">
<p style="font-size:16px; margin-top:15px;">Searching for users queried by last name.
<div id="search_resultsuserlname"></div>
</div>
<!-- Footer -->
<div class="modal-footer">
<p style="font-size:16px; margin-top:12px;">Looking for a different post?</p>
<button type ="button" class="btn btn-info" data-dismiss="modal" data-toggle="modal" data-target="#userdirectory">Inititate New Search</button>
</div>
</div>
</div>
</div>
<!-- Post Library Modal-->
<div class="modal fade" id="postlibrary" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg" style="width:900px;">
<div class="modal-content">
<!-- Header -->
<div class="modal-header">
<h4 class="modal-title">Post Library</h4>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<!-- Body -->
<div class="modal-body">
<p style="font-size:16px; margin-top:15px;">View all and search for WebForum posts. </p>
<label for="postsearchquery"><strong>Enter a search query:</strong></label>
<input type="text" id="postsearchquery" size="35"><br>
<button class="btn btn-info" id="postnamesearchbtn" style="margin-right: 5px; margin-top:7px;" onclick="searchPostsbyName()" data-dismiss="modal" data-toggle="modal" data-target="#searchresults_posttitle">Search by Post Name</button>
<button class="btn btn-info" id="postauthorsearchbtn" style="margin-top:7px;" onclick="searchPostsbyAuthor()" data-dismiss="modal" data-toggle="modal" data-target="#searchresults_postauthor">Search by Post Author (email address)</button>
<div id="postlistcontent"></div>
</div>
<!---Perform search query by post title-->
<script>
function searchPostsbyName() {
return document.getElementById('postsearchquery').value;
}
document.getElementById('postnamesearchbtn').addEventListener('click', async function(event){
url = '/posts/'
queried = searchPostsbyName()
let response = await fetch(url+queried);
let body = await response.text();
let postlist = [JSON.parse(body)];
if (postlist[0].nonefound == "No post found with this title.") {
$("#search_resultsposttitle").html("");
search_resultsposttitle.innerHTML += `
<br>
<p>No posts found with this title.</p>`
}
else{
$("#search_resultsposttitle").html("");
for(let i = 0; i < postlist.length; i++){
search_resultsposttitle.innerHTML += `
<br>
<div class="card bg-light" style="" data-id="${postlist[i].posttitle}">
<div class="card-body">
<h4 style="font-size: 22px; color: #16A2B8;">${postlist[i].posttitle}</h4>
<h6 class="card-subtitle mb-2 text-muted"> Written by: ${postlist[i].postauthor}</h6>
<h6 class="card-subtitle mb-2 text-muted"><strong> ${postlist[i].postdate}</strong></h6>
<p>${postlist[i].postcontent}</p>
</div>
</div>`
console.log('Search query sent via fetch')
}}
});
</script>
<!---Perform search query by post author (email address)-->
<script>
function searchPostsbyAuthor() {
return document.getElementById('postsearchquery').value;
}
document.getElementById('postauthorsearchbtn').addEventListener('click', async function(event){
url = '/posts/author/'
queried = searchPostsbyAuthor()
let response = await fetch(url+queried);
console.log(response)
let body = await response.text();
console.log(body)
let postlist = [JSON.parse(body)];
console.log(postlist, postlist)
if (postlist[0].nonefound == "No post found with this author.") {
$("#search_resultspostauthor").html("");
search_resultspostauthor.innerHTML += `
<br>
<p>No posts found with this author.</p>`
}
else{$("#search_resultspostauthor").html("");
for(let i = 0; i < postlist.length; i++){
search_resultspostauthor.innerHTML += `
<br>
<div class="card bg-light" style="" data-id="${postlist[i].posttitle}">
<div class="card-body">
<h4 style="font-size: 22px; color: #16A2B8;">${postlist[i].posttitle}</h4>
<h6 class="card-subtitle mb-2 text-muted"> Written by: ${postlist[i].postauthor}</h6>
<h6 class="card-subtitle mb-2 text-muted"><strong> ${postlist[i].postdate}</strong></h6>
<p>${postlist[i].postcontent}</p>
</div>
</div>`
console.log('Search query sent via fetch')
}}
});
</script>
<!-- Footer -->
<div class="modal-footer">
<p style="font-size:16px; margin-top:12px;">Want to create a new post?</p>
<button type ="button" class="btn btn-info" data-dismiss="modal" data-toggle="modal" data-target="#createpost">Create New Post</button>
</div>
</div>
</div>
</div>
<!-- Search Posts by Title Modal-->
<div class="modal fade" id="searchresults_posttitle" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<!-- Header -->
<div class="modal-header">
<h4 class="modal-title">Search Results</h4>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<!-- Body -->
<div class="modal-body">
<p style="font-size:16px; margin-top:15px;">Searching for posts queried by post title.
<div id="search_resultsposttitle"></div>
</div>
<!-- Footer -->
<div class="modal-footer">
<p style="font-size:16px; margin-top:12px;">Looking for a different post?</p>
<button type ="button" class="btn btn-info" data-dismiss="modal" data-toggle="modal" data-target="#postlibrary">Inititate New Search</button>
</div>
</div>
</div>
</div>
<!-- Search Posts by Author Modal-->
<div class="modal fade" id="searchresults_postauthor" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<!-- Header -->
<div class="modal-header">
<h4 class="modal-title">Search Results</h4>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<!-- Body -->
<div class="modal-body">
<p style="font-size:16px; margin-top:15px;">Searching for posts queried by post author's email address.
<div id="search_resultspostauthor"></div>
</div>
<!-- Footer -->
<div class="modal-footer">
<p style="font-size:16px; margin-top:12px;">Looking for a different post?</p>
<button type ="button" class="btn btn-info" data-dismiss="modal" data-toggle="modal" data-target="#postlibrary">Inititate New Search</button>
</div>
</div>
</div>
</div>
<!--My Posts Modal-->
<div class="modal fade" id="myposts" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg" style="width:900px;">
<div class="modal-content">
<!-- Header -->
<div class="modal-header">
<h4 class="modal-title">My Posts</h4>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<!-- Body -->
<div class="modal-body">
<p style="font-size:16px; margin-top:15px;">View and manage your WebForum posts.</p>
<div id="mypostslistcontent"></div>
</div>
<!-- Footer -->
<div class="modal-footer">
<p style="font-size:16px; margin-top:12px;">Want to create a new post?</p>
<button type ="button" class="btn btn-info" data-dismiss="modal" data-toggle="modal" data-target="#createpost">Create New Post</button>
</div>
</div>
</div>
</div>
<section id="frontend">
<div class= "jumbotron text-center">
<h1>Welcome to WebForum!</h1>
<br>
<p>WebForum is an internet forum service; upon registering and logging in, users can publish forum posts to the service. Additionally, web visitors who are not logged in can search for current users and posts in the user directory and post library, respectively.</p>
</div>
</section>
<section id="posts" class="container" style="margin-top: 40px;">
<h2>Post Feed</h2>
<p>View the latest posts on WebForum by refreshing the post feed.</p>
<div class="col-sm-12 float-left ">
<div class="btn-group">
<div class="refreshpostfeed">
<button id="postfeed" class="btn btn-info lg" style="margin-left:-20px;">Refresh Post Feed</button>
</div>
<div class="createnewpost">
<button id="createnewpostmodal" class="btn btn-info lg d-none" data-toggle="modal" data-target="#createpost" style="margin-left:20px;">Create New Post</button>
</div>
</div>
<div class="overflow">
<div id="listallpostcontent">
</div>
</div>
</div>
</section>
<script src="index.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
</body>
</html>