summaryrefslogtreecommitdiff
path: root/CoreWiki/Pages/_commentsList.cshtml
diff options
context:
space:
mode:
authorPaweł Bernaciak <pawelbernaciak@zohomail.eu>2023-12-29 09:41:56 +0100
committerPaweł Bernaciak <pawelbernaciak@zohomail.eu>2023-12-29 09:41:56 +0100
commit79f5eaf40b93d64be74d8b4f1ef80d19fadbfbe1 (patch)
treeddf121e78bdd50673379b223abfdb448c4f81291 /CoreWiki/Pages/_commentsList.cshtml
parent1a96616699ab41bf6343bc1acc45a836c3e6caf3 (diff)
Cywilizowany tailwindHEADmaster
Diffstat (limited to 'CoreWiki/Pages/_commentsList.cshtml')
-rw-r--r--CoreWiki/Pages/_commentsList.cshtml25
1 files changed, 25 insertions, 0 deletions
diff --git a/CoreWiki/Pages/_commentsList.cshtml b/CoreWiki/Pages/_commentsList.cshtml
new file mode 100644
index 0000000..ba0eb85
--- /dev/null
+++ b/CoreWiki/Pages/_commentsList.cshtml
@@ -0,0 +1,25 @@
+@model CoreWiki.Models.ArticleCommentListViewModel
+
+@foreach (var item in Model.Comments)
+{
+ <div class="flex flex-col border rounded mb-3">
+ <div class="bg-gray-50 p-2 border-b flex items-center">
+ <img class="me-2" width="40" height="40" src="https://gravatar.com/avatar/@item.GravatarHash?d=identicon" alt="avatar"/>
+ <div class="d-flex flex-column">
+ <span class="text-blue-600">@item.DisplayName</span>
+ <div class="flex">
+ <span class="text-sm text-gray-500">Commented on <span data-value="@item.Submitted" class="timeStampValue text-muted">@item.Submitted</span></span>
+ </div>
+ </div>
+ </div>
+ <div class="py-4 px-2">
+ <markdown>@item.Content</markdown>
+ </div>
+ </div>
+}
+@if (Model.Comments.Count() == 10)
+{
+ <div class="h-100 align-items-center d-flex" hx-get hx-page="Details" hx-route-slug="@Model.Slug" hx-route-pageNumber="@(Model.PageNumber + 1)" hx-swap="outerHTML" hx-trigger="intersect once">
+ <div id="spinner" class="htmx-indicator spinner-border"></div>
+ </div>
+} \ No newline at end of file