File size: 5,038 Bytes
ad0e3b3
 
 
 
 
 
 
 
 
97872c7
 
 
 
 
 
 
 
 
ad0e3b3
 
 
 
 
 
 
 
 
 
97872c7
 
 
 
 
ad0e3b3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d7e15ca
97872c7
ad0e3b3
 
 
 
 
 
 
 
 
 
 
 
 
97872c7
 
 
 
 
 
 
 
 
 
 
 
 
ad0e3b3
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Admin Panel - {% block title %}Dashboard{% endblock %}</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">
    <style>

        body { font-size: .875rem; }

        .sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 100; padding: 48px 0 0; box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1); }

        .sidebar-sticky { position: relative; top: 0; height: calc(100vh - 48px); padding-top: .5rem; overflow-x: hidden; overflow-y: auto; }

        .nav-link { font-weight: 500; color: #333; }

        .nav-link .bi { margin-right: 4px; color: #727272; }

        .nav-link.active { color: #007bff; }

        .nav-link:hover .bi, .nav-link.active .bi { color: inherit; }

        .navbar-brand { padding-top: .75rem; padding-bottom: .75rem; font-size: 1rem; background-color: rgba(0, 0, 0, .25); box-shadow: inset -1px 0 0 rgba(0, 0, 0, .25); }

        .navbar .navbar-toggler { top: .25rem; right: 1rem; }

    </style>
</head>
<body>
    <header class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow">
        <a class="navbar-brand col-md-3 col-lg-2 me-0 px-3" href="{{ url_for('admin_dashboard') }}">Admin Panel</a>
        <button class="navbar-toggler position-absolute d-md-none collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="navbar-nav">
            <div class="nav-item text-nowrap">
                {% if admin_user %}
                <a class="nav-link px-3" href="{{ url_for('admin_logout') }}">Sign out ({{ admin_user.email }})</a>
                {% else %}
                 <a class="nav-link px-3" href="{{ url_for('admin_login_page') }}">Sign In</a>
                {% endif %}
            </div>
        </div>
    </header>

    <div class="container-fluid">
        <div class="row">
            <nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block bg-light sidebar collapse">
                <div class="position-sticky pt-3">
                    <ul class="nav flex-column">
                        <li class="nav-item">
                            <a class="nav-link {% if request.url.path == url_for('admin_dashboard') %}active{% endif %}" aria-current="page" href="{{ url_for('admin_dashboard') }}">
                                <i class="bi bi-house-door-fill"></i> Dashboard
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link {% if request.url.path == url_for('admin_files_page') %}active{% endif %}" href="{{ url_for('admin_files_page') }}">
                                <i class="bi bi-file-earmark-arrow-up-fill"></i> Uploaded Files
                            </a>
                        </li>
                        <!-- Application Logs link removed -->
                         <li class="nav-item mt-auto mb-2 border-top pt-2">
                            <a class="nav-link" href="{{ url_for('read_root') }}" target="_blank">
                                <i class="bi bi-box-arrow-up-right"></i> View Main Site
                            </a>
                        </li>
                    </ul>
                </div>
            </nav>

            <main class="col-md-9 ms-sm-auto col-lg-10 px-md-4">
                <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
                    <h1 class="h2">{% block page_title %}{% endblock %}</h1>
                </div>
                
                {% if request.query_params.get('message') %}
                <div class="alert alert-success alert-dismissible fade show" role="alert">
                    {{ request.query_params.get('message') }}
                    <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
                </div>
                {% endif %}
                {% if request.query_params.get('error') %}
                <div class="alert alert-danger alert-dismissible fade show" role="alert">
                    {{ request.query_params.get('error') }}
                    <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
                </div>
                {% endif %}

                {% block content %}{% endblock %}
            </main>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>