fixes for search page (exact search bug fix + w3 validator passing)
This commit is contained in:
parent
8365a0403f
commit
8583483490
@ -162,7 +162,7 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<img src="@($"{GanjooRazor.APIRoot.InternetUrl}{poem.Category.Poet.ImageUrl}")" alt=@($"{poem.Category.Poet.Name}") />
|
||||
<img src="@($"{GanjooRazor.APIRoot.InternetUrl}{poem.Category.Poet.ImageUrl}")" alt="@($"{poem.Category.Poet.Name}")" />
|
||||
|
||||
<div class="spacer"> </div>
|
||||
</div>
|
||||
|
||||
@ -246,7 +246,7 @@ namespace GanjooRazor.Pages
|
||||
{
|
||||
catQuery = $"&cat={Request.Query["cat"]}";
|
||||
}
|
||||
PagingToolsHtml = GeneratePagingBarHtml(paginationMetadata, $"/search?s={Query}&author={PoetId}{catQuery}");
|
||||
PagingToolsHtml = GeneratePagingBarHtml(paginationMetadata, $"/search?s={WebUtility.UrlEncode(Query)}&author={PoetId}{catQuery}");
|
||||
}
|
||||
}
|
||||
|
||||
@ -262,11 +262,12 @@ namespace GanjooRazor.Pages
|
||||
{
|
||||
string htmlText = "<p style=\"text-align: center;\">";
|
||||
|
||||
|
||||
if (paginationMetadata != null && paginationMetadata.totalPages > 1)
|
||||
{
|
||||
if (paginationMetadata.currentPage > 3)
|
||||
{
|
||||
htmlText += $"[<a href=\"{routeStartWithQueryStrings}&page=1\">صفحهٔ اول</a>] …";
|
||||
htmlText += $"[<a href=\"{routeStartWithQueryStrings.Replace("\"", "%22")}&page=1\">صفحهٔ اول</a>] …";
|
||||
}
|
||||
for (int i = (paginationMetadata.currentPage - 2); i <= (paginationMetadata.currentPage + 2); i++)
|
||||
{
|
||||
@ -279,14 +280,14 @@ namespace GanjooRazor.Pages
|
||||
}
|
||||
else
|
||||
{
|
||||
htmlText += $"<a href=\"{routeStartWithQueryStrings}&page={i}\">{i.ToPersianNumbers()}</a>";
|
||||
htmlText += $"<a href=\"{routeStartWithQueryStrings.Replace("\"", "%22")}&page={i}\">{i.ToPersianNumbers()}</a>";
|
||||
}
|
||||
htmlText += "] ";
|
||||
}
|
||||
}
|
||||
if (paginationMetadata.totalPages > (paginationMetadata.currentPage + 2))
|
||||
{
|
||||
htmlText += $"… [<a href=\"{routeStartWithQueryStrings}&page={paginationMetadata.totalPages}\">صفحهٔ آخر</a>]";
|
||||
htmlText += $"… [<a href=\"{routeStartWithQueryStrings.Replace("\"", "%22")}&page={paginationMetadata.totalPages}\">صفحهٔ آخر</a>]";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"GoogleAnalyticsCode": "",
|
||||
"APIRoot": "http://localhost:3439",
|
||||
"GlobalAPIRoot": "http://localhost:3439",
|
||||
"APIRoot": "https://ganjgah.ir",
|
||||
"GlobalAPIRoot": "https://ganjgah.ir",
|
||||
"SiteUrl": "http://localhost:33081",
|
||||
"ReadOnlyMode": "False"
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user