-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
efbe212
commit addb94f
Showing
12 changed files
with
218 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
@page | ||
@model IndexModel | ||
@{ | ||
ViewData["ShowSearch"] = true; | ||
var isSearch = Model.PostList.PostListType == PineBlog.Models.PostListType.Search; | ||
|
||
var linkToNewerText = "Newer"; | ||
var linkToOlderText = "Older"; | ||
if (isSearch) | ||
{ | ||
linkToNewerText = "Previous"; | ||
linkToOlderText = "Next"; | ||
} | ||
} | ||
@section head { | ||
<partial name="_Metadata" model="@Model.Metadata" /> | ||
|
@@ -11,6 +19,14 @@ | |
|
||
<div class="page-content"> | ||
<div class="container"> | ||
@if (isSearch && !Model.PostList.Posts.Any()) | ||
{ | ||
<article class="post"> | ||
<div class="post-content"> | ||
No results for "@ViewData["SearchQuery"]" | ||
</div> | ||
</article> | ||
} | ||
@foreach (var post in Model.PostList.Posts) | ||
{ | ||
<partial name="_Post" model="post" /> | ||
|
@@ -21,16 +37,16 @@ | |
<div class="item-next col-md-6"> | ||
@if (Model.PostList.Pager.ShowNewer) | ||
{ | ||
<a href="[email protected]" title="Newer"> | ||
Newer | ||
<a href="[email protected]" title="@linkToNewerText"> | ||
@linkToNewerText | ||
</a> | ||
} | ||
</div> | ||
<div class="item-prev col-md-6"> | ||
@if (Model.PostList.Pager.ShowOlder) | ||
{ | ||
<a href="[email protected]" title="Older"> | ||
Older | ||
<a href="[email protected]" title="@linkToOlderText"> | ||
@linkToOlderText | ||
</a> | ||
} | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 14 additions & 9 deletions
23
src/Opw.PineBlog.RazorPages/Areas/Blog/Pages/Shared/_SearchModal.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
<div class="modal fade blog-search" id="blog-search" tabindex="-1" role="dialog" aria-hidden="true"> | ||
<div class="modal-dialog" role="document"> | ||
<div class="modal-content"> | ||
<div class="modal-body p-0"> | ||
<form role="search" asp-page="Index" asp- method="post"> | ||
<input type="search" id="query" name="query" class="form-control form-control-lg" placeholder="Search..." autocomplete="off"> | ||
</form> | ||
@{ | ||
var showSearch = ViewData["ShowSearch"] != null && true; | ||
} | ||
@if (showSearch) | ||
{ | ||
<div class="modal fade blog-search" id="blog-search" tabindex="-1" role="dialog" aria-hidden="true"> | ||
<div class="modal-dialog" role="document"> | ||
<div class="modal-content"> | ||
<div class="modal-body p-0"> | ||
<form role="search" asp-page="Index" asp- method="GET"> | ||
<input type="search" id="q" name="q" class="form-control form-control-lg" placeholder="Search .." value="@ViewData["SearchQuery"]" autocomplete="off"> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
@*TODO: remove link https://github.com/blogifierdotnet/Blogifier/blob/14c4303a3981bcd0262e0ceaa71df0f31a3bd0e4/src/App/Views/Themes/Standard/_Shared/_Footer.cshtml*@ | ||
} |
Oops, something went wrong.