<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Library</title>
    <!-- Bootstrap CSS -->
    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/js/bootstrap.bundle.min.js"></script>
    <link href="/docs/5.2/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" integrity="sha512-KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXgel0g==" crossorigin="anonymous" referrerpolicy="no-referrer" />

    <style>
        /* Additional CSS styles */
        .book-container {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-around;
            margin-top: 20px;
        }
        .book-card {
            width: 200px;
            margin-bottom: 20px;
            border: 1px solid #ccc;
            border-radius: 5px;
            padding: 10px;
        }
        /* Other styles as needed */
    </style>
</head>
<body>
    <header>
        <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo03" aria-controls="navbarTogglerDemo03" aria-expanded="false" aria-label="Toggle navigation">
              <span class="navbar-toggler-icon"></span>
            </button>
            <a class="navbar-brand" href="/admin">DigitalLibrary</a>
          
            <div class="collapse navbar-collapse" id="navbarTogglerDemo03">
              <ul class="navbar-nav mr-auto mt-2 mt-lg-0">
                <li class="nav-item">
                  <a class="nav-link" href="subscribers">Subscribers</a>
                </li>
                <li class="nav-item active">
                  <a class="nav-link" href="#">Books</a>
                </li>
              </ul>
              <ul class="navbar-nav">
                <li class="nav-item">
                    <a class="nav-link" href="/logout">Logout</a>
                </li>
            </ul>
            </div>
          </nav>
      </header>
    <!-- Navigation Bar with Logout -->

    <!-- Search Bar -->

    <div class="container mt-4">
        <h2>Edit <%= book.book_name %></h2>
        <!-- Book insertion form -->
        <form method="post" action="/modify-book/<%= book.id %>">
            <div class="form-group">
                <label for="title">Book Title:</label>
                <input type="text" class="form-control" id="title" name="bookName" value="<%= book.book_name %>" placeholder="Enter Book Title" required>
            </div>
            <div class="form-group">
                <label for="author">Author Name:</label>
                <input type="text" class="form-control" id="author" name="authorName" value="<%= book.author %>" placeholder="Enter Author Name" required>
            </div>
            <div class="form-group">
                <label for="genre">Genre Type:</label>
                <input type="text" class="form-control" id="genre" name="genre" value="<%= book.genre %>" placeholder="Enter Genre Type" required>
            </div>
            <div class="form-group">
                <label for="quantity">Available Quantity:</label>
                <input type="number" class="form-control" id="quantity" name="numAvailable" value="<%= book.num_available %>" placeholder="Enter Quantity Available" required>
            </div>
            <button type="submit" class="btn btn-warning">Edit Book</button>
        </form>
    </div>
  
  </div>
    <footer class="footer d-flex justify-content-center align-items-center mt-auto text-dark-50">
        <a
         class="btn btn-link btn-floating btn-lg text-dark m-1"
         href="#!"
         role="button"
         data-mdb-ripple-color="dark"
         ><i class="fab fa-facebook-f"></i
       ></a>
       <a
         class="btn btn-link btn-floating btn-lg text-dark m-1"
         href="#!"
         role="button"
         data-mdb-ripple-color="dark"
         ><i class="fab fa-twitter"></i
       ></a>
        <a
          class="btn btn-link btn-floating btn-lg text-dark m-1"
          href="#!"
          role="button"
          data-mdb-ripple-color="dark"
          ><i class="fab fa-instagram"></i>
        </a>
        <a
            class="btn btn-link btn-floating btn-lg text-dark m-1"
            href="https://github.com/MrBrown23/"
            role="button"
            data-mdb-ripple-color="dark"
            ><i class="fa-brands fa-github"></i>
        </a>
        <div class="mt-3">
          <p class="text-dark">Copyright &copy; 2024 <a href="/admin" class="text-dark">DigitalLibrary</a>.</p>
        </div>
      </footer>

    <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.5/dist/umd/popper.min.js"></script>
      <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/js/bootstrap.min.js"></script>
</body>
</html>
