-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhome.html
More file actions
102 lines (90 loc) · 2.65 KB
/
home.html
File metadata and controls
102 lines (90 loc) · 2.65 KB
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
<html>
<head>
<title>Book Manager App</title>
<style>
/* Reset some basic styles */
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: #f5f6fa;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
align-items: center;
}
h1 {
color: #2f3640;
margin-top: 30px;
margin-bottom: 20px;
}
form {
margin-bottom: 20px;
display: flex;
gap: 10px;
}
input[type="text"] {
padding: 8px 12px;
border: 1px solid #dcdde1;
border-radius: 5px;
width: 200px;
transition: 0.3s;
}
input[type="text"]:focus {
border-color: #718093;
outline: none;
}
input[type="submit"] {
background-color: #273c75;
color: white;
border: none;
padding: 8px 15px;
border-radius: 5px;
cursor: pointer;
transition: 0.3s;
}
input[type="submit"]:hover {
background-color: #40739e;
}
.book-container {
background-color: white;
width: 350px;
padding: 15px 20px;
margin-bottom: 15px;
border-radius: 10px;
box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}
.book-title {
font-weight: bold;
margin-bottom: 10px;
color: #2f3640;
}
.update-form, .delete-form {
display: flex;
gap: 5px;
margin-bottom: 5px;
}
</style>
</head>
<body>
<h1>Add Book</h1>
<form method="POST" action="/">
<input type="text" name="title" placeholder="Book Title">
<input type='submit' value="Add">
</form>
<h1>Books</h1>
{% for book in books %}
<div class="book-container">
<p class="book-title">{{book.title}}</p>
<form class="update-form" method="POST" action="./update">
<input type="hidden" value="{{book.title}}" name="oldtitle">
<input type="text" value="{{book.title}}" name="newtitle">
<input type="submit" value="Update">
</form>
<form class="delete-form" method="POST" action="./delete">
<input type="hidden" value="{{book.title}}" name="title">
<input type="submit" value="Delete">
</form>
</div>
{% endfor %}
</body>
</html>