<%- include("template/head.ejs", {tituloWeb})%>
    <link rel="stylesheet" href="/css/login.css">
    </head>

    <body class="login">
        <main class="container-fluid mainlogin">

            <div class="container-fluid">
                <div class="row justify-content-center containerFormat">
                    <form action="/login" class="rounded bg-dark p-4 text-white loginFormat align-self-center"
                        method="POST">
                        <div class="mt-2 text-center">
                            <h1 class="display-6">Iniciar Sesión</h1>
                        </div>
                        <div class="mb-3 pt-4 ps-5 pe-5">
                            <label for="username" class="form-label">Nombre de usuario</label>
                            <input type="text" class="form-control" id="username" placeholder="Tu nombre de usuario"
                                name="nombre">
                        </div>
                        <div class="mb-3 pt-4 ps-5 pe-5">
                            <label for="exampleInputPassword1" class="form-label">Contraseña</label>
                            <input type="password" class="form-control" id="exampleInputPassword1"
                                placeholder="Tu contraseña" name="password">
                        </div>
                        <div class="row justify-content-center">
                            <div class="col-12 col-sm-6 text-center">
                                <button type="submit" class="btn btn-success mt-5 buttonFormat me-sm-0 me-md-5">Iniciar
                                    Sesión</button>
                            </div>
                            <div class="col-12 col-sm-6 text-center">
                                <a class="btn btn-success mt-5 buttonFormat" href="/register">Crear Usuario</a>
                            </div>
                            <%if (error){%>
                                <p class="text-center mt-3 p-1 bg-danger">Usuario o contraseña incorrectos</p>
                                <%}%>
                        </div>
                    </form>
                </div>
            </div>
        </main>
        <%- include("template/footerfixed.ejs")%>