-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
156 lines (141 loc) · 6.64 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="index.css" />
<!-- Font Awesome -->
<script src="https://kit.fontawesome.com/0f7ca667d7.js" crossorigin="anonymous"></script>
<!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Montserrat+Alternates:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap"
rel="stylesheet" />
<title>Book Library</title>
</head>
<body>
<!-- Nav -->
<nav>
<div class="nav-title">
<ion-icon name="library-outline" class="books-icon" id="books-icon"></ion-icon>
<h1><em>Book</em> Library App</h1>
</div>
</nav>
<!-- Book List -->
<section class="books-section">
<div class="btn-container">
<h2>Book List</h2>
<button class="add-new-book-btn" id="addBookBtn">
<i class="fas fa-book"></i> Add new book
</button>
</div>
<table class="book-table" id="bookTable">
<tr class="headings">
<th>Title</th>
<th>Author</th>
<th>Pages</th>
<th>Status</th>
<th>Rating</th>
<th>Action</th>
</tr>
</table>
</section>
<!-- MODAL: Add new book -->
<div class="n-b-modal-container hideModal" id="modalContainer">
<div class="add-new-book">
<div class="top-of-container">
<h2><em id="changeToEdit">Add</em> book</h2>
<ion-icon name="close-circle-outline" class="close-modal" id="closeModal"></ion-icon>
</div>
<form action="#" method="">
<fieldset>
<label for="author">Author*:</label>
<input type="text" id="author" name="author" required minlength="1" maxlength="40"
class="input-text " />
<p class="validation-issue hide-issue" id="validationAuthor">Author is a required input!</p>
</fieldset>
<fieldset>
<label for="title">Title*:</label>
<input type="text" name="title" id="title" class="input-text" minlength="1" maxlength="55" />
<p class="validation-issue hide-issue" id="validationTitle">Title is a required input!</p>
</fieldset>
<fieldset>
<label for="pages">Number of pages:</label>
<input type="NUMBER" name="Pages" id="pages" maxlength="4" class="input-text" />
<p class="validation-issue hide-issue" id="validationPages">Maximum of 5 numbers allowed!</p>
</fieldset>
<fieldset class="try-this">
<label for="status">Status*:</label>
<select name="status" id="status" class="status-choice">
<option value="Read" selected>Read</option>
<option value="Reading">Reading</option>
<option value="Unread">Unread</option>
<option value="Wishlist">Wishlist</option>
</select>
</fieldset>
<fieldset class="star-rating-container">
<label for="rating">Rating:</label>
<input type="hidden" id="rating" name="rating" value="" />
<div class="the-stars">
<div data-rating="1" class="theStars">
<ion-icon class="starIcon" name="star-outline"></ion-icon>
</div>
<div data-rating="2" class="theStars">
<ion-icon class="starIcon" name="star-outline"></ion-icon>
</div>
<div data-rating="3" class="theStars">
<ion-icon class="starIcon" name="star-outline"></ion-icon>
</div>
<div data-rating="4" class="theStars">
<ion-icon class="starIcon" name="star-outline"></ion-icon>
</div>
<div data-rating="5" class="theStars">
<ion-icon class="starIcon" name="star-outline"></ion-icon>
</div>
</div>
</fieldset>
<fieldset>
<textarea name="Comments" class="user-comment" id="comments" cols="30" rows="10"
placeholder="Comments" maxlength="500"></textarea>
</fieldset>
<fieldset class="btn-containers-in-modal">
<button type="button" class="form-btn btn-save" id="saveBookBtn">
Save book
</button>
<button type="button" class="form-btn btn-save btn-edit" id="editBookBtn">
Edit book
</button>
<button type="reset" class="form-btn btn-reset" id="resetBtn">
Reset input
</button>
</fieldset>
</form>
</div>
</div>
<!-- MODAL: delete book -->
<div class="n-b-modal-container hideModal" id="deleteModalContainer">
<div class="modal-delete-book">
<ion-icon name="close-circle-outline" class="close-modal" id="closeDeleteModal"></ion-icon>
<h3>Are you sure you would like to delete this book?</h3>
<div class="btn-container-modal-delete-book">
<button class="form-btn delete-btn" id="deleteBtn">
Delete book
</button>
<button class="form-btn keep-btn" id="keepBookBtn">Keep book</button>
</div>
</div>
</div>
<footer>
<p>2022</p>
<p>by</p>
<a href="https://github.com/bgtti/">
<ion-icon name="logo-github"></ion-icon>
</a>
</footer>
<script type="module" src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"></script>
<script src="index.js"></script>
</body>
</html>