costapy/templates/bare/html/topnav.html

18 lines
809 B
HTML
Raw Permalink Normal View History

2022-03-16 11:06:52 +07:00
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
2024-01-13 12:01:14 +07:00
<a class="navbar-brand" href="${baseurl}">${title}</a>
2023-10-24 20:37:32 +07:00
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ml-auto">
% for item in menu:
% if any(role in item['roles'] for role in user_roles):
<li class="nav-item ${'active' if item['name'] == active_page else ''}">
<a class="nav-link" href="${item['href']}">${item['name']}</a>
</li>
% endif
% endfor
</ul>
</div>
2022-03-16 11:06:52 +07:00
</nav>