-
Notifications
You must be signed in to change notification settings - Fork 518
/
nav.cshtml
26 lines (24 loc) · 895 Bytes
/
nav.cshtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
@model PostModel
@inject IStringLocalizer<Resource> _localizer
<nav class="post-nav">
<div class="d-none d-md-flex align-items-md-center">
@if (Model.PostSlug.Older != null)
{
<div class="col">
<a class="post-nav-item text-start" href="~/post/@Model.PostSlug.Older.Slug" aria-label="@_localizer["previous-post"]">
<span class="post-nav-text">@_localizer["previous-post"]</span>
<h4 class="post-nav-title">@Model.PostSlug.Older.Title</h4>
</a>
</div>
}
@if (Model.PostSlug.Newer != null)
{
<div class="col">
<a class="post-nav-item text-end" href="~/post/@Model.PostSlug.Newer.Slug" aria-label="@_localizer["next-post"]">
<span class="post-nav-text">@_localizer["next-post"]</span>
<h4 class="post-nav-title">@Model.PostSlug.Newer.Title</h4>
</a>
</div>
}
</div>
</nav>