修改BUG:更新面包屑导航条

This commit is contained in:
Argo-MacBookPro 2018-08-06 03:03:29 +08:00
parent 1d6438488f
commit 0aaf9f5f67
3 changed files with 7 additions and 23 deletions

View File

@ -110,8 +110,10 @@
<li><a href="~/Account/Logout"><i class="fa fa-key"></i>注销</a></li>
</ul>
</div>
<ul class="breadcrumb">
<li><a href="@Url.Content(Model.HomeUrl)"><i class="fa fa-home"></i>首页</a></li>
<li id="breadNav"></li>
</ul>
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="@Url.Content(Model.HomeUrl)"><i class="fa fa-home"></i>首页</a></li>
<li class="breadcrumb-item d-none" id="breadNav"></li>
</ol>
</nav>
</header>

View File

@ -412,28 +412,10 @@ a, a:hover, a:focus {
padding: 7.5px 10px;
}
.breadcrumb li {
padding-right: 5px;
}
.breadcrumb li.active {
display: inline-block;
}
.breadcrumb li.load {
display: none;
}
.breadcrumb i {
padding-right: 6px;
}
.breadcrumb li + li:before {
padding: 0 5px;
color: #ccc;
content: "/\00a0";
}
.content-body {
position: fixed;
left: 0;

View File

@ -169,7 +169,7 @@ $(function () {
// breadcrumb
var arch = $('#nav-accordion').find('a.active').last();
$breadNav.text(arch.text() || $('title').text());
if (arch.text() !== "") $breadNav.removeClass('d-none').text(arch.text());
var top = (arch.offset() || { top: 0 }).top;
if (top > 0) {
var middle = $('header').outerHeight() + $sidebar.outerHeight() / 2;