<link rel="stylesheet" href="{{ url_for('static', filename='css/wrapper.css') }}">

<style>
    body {
        background: linear-gradient(315deg, #1E2229 10%, #242a38 70%);
        background-attachment: fixed;
    }
    
    .page-content {
        text-shadow: 1px 1px 1px black;
        color: #bbc;
    }
</style>
</head>

<body>
    <div class="page-wrapper chiller-theme toggled" style="float: left; display: inline-block;">
        <a id="show-sidebar" class="btn btn-sm btn-dark" href="#" tabindex="-1">
            <i class="fas fa-bars"></i>
        </a>

        <!-- Side Navbar -->
        <nav id="sidebar" class="sidebar-wrapper" style="float: left; display: inline-block;">
            <div class="sidebar-content">
                <div class="sidebar-brand">
                    <a href="{{ url_for('index') }}" class="inline link-home-page" tabindex="-1">Redeye</a>
                    <a href="{{ url_for('login') }}" class="inline" tabindex="-1">
                        <div class="icon" style="background-image: url(/static/pics/profiles/{{ profile }});">
                            <div id="user_name">@{{ username }}</div>
                        </div>
                    </a>
                </div>
                <!-- sidebar-header  -->
                <div class="sidebar-search">
                    <div>
                        <form id="search_form" action="{{ url_for('search') }}" method="POST">
                            <div class="input-group">
                                <input onchange="document.getElementById('search_form').submit();" type="text" name="keyword" class="form-control search-menu" id="search-box" placeholder="Search..." tabindex="-1">
                                <div class="input-group-append">
                                    <span class="input-group-text">
                                        <i class="fa fa-search" aria-hidden="true"></i>
                                    </span>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
                <!-- sidebar-search  -->
                <div class="sidebar-menu">
                    <ul>
                        <li class="header-menu">
                            <span>Gatherings</span>
                        </li>
                        <li>
                            <a href="{{ url_for('servers') }}" tabindex="-1">
                                <i class="fa fa-server"></i>
                                <span class="link-servers-page">Servers</span>
                            </a>
                        </li>
                        <li>
                            <a href="{{ url_for('all_users') }}" tabindex="-1">
                                <i class="fa fa-users"></i>
                                <span class="link-users-page">Users</span>
                            </a>
                        </li>
                        <li class="sidebar-dropdown" style="display: none;">
                            <!-- Will be added in later versions. -->
                            <a href="#" tabindex="-1">
                                <i class="fa fa-globe"></i>
                                <span>Network Devices</span>
                            </a>
                            <div class="sidebar-submenu">
                                <ul>
                                    <li>
                                        <a href="#" tabindex="-1">Mapping</a>
                                    </li>
                                    <li>
                                        <a href="#" tabindex="-1">Vulnerabilites</a>
                                    </li>
                                    <li>
                                        <a href="#" tabindex="-1">Types</a>
                                    </li>
                                </ul>
                            </div>
                        </li>

                        <li>
                            <a href="{{ url_for('load_files') }}?dir_name=files/{{ project }}/frontend" tabindex="-1">
                                <i class="fa fa-folder"></i>
                                <span class="link-files-page">Files</span>
                            </a>
                        </li>

                        <li class="header-menu">
                            <span>General</span>
                        </li>
                        <!--li>
                            <a href="{{ url_for('stats') }}" tabindex="-1">
                                <i class="fa fa-arrows-alt"></i>
                                <span class="link-stats-page">Stats</span>
                            </a>
                        </li-->
                        <li>
                            <a href="{{ url_for('attack') }}" tabindex="-1">
                                <i class="fas fa-bullseye"></i>
                                <span class="link-attacks-page">Vectors</span>
                            </a>
                        </li>
                        <li>
                            <a href="{{ url_for('exploits') }}" tabindex="-1">
                                <i class="fa fa-lock-open"></i>
                                <span class="link-exploits-page">Exploits</span>
                            </a>
                        </li>
                        <li>
                            <a href="{{ url_for('tasks') }}" tabindex="-1">
                                <i class="fa fa-check-square"></i>
                                <span class="link-tasks-page">Tasks</span>
                            </a>
                        </li>
                        <!--<li>
                            <a href="{{ url_for('notebook') }}" tabindex="-1">
                                <i class="fa fa-file"></i>
                                <span class="link-notebook-page">Notebook</span>
                            </a>
                        </li>-->
                        <li>
                            <a href="{{ url_for('logs') }}" tabindex="-1">
                                <i class="fa fa-file"></i>
                                <span class="link-logs-page">Logs</span>
                            </a>
                        </li>
                        <li>
                            <a href="{{ url_for('management') }}" tabindex="-1">
                                <i class="fa fa-users"></i>
                                <span class="link-management-page">Management</span>
                            </a>
                        </li>
                        {% if is_docker %}
                        <li>
                            <a href="{{ url_for('load_graph') }}" tabindex="-1">
                                <i class="fas fa-chart-bar"></i>
                                <span class="link-management-page">Graph</span>
                            </a>
                        </li>
                        {% endif %}
                        <li>
                            <a href="{{ url_for('api') }}" tabindex="-1">
                                <i class="fa fa-key"></i>
                                <span class="link-api-page">API</span>
                            </a>
                        </li>
                        <li class="header-menu">
                            <span>Report</span>
                        </li>
                        <li>
                            <a href="{{ url_for('pre_report') }}" tabindex="-1">
                                <i class="fa fa-image"></i>
                                <span class="link-pre_report-page">Pre Report</span>
                            </a>
                        </li>
                        <!--<li>
                            <a href="#" tabindex="-1">
                                <i class="fa fa-user-edit"></i>
                                <span>Executive Summary</span>
                            </a>
                        </li>
                        <li>
                            <a href="{{ url_for('build_report') }}" tabindex="-1">
                                <i class="fa fa-file-word"></i>
                                <span>Build Report</span>
                            </a>
                        </li>-->
                    </ul>
                </div>
                <!-- sidebar-menu  -->
                <div class="sidebar-btns">
                    <button style="display: none;" onclick="document.cookie='username=';location.href='login'" class="btn btn-primary logout" tabindex="-1">LogOut</button>
                    <form action="{{ url_for('exportAll')}}" method="GET">
                        <button type="file" class="btn btn-secondary export" tabindex="-1">Export</button>
                    </form>
                    <form enctype="multipart/form-data" action="{{ url_for('importAll')}}" method="POST" id="import-form">
                        <label class="btn btn-success import">
                            <input onchange='document.getElementById("import-form").submit()' style="display: none" type="file" id="file_upload" name="import-file">
                            <i>Import</i>
                        </label>
                    </form>
                    <a href="#" onclick="toggleKeyMap()" style="display: inline-block;" id="key-desc" class="modern-btn"><i class="fas fa-keyboard"></i></a>
                </div>
            </div>
            <!-- sidebar-menu  -->
        </nav>

        <div class="hidden-floating-box" id="keybinding-map">
            <div class="panel left-panel">
                <div class="keybindings-page">
                    <div class="page-head">Global</div>
                    <table>
                        <tr>
                            <td>First-char</td>
                            <td>Go to page from sidebar (use upper case).</td>
                        </tr>
                        <tr>
                            <td>K/H</td>
                            <td>Toggle keybindings help map.</td>
                        </tr>
                        <tr>
                            <td>R</td>
                            <td>Refresh page.</td>
                        </tr>
                        <tr>
                            <td>B</td>
                            <td>Back to last page.</td>
                        </tr>
                    </table>
                </div>
                <div class="keybindings-page">
                    <div class="page-head">Servers</div>
                    <table>
                        <tr>
                            <td>m/f</td>
                            <td>Fold all sections.</td>
                        </tr>
                        <tr>
                            <td>n</td>
                            <td>New server.</td>
                        </tr>
                        <tr>
                            <td>N</td>
                            <td>New section.</td>
                        </tr>
                        <tr>
                            <td>e</td>
                            <td>Edit servers status.</td>
                        </tr>
                        <tr>
                            <td>u</td>
                            <td>Upload scan file.</td>
                        </tr>
                    </table>
                </div>
                <div class="keybindings-page">
                    <div class="page-head">Users</div>
                    <table>
                        <tr>
                            <td>e</td>
                            <td>Export users to csv.</td>
                        </tr>
                        <tr>
                            <td>n</td>
                            <td>New username (focus username).</td>
                        </tr>
                        <tr>
                            <td>u</td>
                            <td>Upload users file.</td>
                        </tr>
                    </table>
                </div>
                <div class="keybindings-page">
                    <div class="page-head">Files</div>
                    <table>
                        <tr>
                            <td>n</td>
                            <td>New folder.</td>
                        </tr>
                        <tr>
                            <td>u</td>
                            <td>Upload files.</td>
                        </tr>
                        <tr>
                            <td>f</td>
                            <td>Find file.</td>
                        </tr>
                    </table>
                </div>
                <div class="keybindings-page">
                    <div class="page-head">Vectors</div>
                    <table>
                        <tr>
                            <td>n</td>
                            <td>Create new attack vector.</td>
                        </tr>
                        <tr>
                            <td>s</td>
                            <td>Save changes.</td>
                        </tr>
                        <tr>
                            <td>d</td>
                            <td>Delete attack.</td>
                        </tr>
                    </table>
                </div>
            </div>
            <div class="panel right-panel">
                <div class="keybindings-page">
                    <div class="page-head">Exploits</div>
                    <table>
                        <tr>
                            <td>n</td>
                            <td>New exploit.</td>
                        </tr>
                        <tr>
                            <td>u</td>
                            <td>Upload payload.</td>
                        </tr>
                        <tr>
                            <td>s</td>
                            <td>Submit new exploit.</td>
                        </tr>
                    </table>
                </div>
                <div class="keybindings-page">
                    <div class="page-head">Tasks</div>
                    <table>
                        <tr>
                            <td>n</td>
                            <td>New private task.</td>
                        </tr>
                        <tr>
                            <td>N</td>
                            <td>New team task.</td>
                        </tr>
                    </table>
                </div>
                <div class="keybindings-page">
                    <div class="page-head">Logs</div>
                    <table>
                        <tr>
                            <td>f</td>
                            <td>Find log.</td>
                        </tr>
                        <tr>
                            <td>e</td>
                            <td>Export to csv.</td>
                        </tr>
                    </table>
                </div>
                <div class="keybindings-page">
                    <div class="page-head">Management</div>
                    <table>
                        <tr>
                            <td>c/n</td>
                            <td>New user (focus username).</td>
                        </tr>
                    </table>
                </div>
                <div class="keybindings-page">
                    <div class="page-head">API</div>
                    <table>
                        <tr>
                            <td>c/n</td>
                            <td>Create New Token</td>
                        </tr>
                    </table>
                </div>
                <div class="keybindings-page">
                    <div class="page-head">Pre-report</div>
                    <table>
                        <tr>
                            <td>n</td>
                            <td>New report (focus name).</td>
                        </tr>
                        <tr>
                            <td>u</td>
                            <td>Upload image.</td>
                        </tr>
                        <tr>
                            <td>d</td>
                            <td>Description (focus description input).</td>
                        </tr>
                        <tr>
                            <td>s</td>
                            <td>Save.</td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
        <!-- /Side Navbar -->
        <div class="page-content">