|
@@ -43,8 +43,8 @@
|
|
|
<ol class="cd-breadcrumb triangle">
|
|
<ol class="cd-breadcrumb triangle">
|
|
|
<li><a asp-controller="Home" asp-action="Index">首页</a></li>
|
|
<li><a asp-controller="Home" asp-action="Index">首页</a></li>
|
|
|
<li><a asp-controller="Home" asp-action="Post">文章列表</a></li>
|
|
<li><a asp-controller="Home" asp-action="Post">文章列表</a></li>
|
|
|
- @if(cat.Parent!=null) {
|
|
|
|
|
- <li><a asp-controller="Home" asp-action="Category" asp-route-id="@cat.ParentId">@cat.Parent.Name</a></li>
|
|
|
|
|
|
|
+ @if(cat.ParentId>0) {
|
|
|
|
|
+ <li><a asp-controller="Home" asp-action="Category" asp-route-id="@cat.ParentId">@cat.Parent.Name</a></li>
|
|
|
}
|
|
}
|
|
|
<li class="current"><em>@cat.Name</em></li>
|
|
<li class="current"><em>@cat.Name</em></li>
|
|
|
</ol>
|
|
</ol>
|
|
@@ -52,6 +52,9 @@
|
|
|
<div class="bg-title">
|
|
<div class="bg-title">
|
|
|
<div class="header-content text-center">
|
|
<div class="header-content text-center">
|
|
|
<h1 class="size48">
|
|
<h1 class="size48">
|
|
|
|
|
+ @if(cat.ParentId>0) {
|
|
|
|
|
+ @(cat.Parent.Name+" / ")
|
|
|
|
|
+ }
|
|
|
@cat.Name
|
|
@cat.Name
|
|
|
@if(CommonHelper.SystemSettings.GetOrAdd("EnableRss", "true") == "true"){
|
|
@if(CommonHelper.SystemSettings.GetOrAdd("EnableRss", "true") == "true"){
|
|
|
<a class="btn btn-lg btn-success" asp-controller="Subscribe" asp-action="CategoryRss" asp-route-id="@cat.Id" target="_blank">
|
|
<a class="btn btn-lg btn-success" asp-controller="Subscribe" asp-action="CategoryRss" asp-route-id="@cat.Id" target="_blank">
|
|
@@ -74,25 +77,27 @@
|
|
|
@foreach (var category in alllist)
|
|
@foreach (var category in alllist)
|
|
|
{
|
|
{
|
|
|
if (cat.Id==category.Id||cat.ParentId==category.Id) {
|
|
if (cat.Id==category.Id||cat.ParentId==category.Id) {
|
|
|
- <a class="text-red">@category.Name</a><text> | </text>
|
|
|
|
|
|
|
+ <a class="text-red" asp-controller="Home" asp-action="Category" asp-route-id="@category.Id">@category.Name</a><text> | </text>
|
|
|
} else {
|
|
} else {
|
|
|
<a asp-controller="Home" asp-action="Category" asp-route-id="@category.Id">@category.Name</a><text> | </text>
|
|
<a asp-controller="Home" asp-action="Category" asp-route-id="@category.Id">@category.Name</a><text> | </text>
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</p>
|
|
</p>
|
|
|
@if(children.Count>0) {
|
|
@if(children.Count>0) {
|
|
|
|
|
+ <hr />
|
|
|
<p>
|
|
<p>
|
|
|
<text>二级分类:</text>
|
|
<text>二级分类:</text>
|
|
|
@foreach (var category in children)
|
|
@foreach (var category in children)
|
|
|
{
|
|
{
|
|
|
if (cat.Id==category.Id) {
|
|
if (cat.Id==category.Id) {
|
|
|
- <a class="text-red">@category.Name</a><text> | </text>
|
|
|
|
|
|
|
+ <a class="text-red" asp-controller="Home" asp-action="Category" asp-route-id="@category.Id">@category.Name</a><text> | </text>
|
|
|
} else {
|
|
} else {
|
|
|
<a asp-controller="Home" asp-action="Category" asp-route-id="@category.Id">@category.Name</a><text> | </text>
|
|
<a asp-controller="Home" asp-action="Category" asp-route-id="@category.Id">@category.Name</a><text> | </text>
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</p>
|
|
</p>
|
|
|
}
|
|
}
|
|
|
|
|
+ <hr />
|
|
|
</div>
|
|
</div>
|
|
|
@{
|
|
@{
|
|
|
var user = Context.Session.Get<UserInfoDto>(SessionKey.UserInfo) ?? new UserInfoDto();
|
|
var user = Context.Session.Get<UserInfoDto>(SessionKey.UserInfo) ?? new UserInfoDto();
|