CostaCoffe/templates/basic_bootstrap/html/topnav.html
2023-11-04 19:12:11 +07:00

18 lines
803 B
HTML

<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
<a class="navbar-brand" href="/">${GV_title}</a>
<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>
</nav>