fix: busca da pagina e ajuste de icones
This commit is contained in:
parent
6ba824c155
commit
70ba07bb64
@ -31,7 +31,7 @@ public class UserPageRepository : IUserPageRepository
|
|||||||
|
|
||||||
public async Task<UserPage?> GetBySlugAsync(string category, string slug)
|
public async Task<UserPage?> GetBySlugAsync(string category, string slug)
|
||||||
{
|
{
|
||||||
return await _pages.Find(x => x.Category == category.ToLower() && x.Slug == slug && x.IsActive).FirstOrDefaultAsync();
|
return await _pages.Find(x => x.Category.ToLower() == category.ToLower() && x.Slug == slug && x.IsActive).FirstOrDefaultAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<UserPage?> GetByUserIdAsync(string userId)
|
public async Task<UserPage?> GetByUserIdAsync(string userId)
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
var seo = ViewBag.SeoSettings as BCards.Web.Models.SeoSettings;
|
var seo = ViewBag.SeoSettings as BCards.Web.Models.SeoSettings;
|
||||||
var category = ViewBag.Category as BCards.Web.Models.Category;
|
var category = ViewBag.Category as BCards.Web.Models.Category;
|
||||||
var isPreview = ViewBag.IsPreview as bool? ?? false;
|
var isPreview = ViewBag.IsPreview as bool? ?? false;
|
||||||
|
|
||||||
ViewData["Title"] = seo?.Title ?? $"{Model.DisplayName} - {category?.Name}";
|
ViewData["Title"] = seo?.Title ?? $"{Model.DisplayName} - {category?.Name}";
|
||||||
Layout = isPreview ? "_Layout" : "_UserPageLayout";
|
Layout = isPreview ? "_Layout" : "_UserPageLayout";
|
||||||
}
|
}
|
||||||
@ -11,9 +11,16 @@
|
|||||||
@if (!isPreview)
|
@if (!isPreview)
|
||||||
{
|
{
|
||||||
@section Styles {
|
@section Styles {
|
||||||
<style>
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
||||||
@Html.Raw(await Html.PartialAsync("_ThemeStyles", Model.Theme))
|
<style>
|
||||||
</style>
|
@Html.Raw(await Html.PartialAsync("_ThemeStyles", Model.Theme))
|
||||||
|
</style>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
@section Styles {
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,7 +66,7 @@
|
|||||||
onclick="recordClick('@Model.Id', @i)">
|
onclick="recordClick('@Model.Id', @i)">
|
||||||
@if (!string.IsNullOrEmpty(link.Icon))
|
@if (!string.IsNullOrEmpty(link.Icon))
|
||||||
{
|
{
|
||||||
<span class="link-icon me-2">@link.Icon</span>
|
<i class="@link.Icon"></i>
|
||||||
}
|
}
|
||||||
<div>
|
<div>
|
||||||
<div class="link-title">@link.Title</div>
|
<div class="link-title">@link.Title</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user