Add fontawesome icon on sidebar menu

This commit is contained in:
Dita Aji Pratama 2024-09-30 17:10:31 +07:00
parent 2bb770c937
commit 1e3f18c72c
2 changed files with 16 additions and 6 deletions

View File

@ -6,7 +6,7 @@
% 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']}
<i class="${item['icon']}"></i> ${item['name']}
</a>
</li>
% endif

View File

@ -53,19 +53,29 @@
<!-- <h5>Sidebar</h5> -->
<ul class="nav flex-column pb-5">
<li class="nav-item">
<a class="nav-link text-white" href="#">Dashboard</a>
<a class="nav-link text-white" href="#">
<i class="fa-solid fa-gauge"></i> Dashboard
</a>
</li>
<li class="nav-item">
<a class="nav-link text-white" href="#">Users</a>
<a class="nav-link text-white" href="#">
<i class="fa-solid fa-users"></i> Users
</a>
</li>
<li class="nav-item">
<a class="nav-link text-white" href="#">Items</a>
<a class="nav-link text-white" href="#">
<i class="fa-solid fa-book"></i> Items
</a>
</li>
<li class="nav-item">
<a class="nav-link text-white" href="#">Analytics</a>
<a class="nav-link text-white" href="#">
<i class="fa-solid fa-book"></i> Analytics
</a>
</li>
<li class="nav-item">
<a class="nav-link text-white" href="#">Reports</a>
<a class="nav-link text-white" href="#">
<i class="fa-solid fa-book"></i> Reports
</a>
</li>
<!-- Add more items to test scrolling -->
</ul>