-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
154 lines (142 loc) · 5.43 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Book Library</title>
<link rel="icon" type="image/ico" href="images/fav.ico"/>
<script src="scripts/jquery-3.1.1.min.js"></script>
<script src="scripts/displayElements.js"></script>
<script src="scripts/crudOperations.js"></script>
<script src="scripts/attachEvents.js"></script>
<script src="scripts/app.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twbs-pagination/1.4.1/jquery.twbsPagination.js"></script>
<link rel="stylesheet" type="text/css" href="styles/pagination.css"/>
<link rel="stylesheet" type="text/css" href="styles/book-library.css"/>
</head>
<body onload="startApp()">
<header id="menu">
<a href="#" id="linkHome">Home</a>
<a href="#" id="linkLogin">Login</a>
<a href="#" id="linkRegister">Register</a>
<a href="#" id="linkListBooks">List Books</a>
<a href="#" id="linkCreateBook">Create Book</a>
<a href="#" id="linkLogout">Logout</a>
<span id="loggedInUser"></span>
</header>
<main>
<section id="loadingBox" class="notification">Loading ...</section>
<section id="infoBox" class="notification">Info</section>
<section id="errorBox" class="notification">Error</section>
<section id="viewHome">
<h1>Welcome</h1>
<div class="content">
<p>Welcome to our book library.</p>
</div>
<div class="homeImage">
<img src="images/library.jpeg">
</div>
</section>
<section id="viewLogin">
<h1>Please login</h1>
<div class="content">
<form id="formLogin">
<div>Username:</div>
<div><input type="text" name="username" required/></div>
<div>Password:</div>
<div><input type="password" name="passwd" required/></div>
<div><input type="submit" value="Login"/></div>
</form>
</div>
</section>
<section id="viewRegister">
<h1>Please register here</h1>
<div class="content">
<form id="formRegister">
<div>Username:</div>
<div><input type="text" name="username" required/></div>
<div>Password:</div>
<div><input type="password" name="passwd" required/></div>
<div><input type="submit" value="Register"/></div>
</form>
</div>
</section>
<section id="viewBooks">
<h1>Books
<span class="sorting">Sort by
<select>
<option>Date Modified</option>
<option>Date Created</option>
<option>Title (A-Z)</option>
<option>Author (A-Z)</option>
</select></span></h1>
<div class="content">
<div id="books">
<table>
<tr>
<th>Title</th>
<th>Author</th>
<th>Description</th>
<th>Actions</th>
</tr>
<tr>
<td>Book title</td>
<td>Book author</td>
<td>Book description</td>
<td>
<a href="#">[Delete]</a>
<a href="#">[Edit]</a>
</td>
</tr>
<tr>
<td>Book title</td>
<td>Book author</td>
<td>Book description</td>
<td>
<a href="#">[Delete]</a>
<a href="#">[Edit]</a>
</td>
</tr>
</table>
</div>
</div>
<div class="wrapper">
<div class="col-sm-12">
<ul id="pagination-demo" class="pagination"></ul>
</div>
</div>
</section>
<section id="viewCreateBook">
<h1>Create new book</h1>
<div class="content">
<form id="formCreateBook">
<div>Title:</div>
<div><input type="text" name="title" required/></div>
<div>Author:</div>
<div><input type="text" name="author" required/></div>
<div>Description:</div>
<div><textarea name="description" rows="10" required></textarea></div>
<div><input type="submit" value="Create"/></div>
</form>
</div>
</section>
<section id="viewEditBook">
<h1>Edit existing book</h1>
<div class="content">
<form id="formEditBook">
<div><input type="hidden" name="id" required/></div>
<div>Title:</div>
<div><input type="text" name="title" required/></div>
<div>Author:</div>
<div><input type="text" name="author" required/></div>
<div>Description:</div>
<div><textarea name="description" rows="10" required></textarea></div>
<div><input type="submit" value="Edit"/></div>
</form>
</div>
</section>
</main>
<footer>Book Library - Simple SPA Application © 2018</footer>
</body>
</html>