{{ define "upload.html" }}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="/api/v1/style/bootstrap.min.css">
    <link rel="stylesheet" href="/api/v1/style/mdb/mdb.min.css">
</head>
<body style="background-color: rgb(56, 56, 56);">
    {{ template "navigation.html" .navigation }}
    <div class="container-fluid row">
        <div class="col"></div>
        <div class="col" style="min-width: 80vw; background-color: rgb(22, 22, 22); font-family: monospace;">
            <form hx-encoding='multipart/form-data' hx-post='/admin/images/upload'
                 _='on htmx:xhr:progress(loaded, total) set #progress.value to (loaded/total)*100'>
                    <div class="row container p-2 m-2">
                        <input type='file' name='file'>
                    </div>
                    <div class="row container p-2 m-2">
                        <textarea name="title" wrap="soft" required="required" placeholder="Name of the piece?"></textarea>
                    </div>
                    <div class="row container p-2 m-2">
                        <textarea name="description" wrap="soft" required="required" placeholder="What would you like to say about it?"></textarea>
                    </div>
                    <div class="row container p-2 m-2">
                        <button>
                           Upload
                        </button>
                        <progress id='progress' value='0' max='100'></progress>
                    </div>
            </form>
        </div>
        <div class="col"></div>
    </div>
    <script src="/api/v1/htmx/htmx.min.js"></script>
    <script src="/api/v1/htmx/json-enc.js"></script>
    <script type="text/javascript" src="/api/v1/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
    </body>
</html>

{{ end }}