<!-- library.html -->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Library</title>
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="css/style.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="#">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="#">Buy <span class="sr-only"></span></a>
                </li>
                <li class="nav-item">
                  <a class="nav-link" href="#">Loans</a>
                </li>
              </ul>
                <ul class="navbar-nav">
                  <li class="nav-item">
                      <a class="nav-link" href="/logout">Logout</a>
                  </li>
              </ul>
            </div>
            <!-- <div class="container mt-4">
                <form class="form-inline ml-auto">
                    <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
                    <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
                </form>
            </div> -->
          </nav>
      </header>
    <!-- Navigation Bar with Logout -->

    <!-- Search Bar -->


    <!-- Container for displaying books -->
    <div class="container mt-4">
      <div class="welcome-section">
        <h1 id="welcome-text"></h1>
        
      </div>
    </div>
    <!-- <div class="container book-container">
        <div class="book-card">
            <h5>Book Title</h5>
            <p>Author: Author Name</p>
            <p>Genre: Genre Type</p>
            <p>Available: 5</p>
           
        </div> -->
        <!-- Repeat this book card structure for each book -->
    </div>

    <!-- Bootstrap JS -->
    <script>
      const username = '<%= user.username %>';
      document.addEventListener("DOMContentLoaded", function () {
    const welcomeText = `Welcome ${username}`;
    const welcomeElement = document.getElementById('welcome-text');
  
    function typeWelcomeText() {
      let i = 0;
      let typingInterval = setInterval(function () {
        if (i <= welcomeText.length) {
          welcomeElement.innerHTML = welcomeText.slice(0, i);
          i++;
        } else {
          clearInterval(typingInterval);
          welcomeElement.style.overflow = 'visible';
          welcomeElement.style.width = 'auto';
          welcomeElement.querySelector('::after').style.display = 'none';
        }
      }, 150); 
    }
  
    typeWelcomeText();
  });
    </script>
    <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>
      <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="/" class="text-dark">DigitalLibrary</a>.</p>
        </div>
      </footer>
</body>
</html>
