<%# Copyright (C) 2023  Grisshink

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>. %>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Добавить контакт</title>
    <style>
        :root {
            --foreground-color: <%= color.foreground %>;
            --background-color: <%= color.background %>;
            --form-background:  <%= color.form %>;
        }
    </style>
    <link rel="stylesheet" href="/style.css">
</head>
<body>
    <% if (loggedIn) { %>
        <%- include('nav') -%> 
    <% } %>
    <div class="center">
        <% if (error) { %>
            <p class="error">Произошла ошибка создания аккаунта!</p>
        <% } %>

        <div class="restrict-content">
            <h2>Новый контакт</h2>
            <form action="/contacts/new" method="post" class="container">
                <label for="name">Имя:</label>
                <input type="text" id="name" class="inpus" name="username" required/>
                <label for="url">URL контакта:</label>
                <input type="url" name="url" id="url" class="inpus" required>
                <input type="submit" class="inpus" value="Добавить">
            </form>
        </div>
    </div>
</body>
</html>