<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Friendo - Make new Friends!</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
    <link rel="stylesheet" href="css/index.css" />
    <link rel="stylesheet" href="https://unpkg.com/aos@next/dist/aos.css" />
</head>
<body>
    <header>
        <nav class="navbar navbar-expand-sm navbar-dark bg-dark">
            <div class="container">
                <a class="navbar-brand" href="/">Friendo</a>
                <button class="navbar-toggler" type="button" data-bs-toggle="collapse"
                    data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
                    aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>
                <div class="collapse navbar-collapse" id="navbarSupportedContent">
                    <ul class="navbar-nav mb-2 mb-lg-0">
                        <li class="nav-item">
                            <a class="nav-link active" aria-current="page" href="/">Home</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link <%= isLoggedIn == true ? "" : "disabled" %>" href="/search">Search</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link disabled" href="#">Contact</a>
                        </li>
                    </ul>
                    <ul class="navbar-nav ms-auto mb-2 mb-lg-0">
                        <li class="nav-item d-sm-none">
                            <a class="nav-link" href="/register">Sign up</a>
                        </li>
                        <li class="nav-item d-sm-none">
                            <a href="/login" class="nav-link">Login</a>
                        </li>
                        <% if(!isLoggedIn) { %>
                            <li class="nav-item dropdown d-none d-sm-block">
                                <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
                                    data-bs-toggle="dropdown" aria-expanded="false">Login</a>
                                <ul class="dropdown-menu">
                                    <li>
                                        <form class="px-3 py-3" action="/login" method="POST">
                                            <div class="mb-3 text-center">
                                                <label for="dropdownEmail" class="form-label">Email address</label>
                                                <input type="email" class="form-control rounded-pill" id="dropdownEmail"
                                                    name="email" required placeholder="email@example.com" />
                                            </div>
                                            <div class="mb-3 text-center">
                                                <label for="dropdownPassword" class="form-label">Password</label>
                                                <input type="password" class="form-control rounded-pill"
                                                    id="dropdownPassword" name="password" required placeholder="password" />
                                            </div>
                                            <div class="d-flex justify-content-center mb-3">
                                                <button type="submit" class="btn btn-primary loginPopupButton">
                                                    Log in
                                                </button>
                                            </div>
                                            <div class="text-center">
                                                <span class="mb-1 d-block text-break">Don't have an account?</span>
                                                <a class="" href="/register">You can sign up instead</a>
                                            </div>
                                        </form>
                                    </li>
                                </ul>
                            </li>
                        <% } else { %>
                            <li class="nav-item">
                                <a href="/profile/<%= userID %>" class="nav-link">My Profile</a>
                            </li>
                        <% } %>
                    </ul>
                </div>
            </div>
            <div class="alertPopup bg-danger rounded">
                <span class="textPopup"></span>
            </div>
        </nav>
    </header>
    <main>
        <div class="container">
            <div class="row">
                <div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12 d-flex
                            justify-content-center justify-content-sm-end justify-content-md-end">
                    <div class="pt-5 w-50" data-aos="fade-left">
                        <h1 class="text-center">Welcome to, <span class="d-block pt-2 text-success">Friendo<span class="text-dark">.</span></span>
                        </h1>
                        <div class="text-center mt-3">
                            <p class="text-dark text-break text-wrap">
                                Chat. Find people similar to you. <br />
                                <span class="fontClassMediumItalic">Friendo</span> is an online
                                community where people can make new
                                <span class="fontClassMediumItalic">Friendos</span>. With a wide
                                range of filters for you to find a perfect match.
                            </p>
                        </div>
                        <div class="mt-4 d-flex flex-sm-row justify-content-center flex-column">
                            <a class="centralButtons d-block d-sm-none btn btn-primary me-1 me-sm-2 mb-2 mb-sm-0" href="/login">Login</a>
                            <a class="centralButtons btn btn-primary my" href="/register">Create an account</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </main>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
    <script src="javascript/index.js"></script>
    <script src="https://unpkg.com/aos@next/dist/aos.js"></script>
    <script>
        AOS.init();
    </script>
</body>
</html>