You are on page 1of 2

<!

DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Add a Book</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f7f7f7;
}
.add-book-container {
background-color: white;
padding: 20px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
width: 300px;
box-sizing: border-box;
}
h2 {
text-align: center;
margin-bottom: 20px;
}
form {
display: flex;
flex-direction: column;
}
input[type="text"] {
padding: 10px;
margin-bottom: 10px;
border: 1px solid #ddd;
box-sizing: border-box;
}
input[type="submit"], button.logout {
padding: 10px;
background-color: blue;
color: white;
border: none;
cursor: pointer;
}
input[type="submit"]:hover, button.logout:hover {
background-color: darkblue;
}
.logout {
background-color: red;
margin-top: 10px;
}
.back-link {
text-align: center;
margin-top: 10px;
}
a {
color: blue;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<div class="add-book-container">
<h2>Add a New Book</h2>
<form action="/add-book" method="post">
<label for="title">Title:</label>
<input type="text" id="title" name="title" required>

<label for="author">Author:</label>
<input type="text" id="author" name="author" required>

<input type="submit" value="Add Book!">


</form>
<button class="logout" onclick="location.href='/logout'">Logout</button>
<div class="back-link">
<a href="/index">Back to index</a>
</div>
</div>
</body

You might also like