重构脚本:移除navbar-collapse元素
This commit is contained in:
parent
e7c458e10a
commit
17c269ee62
|
@ -29,25 +29,23 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<nav class="navbar navbar-expand navbar-light d-none d-md-flex">
|
<nav class="navbar navbar-expand navbar-light d-none d-md-flex">
|
||||||
<div class="collapse navbar-collapse" id="navMenu">
|
<div class="navbar-nav">
|
||||||
<div class="navbar-nav">
|
@foreach (var menu in Model.Navigations)
|
||||||
@foreach (var menu in Model.Navigations)
|
{
|
||||||
|
@if (menu.Menus.Count() > 0)
|
||||||
{
|
{
|
||||||
@if (menu.Menus.Count() > 0)
|
<div class="nav-item dropdown @menu.Active">
|
||||||
{
|
<a class="nav-link dropdown-toggle" data-toggle="dropdown" role="button" href="#">@menu.Name</a>
|
||||||
<div class="nav-item dropdown @menu.Active">
|
@await Html.PartialAsync("Menu", menu.Menus)
|
||||||
<a class="nav-link dropdown-toggle" data-toggle="dropdown" role="button" href="#">@menu.Name</a>
|
</div>
|
||||||
@await Html.PartialAsync("Menu", menu.Menus)
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<div class="nav-item @menu.Active">
|
|
||||||
<a class="nav-link" target="@menu.Target" href="@Url.Content(menu.Url)">@menu.Name</a>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</div>
|
else
|
||||||
|
{
|
||||||
|
<div class="nav-item @menu.Active">
|
||||||
|
<a class="nav-link" target="@menu.Target" href="@Url.Content(menu.Url)">@menu.Name</a>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<nav aria-label="breadcrumb">
|
<nav aria-label="breadcrumb">
|
||||||
|
|
Loading…
Reference in New Issue