File size: 3,847 Bytes
634ee5d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
947a5ad
34258b1
634ee5d
 
 
 
 
 
 
 
 
 
 
 
 
34258b1
634ee5d
 
 
 
 
 
 
34258b1
634ee5d
 
 
 
 
 
3e350e5
634ee5d
34258b1
 
 
3e350e5
634ee5d
34258b1
634ee5d
 
 
 
 
34258b1
634ee5d
 
 
 
34258b1
634ee5d
232c536
634ee5d
 
947a5ad
 
634ee5d
 
 
 
 
 
69ea01e
634ee5d
 
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
<!DOCTYPE html>
<html>
<head>
  <title>{{ get_setting('cafe_name', 'Bit & Bean') }} - {{ admin_view.name or 'Admin' }}</title>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  
  {% block head_css %}
    <link href="{{ url_for('admin.static', filename='bootstrap/bootstrap4/css/bootstrap.min.css') }}" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/admin_restyle.css') }}">
  {% endblock %}
</head>
<body>

<div class="admin-layout">
    <nav class="sidebar">
        <a href="{{ url_for('admin.index') }}" class="sidebar-brand">
            <img src="{{ get_setting('logo_url', url_for('static', filename='img/logo.png')) }}" alt="Logo">
            <span>{{ get_setting('cafe_name', 'Bit & Bean') }}</span>
        </a>
        <ul class="nav flex-column">
            {% for item in admin_view.admin.menu() %}
                {% if item.is_category() %}
                    <li class="nav-category">{{ item.name }}</li>
                    {% for child in item.get_children() %}
                    <li class="nav-item {{ 'active' if child.is_active(admin_view) else '' }}">
                        <a class="nav-link" href="{{ child.get_url() }}">
                            <i class="menu-icon {{ menu_icons.get(child.name, 'fa-solid fa-circle-question') }}"></i>
                            <span>{{ child.name }}</span>
                        </a>
                    </li>
                    {% endfor %}
                {% else %}
                    <li class="nav-item {{ 'active' if item.is_active(admin_view) else '' }}">
                        <a class="nav-link" href="{{ item.get_url() }}">
                            <i class="menu-icon {{ menu_icons.get(item.name, 'fa-solid fa-circle-question') }}"></i>
                            <span>{{ item.name }}</span>
                        </a>
                    </li>
                {% endif %}
            {% endfor %}
        </ul>
    </nav>

    <main class="content-wrapper">
        <div class="page-header">
            <h1 class="page-title">{{ admin_view.name }}</h1>
            <a href="/" target="_blank" class="btn btn-outline-secondary btn-sm"><i class="fas fa-external-link-alt mr-1"></i> Lihat Situs</a>
        </div>
        
        {% block messages %}
        {% with messages = get_flashed_messages(with_categories=True) %}
        {% if messages %}
            {% for category, message in messages %}
                <div class="alert alert-{{ category }} alert-dismissible fade show" role="alert">
                  {{ message }}
                  <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                </div>
            {% endfor %}
        {% endif %}
        {% endwith %}
        {% endblock messages %}
        
        <!-- Slot konten utama -->
        {% block body %}{% endblock %}
    </main>
</div>

{% block tail %}
  <script src="{{ url_for('admin.static', filename='vendor/jquery.min.js') }}"></script>
  <script src="{{ url_for('admin.static', filename='bootstrap/bootstrap4/js/bootstrap.bundle.min.js') }}"></script>
  <script src="{{ url_for('admin.static', filename='vendor/moment.min.js') }}"></script>
  <script src="{{ url_for('admin.static', filename='vendor/select2/select2.min.js') }}"></script>
{% endblock %}

</body>
</html>