Add proper breadcrumbs
This commit is contained in:
parent
cd5b050b83
commit
9a64f5b085
|
@ -6,7 +6,12 @@
|
||||||
<meta name="twitter:card" content="summary"/>
|
<meta name="twitter:card" content="summary"/>
|
||||||
<meta name="twitter:title" content="@ViewData["card_title"]"/>
|
<meta name="twitter:title" content="@ViewData["card_title"]"/>
|
||||||
<meta name="twitter:description" content="@ViewData["card_desc"]"/>
|
<meta name="twitter:description" content="@ViewData["card_desc"]"/>
|
||||||
<title>zotan.pw >> @ViewData["title"]</title>
|
@if (ViewData.ContainsKey("subtitle")) {
|
||||||
|
<title>zotan.pw >> @ViewData["title"] >> @ViewData["subtitle"]</title>
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
<title>zotan.pw >> @ViewData["title"]</title>
|
||||||
|
}
|
||||||
<link rel="stylesheet" href="~/css/site.css"/>
|
<link rel="stylesheet" href="~/css/site.css"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -14,7 +19,21 @@
|
||||||
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
|
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>
|
<h1>
|
||||||
<a href="/">zotan.pw >> @ViewData["Title"]</a>
|
@{
|
||||||
|
var path = Context.Request.Path.Value?.TrimStart('/').Split("/");
|
||||||
|
var sublink = path?.Length >= 1 ? path[0] : "/";
|
||||||
|
var subsublink = path?.Length >= 2 ? path[1] : "/";
|
||||||
|
}
|
||||||
|
@if (ViewData.ContainsKey("subtitle")) {
|
||||||
|
<span>
|
||||||
|
<a href="/">zotan.pw</a> >> <a href="/@sublink">@ViewData["title"]</a> >> <a href="/@sublink/@subsublink">@ViewData["subtitle"]</a>
|
||||||
|
</span>
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
<span>
|
||||||
|
<a href="/">zotan.pw</a> >> <a href="/@sublink">@ViewData["title"]</a>
|
||||||
|
</span>
|
||||||
|
}
|
||||||
</h1>
|
</h1>
|
||||||
@await RenderSectionAsync("head", false)
|
@await RenderSectionAsync("head", false)
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -9,7 +9,8 @@
|
||||||
Response.Redirect("/Error");
|
Response.Redirect("/Error");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ViewData["title"] = $"blog >> {post.Shorthand}";
|
ViewData["title"] = "blog";
|
||||||
|
ViewData["subtitle"] = post.Shorthand;
|
||||||
#if (DEBUG)
|
#if (DEBUG)
|
||||||
post.UpdateContent();
|
post.UpdateContent();
|
||||||
#endif
|
#endif
|
||||||
|
@ -19,4 +20,4 @@
|
||||||
<h1 id="post">IPv6-native networking: a project report</h1>
|
<h1 id="post">IPv6-native networking: a project report</h1>
|
||||||
<div align="justify">
|
<div align="justify">
|
||||||
@Html.Raw(post.Content)
|
@Html.Raw(post.Content)
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue