Update templates/admin/custom_master.html
Browse files
templates/admin/custom_master.html
CHANGED
|
@@ -7,29 +7,23 @@
|
|
| 7 |
<meta name="viewport" content="width=device-width, initial-scale=1">
|
| 8 |
|
| 9 |
{% block head_css %}
|
| 10 |
-
<!-- Memuat CSS Bootstrap & Font Awesome bawaan Flask-Admin -->
|
| 11 |
<link href="{{ url_for('admin.static', filename='bootstrap/bootstrap4/css/bootstrap.min.css') }}" rel="stylesheet">
|
| 12 |
-
<!-- Font Awesome untuk ikon-ikon baru yang lebih modern -->
|
| 13 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 14 |
-
<!-- Memuat Font Google (Poppins) -->
|
| 15 |
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 16 |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 17 |
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
| 18 |
-
<!-- Memuat CSS kustom kita untuk desain ulang panel admin -->
|
| 19 |
<link rel="stylesheet" href="{{ url_for('static', filename='css/admin_restyle.css') }}">
|
| 20 |
{% endblock %}
|
| 21 |
</head>
|
| 22 |
<body>
|
| 23 |
|
| 24 |
<div class="d-flex admin-layout">
|
| 25 |
-
<!-- Sidebar Navigasi -->
|
| 26 |
<nav class="sidebar">
|
| 27 |
<a href="{{ url_for('admin.index') }}" class="sidebar-brand">
|
| 28 |
<img src="{{ get_setting('logo_url', url_for('static', filename='img/logo.png')) }}" alt="Logo">
|
| 29 |
<span>{{ get_setting('cafe_name', 'Bit & Bean') }}</span>
|
| 30 |
</a>
|
| 31 |
<ul class="nav flex-column">
|
| 32 |
-
<!-- Iterasi menu dan kategori secara dinamis -->
|
| 33 |
{% for item in admin_view.admin.menu() %}
|
| 34 |
{% if item.is_category() %}
|
| 35 |
<li class="nav-category">{{ item.name }}</li>
|
|
@@ -53,7 +47,6 @@
|
|
| 53 |
</ul>
|
| 54 |
</nav>
|
| 55 |
|
| 56 |
-
<!-- Konten Utama -->
|
| 57 |
<main class="content-wrapper">
|
| 58 |
<div class="d-flex justify-content-between align-items-center mb-4">
|
| 59 |
<h1 class="h3 mb-0 font-weight-bold">{{ admin_view.name }}</h1>
|
|
@@ -64,7 +57,6 @@
|
|
| 64 |
</div>
|
| 65 |
</div>
|
| 66 |
|
| 67 |
-
<!-- Area untuk menampilkan pesan flash (misal: "Produk berhasil disimpan") -->
|
| 68 |
{% with messages = get_flashed_messages(with_categories=True) %}
|
| 69 |
{% if messages %}
|
| 70 |
{% for category, message in messages %}
|
|
@@ -78,12 +70,11 @@
|
|
| 78 |
{% endif %}
|
| 79 |
{% endwith %}
|
| 80 |
|
| 81 |
-
<!--
|
| 82 |
{% block body %}{% endblock %}
|
| 83 |
</main>
|
| 84 |
</div>
|
| 85 |
|
| 86 |
-
<!-- Memuat file-file JavaScript yang diperlukan -->
|
| 87 |
{% block tail %}
|
| 88 |
<script src="{{ url_for('admin.static', filename='vendor/jquery.min.js') }}"></script>
|
| 89 |
<script src="{{ url_for('admin.static', filename='bootstrap/bootstrap4/js/bootstrap.bundle.min.js') }}"></script>
|
|
|
|
| 7 |
<meta name="viewport" content="width=device-width, initial-scale=1">
|
| 8 |
|
| 9 |
{% block head_css %}
|
|
|
|
| 10 |
<link href="{{ url_for('admin.static', filename='bootstrap/bootstrap4/css/bootstrap.min.css') }}" rel="stylesheet">
|
|
|
|
| 11 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
|
|
|
| 12 |
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 13 |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 14 |
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
|
|
|
| 15 |
<link rel="stylesheet" href="{{ url_for('static', filename='css/admin_restyle.css') }}">
|
| 16 |
{% endblock %}
|
| 17 |
</head>
|
| 18 |
<body>
|
| 19 |
|
| 20 |
<div class="d-flex admin-layout">
|
|
|
|
| 21 |
<nav class="sidebar">
|
| 22 |
<a href="{{ url_for('admin.index') }}" class="sidebar-brand">
|
| 23 |
<img src="{{ get_setting('logo_url', url_for('static', filename='img/logo.png')) }}" alt="Logo">
|
| 24 |
<span>{{ get_setting('cafe_name', 'Bit & Bean') }}</span>
|
| 25 |
</a>
|
| 26 |
<ul class="nav flex-column">
|
|
|
|
| 27 |
{% for item in admin_view.admin.menu() %}
|
| 28 |
{% if item.is_category() %}
|
| 29 |
<li class="nav-category">{{ item.name }}</li>
|
|
|
|
| 47 |
</ul>
|
| 48 |
</nav>
|
| 49 |
|
|
|
|
| 50 |
<main class="content-wrapper">
|
| 51 |
<div class="d-flex justify-content-between align-items-center mb-4">
|
| 52 |
<h1 class="h3 mb-0 font-weight-bold">{{ admin_view.name }}</h1>
|
|
|
|
| 57 |
</div>
|
| 58 |
</div>
|
| 59 |
|
|
|
|
| 60 |
{% with messages = get_flashed_messages(with_categories=True) %}
|
| 61 |
{% if messages %}
|
| 62 |
{% for category, message in messages %}
|
|
|
|
| 70 |
{% endif %}
|
| 71 |
{% endwith %}
|
| 72 |
|
| 73 |
+
<!-- Slot konten utama -->
|
| 74 |
{% block body %}{% endblock %}
|
| 75 |
</main>
|
| 76 |
</div>
|
| 77 |
|
|
|
|
| 78 |
{% block tail %}
|
| 79 |
<script src="{{ url_for('admin.static', filename='vendor/jquery.min.js') }}"></script>
|
| 80 |
<script src="{{ url_for('admin.static', filename='bootstrap/bootstrap4/js/bootstrap.bundle.min.js') }}"></script>
|