Update html code
This commit is contained in:
parent
8a4fe1dfbb
commit
f9634f92aa
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Prime</title>
|
||||
<title>${title}</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
|
@ -1,31 +1,41 @@
|
||||
<!-- Navbar -->
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="#">Prime Dashboard</a>
|
||||
<a class="navbar-brand" href="#">${title}</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav ms-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#">Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#">Customize</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#">Notification <sup class="badge bg-danger">1</sup> </a>
|
||||
</li>
|
||||
% for item in menu:
|
||||
% if any(role in item['roles'] for role in user_roles):
|
||||
<li class="nav-item">
|
||||
<a class="nav-link ${'active' if item['name'] == active_page else ''}" href="${item['href']}" target="${item['target']}">
|
||||
% if item['notification'] > 0:
|
||||
${item['name']} <sup class="badge bg-danger">${item['notification']}</sup>
|
||||
% else:
|
||||
${item['name']}
|
||||
% endif
|
||||
</a>
|
||||
</li>
|
||||
% endif
|
||||
% endfor
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle d-flex align-items-center" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<img src="no-profile-donut.png" alt="Profile" class="profile-image me-2">
|
||||
Dita Aji Pratama
|
||||
<img src="${profile['picture']}" alt="Profile" class="profile-image me-2">
|
||||
${profile['name']}
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdown">
|
||||
<li><a class="dropdown-item" href="#">Profile</a></li>
|
||||
<li><a class="dropdown-item" href="#">Settings</a></li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li><a class="dropdown-item" href="#">Logout</a></li>
|
||||
% for item in profile['menu']:
|
||||
% if any(role in item['roles'] for role in user_roles):
|
||||
<li>
|
||||
<a class="dropdown-item ${'active' if item['name'] == active_page else ''}" href="${item['href']}" target="${item['target']}">
|
||||
${item['name']}
|
||||
</a>
|
||||
</li>
|
||||
% endif
|
||||
% endfor
|
||||
<!-- <li><hr class="dropdown-divider"></li> -->
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -2,21 +2,15 @@
|
||||
<div class="sidebar p-3" id="sidebar">
|
||||
<!-- <h5>Sidebar</h5> -->
|
||||
<ul class="nav flex-column pb-5">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-white" href="#">Dashboard</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-white" href="#">Users</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-white" href="#">Items</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-white" href="#">Analytics</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-white" href="#">Reports</a>
|
||||
</li>
|
||||
% for item in menu:
|
||||
% if any(role in item['roles'] for role in user_roles):
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-white ${'active' if item['name'] == active_page else ''}" href="${item['href']}" target="${item['target']}">
|
||||
${item['name']}
|
||||
</a>
|
||||
</li>
|
||||
% endif
|
||||
% endfor
|
||||
<!-- Add more items to test scrolling -->
|
||||
</ul>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user