-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
79 lines (76 loc) · 4.28 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Book Search</title>
<!-- <link id="stylesheet"href="styleLight.css" rel="stylesheet" type="text/css"/> -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg OMhuP IlRH9sENBO0LRn5q 8nbTov4 1p" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/fontawesome.min.css" integrity="sha384-jLKHWM3JRmfMU0A5x5AkjWkw/EYfGUAGagvnfryNV3F9VqM98XiIH7VBGVoxVSc7" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/fontawesome-free/js/all.min.js"></script>
<link rel="stylesheet" type="text/css" href="./stylesheet.css">
<link rel="icon" type="image/x-icon" href="https://cdn-icons-png.flaticon.com/512/3176/3176396.png">
</head>
<body id="body" class="bg-light">
<!-- nav bar attempt -->
<nav class="navbar navbar-expand-lg navbar-light" id="navBar">
<div class="container-fluid">
<a class="navbar-brand" href="index.html">Assignment 1</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Book Search</a>
</li>
<li class="nav-item">
<a class="nav-link" href="mrca.html">MRCA</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- end navbar attempt -->
<!-- main search -->
<div id="mainContainer" class="container-lg p-3">
<div id="mainRow" class="row p-3 justify-content-center">
<div id="mainCol" class="col-sm-8 col-lg-6 col-md-8">
<div id="searchForm" class="mx-auto p-3 text-center rounded dark-white">
<h1>Book Search</h1>
<p id="infotext" style="transition: height 1s ease-in-out; opacity: 0.7">Loading data...</p>
<button id="darkModeButton" class="btn btn-primary mb-2" onclick="darkModeButtonPress('main')">Dark Mode</button><br>
<label for="searchBar" class="form-label">Search:</label>
<input type="text" name="searchBar" id="searchBar" class="mb-2 form-control">
<select name="searchType" id="searchType" class="mb-2 form-select" onchange="Program.selectSearchMode()">
<option>First Name</option>
<option>Last Name</option>
<option>Book Title</option>
<option>UID</option>
</select>
<div id="controlContainer">
<button class="btn btn-primary mb-2" onclick="if (Program) {Program.search(document.getElementById('searchBar').value)}"><i class="fas fa-search"></i></button>
</div>
</input>
</div>
<!-- adding cards once results fetched !-->
</div>
</div>
</div>
<!-- loading screen !-->
<div id="loadingCover"><p><b>LOADING...</b></p><div class='loadingSlider'></div><div class='loadingSlider' style='animation-delay: 0.2s'></div>
<script>
let target = document.getElementById('loadingCover').children[0].children[0];
let result = Array.from(target.innerHTML);
target.innerHTML = "";
for (let i = 0; i < result.length; i ) {
target.innerHTML = `<span class='loadingBounce' style='animation-delay: ${0.1 * i}s'>${result[i]}</span>`
}
</script>
<!-- end loading screen !-->
<!-- end main search -->
<script src="script.js" type='module'></script>
<script src="darkmode.js"></script>
</body>
</html>