Improved ArticleCard

This commit is contained in:
Mia Rose Winter 2024-02-08 16:01:36 +01:00
parent bbcb0a2ce3
commit 7847f357c3
Signed by: miawinter
GPG key ID: 4B6F6A83178F595E
2 changed files with 9 additions and 7 deletions

View file

@ -10,15 +10,17 @@
<ArticleLink Article="Article">
<h2 class="card-title">@Article.Title</h2>
<small>@Article.PublishDate.ToString("d")</small>
<p class="line-clamp-2">
<p class="@(Article.Categories.Count > 0 ? "line-clamp-2" : "line-clamp-4")">
@Article.Body
</p>
</ArticleLink>
@if (Article.Categories.Count > 0) {
<div class="card-actions flex flex-wrap gap-2">
@foreach (var category in Article.Categories.OrderBy(c => c.Color)) {
<CategoryBadgeComponent Category="category" />
}
</div>
}
</div>
</article>

File diff suppressed because one or more lines are too long