Blog comment comments

This commit is contained in:
Paul Schneider 2024-12-15 20:48:04 +00:00
commit 1bde106195
10 changed files with 39 additions and 117 deletions

View file

@ -65,13 +65,14 @@ $('#commentValidation').html(
<h1 class="blogtitle" ismarkdown>@Model.Title</h1>
<img class="blogphoto" alt="" src="@Model.Photo" >
@Html.DisplayFor(m=>m.Author)
@Html.DisplayFor(m=>m.Content)
<asciidoc>@Html.DisplayFor(m=>m.Content)</asciidoc>
</div>
<div id="comments">
@if (Model.Comments!=null) {
foreach (var comment in Model.Comments.Where(c=>c.ParentId==null)) {
@Html.DisplayFor(model=>comment,"Comment","Comment")
@await Component.InvokeAsync("Comment", new { id = comment.Id })
}
}
</div>

View file

@ -45,5 +45,5 @@
}
<div class="container">
@await Component.InvokeAsync("BlogIndex",new{ id = User.GetUserId() ?? "_anonymous_" })
@await Component.InvokeAsync("BlogIndex",new{ viewerId = User.GetUserId() ?? "_anonymous_" })
</div>