-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
139 lines (138 loc) · 4.48 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Library - Odin Project</title>
<link rel="shortcut icon" href="./favicon.svg" type="image/x-icon" />
<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=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet"
/>
<link rel="stylesheet" href="./css/main.css" />
</head>
<body>
<dialog id="favDialog">
<h3>Add a New Book</h3>
<form novalidate id="bookForm" method="dialog">
<section>
<p>
<label for="title">Book Title: <abbr title="This filed is required!" aria-required="true"> *</abbr></label>
<input
type="text"
id="title"
placeholder="Book Title"
required
minlength="3"
maxlength="30"
/>
</p>
<span class="title-error" aria-live="polite"></span>
</section>
<section>
<p>
<label for="author">Author: <abbr title="This filed is required!" aria-required="true"> *</abbr></label>
<input
type="text"
id="author"
placeholder="Author"
required
minlength="3"
maxlength="30"
/>
</p>
<span class="author-error" aria-live="polite"></span>
</section>
<section>
<p>
<label for="isbn-Num">ISBN: <abbr title="This filed is required!" aria-required="true"> *</abbr></label>
<input
type="text"
id="isbn-Num"
required
minlength="10"
placeholder="ISBN in 10 or 13 format"
pattern="^(?:\d{9}[\dX]|(?:\d{1,5}-){1,4}\d{1,5}-[\dX]|\d{13}|\d{1,5}-\d{1,7}-\d{1,6}-[\dX])$"
/>
</p>
<span class="isbn-error" aria-live="polite"></span>
</section>
<section>
<p>
<label for="avatar">Choose a book cover:</label>
<input
type="file"
id="avatar"
name="avatar"
accept="image/png, image/jpeg"
value="./images/book-closed-svgrepo-com.svg"
/>
</p>
</section>
<section>
<p>
<label for="pagesNum">Pages Nº: <abbr title="This filed is required!" aria-required="true"> *</abbr></label>
<input
type="number"
min="30"
max="9999"
id="pagesNum"
placeholder="2124"
pattern="^(3[0-9]|[4-9][0-9]{1,2}|[1-9][0-9]{2,3}|9999)$"
required
/>
</p>
<span class="pagesNum-error" aria-live="polite"></span>
</section>
<section>
<p>
<label for="alreadyRead">Already Read:</label>
<select name="alreadyRead" id="alreadyRead">
<option value="true">true</option>
<option value="false">false</option>
</select>
</p>
</section>
<menu>
<button id="addBookBtn" type="submit">Add Book</button>
<button id="cancel" type="reset">Cancel</button>
</menu>
</form>
</dialog>
<div class="container">
<header class="header">
<img
class="closed-book-logo"
src="./images/book-closed-svgrepo-com.svg"
alt="closed book logo"
/>
<i translate="no" class="material-icons add">add_circle</i>
<h1 class="title">Library</h1>
</header>
<div id="content" class="content">
</div>
<footer class="footer">
<a
href="https://github.com/carlosfrontend"
target="_blank"
class="link"
rel="noreferrer"
><img
class="gh-logo"
src="./images/github-round-svgrepo-com.svg"
alt="github logo"
/><span
>CarlosFrontend <sup><span class="copy">©</span></sup></span
></a
>
</footer>
</div>
<script src="./js/main.js"></script>
</body>
</html>