fixies the refact of blog spot index
All checks were successful
Dotnet build and test / log-the-inputs (push) Successful in 5s
Dotnet build and test / build (push) Successful in 1m58s

This commit is contained in:
Paul Schneider
2025-06-29 19:53:56 +01:00
parent fdf75934e5
commit 3f1bfc1c3c
13 changed files with 46 additions and 31 deletions

View File

@ -1,4 +1,4 @@
@model IEnumerable<IGrouping<string,BlogPost>>
@model IEnumerable<IGrouping<string,IBlogPost>>
@{
ViewData["Title"] = "Blogs, l'index";
}

View File

@ -1,14 +1,10 @@
@using Yavsc.Abstract.Identity
@model ApplicationUser
@{
var avuri = "/Avatars/"+Model.UserName+".s.png";
var userPosted = Model.Posts!=null && Model.Posts.Count()>=1;
var avuri = "/Avatars/" + Model.UserName + ".s.png";
}
<div class="userinfo">
@if (userPosted) { <a asp-controller="Blogspot" asp-action="Index"
asp-route-id="@Model.UserName" class="btn btn-primary">
<img src="@avuri" asp-append-version="true" class="smalltofhol" alt="@Model.UserName" title="@Model.UserName"/>
</a>
} else {
Html.DisplayFor(m=>m.UserName);
}
<a title="Posts" asp-controller="Blogspot" asp-action="Index" asp-route-id="@Model.UserName" class="btn btn-primary">
<img src="@avuri" asp-append-version="true" class="smalltofhol" alt="@Model.UserName" title="@Model.UserName" />
</a>
</div>

View File

@ -0,0 +1,10 @@
@using Yavsc.Abstract.Identity
@model IApplicationUser
@{
var avuri = "/Avatars/" + Model.UserName + ".s.png";
}
<div class="userinfo">
<a title="Posts" asp-controller="Blogspot" asp-action="Index" asp-route-id="@Model.UserName" class="btn btn-primary">
<img src="@avuri" asp-append-version="true" class="smalltofhol" alt="@Model.UserName" title="@Model.UserName" />
</a>
</div>