<!--
This is the HTML template for the file explorer.
It displays the base directory, current path, files, and directories.
-->
<!DOCTYPE html>
<html>
<head>
    <title>File Explorer</title>
    <script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
    
    <link rel="stylesheet" href="{{ url_for('flask_file_explorer.static', filename='flask-file-explorer/css/style.css') }}">
    
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
    <link href='https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css' rel='stylesheet'>

    <!-- <script src="https://unpkg.com/dropzone@5/dist/min/dropzone.min.js"></script> -->
    <script src="https://unpkg.com/dropzone@5.9.3/dist/dropzone.js"></script>
    <link rel="stylesheet" href="https://unpkg.com/dropzone@5/dist/min/dropzone.min.css" type="text/css" />

    <script src="https://cdn.jsdelivr.net/npm/htmx.org/dist/htmx.js"></script>
</head>
<body>
    <div class="container top">
        <h1>File Explorer</h1>
        <div class="file-explorer">
            <div class="path">
                <span>Base Directory:</span>
                <span>{{ base_directory }}</span>
            </div>
            <div class="container ffe-explorer border mt-1 ps-1 pb-1">
                <div class="path mt-1 ms-0">
                    <div class="ffe_current_path border border-light" id="current_directory_name">/</div>
                </div>
                
                <div class="container listings border border-gray">
                    {% include "flask-file-explorer/listings.html" %}
                </div>
            </div>
            <div class="dropzone-container">
                <form action="{{ url_for('flask_file_explorer.upload') }}" method="post" id="ffe-upload-form" class="dropzone rounded-3" enctype="multipart/form-data">
                    <input type="hidden" name="path" id="current_active_dir" value="{{ path }}">
                </form>
            </div>
        </div>
        {% include "flask-file-explorer/modal.html" %}
    </div>    
    <script src="{{ url_for('flask_file_explorer.static', filename='flask-file-explorer/js/script.js') }}"></script>
</body>
</html>