Fix navbar

This commit is contained in:
itqop 2024-03-18 00:59:39 +03:00
parent ae1731593f
commit 7b18e02c7e
1 changed files with 18 additions and 7 deletions

View File

@ -58,6 +58,7 @@
</button> </button>
<div class="collapse navbar-collapse" id="target-main"> <div class="collapse navbar-collapse" id="target-main">
<ul class="navbar-nav justify-content-center w-100 icms-menu-hovered mx-lg-n2 menu-main"> <ul class="navbar-nav justify-content-center w-100 icms-menu-hovered mx-lg-n2 menu-main">
{% if page.get_children|length > 0 %}
{% for page in page.get_children %} {% for page in page.get_children %}
<li class="nav-item"> <li class="nav-item">
<a class="nav-link text-nowrap" href="{{ page.url }}" target="_self"> <a class="nav-link text-nowrap" href="{{ page.url }}" target="_self">
@ -65,6 +66,16 @@
</a> </a>
</li> </li>
{% endfor %} {% endfor %}
{% else %}
{% for page in page.get_parent.get_children %}
<li class="nav-item">
<a class="nav-link text-nowrap" href="{{ page.url }}" target="_self">
{{ page.title|safe }}
</a>
</li>
{% endfor %}
{% endif %}
</ul> </ul>
</div> </div>
</nav> </nav>