Changed User view to use CardList instead of TileArray for Articles

This commit is contained in:
Mia Rose Winter 2024-02-25 23:26:19 +01:00
parent 09803905ed
commit 78baade948
Signed by: miawinter
GPG key ID: 4B6F6A83178F595E
2 changed files with 3 additions and 6 deletions

View file

@ -8,7 +8,7 @@
</figure>
<div class="card-body">
<ArticleLink Article="Article">
<h2 class="card-title">@Article.Title</h2>
<h2 class="card-title line-clamp-1">@Article.Title</h2>
<small>@Article.PublishDate.ToString("d")</small>
<p class="@(Article.Categories.Count > 0 ? "line-clamp-2" : "line-clamp-4")">
@Article.BodyPlain[..Math.Min(1000, Article.BodyPlain.Length)]

View file

@ -46,11 +46,8 @@
<section>
<h2 class="text-2xl lg:text-4xl mb-3">@Localizer["Articles"]</h2>
<ArticleTileArray>
@foreach (var article in User.Articles.OrderByDescending(a => a.PublishDate)) {
<ArticleTile Article="article" />
}
</ArticleTileArray>
<ArticleCardList Articles="@User.Articles.OrderByDescending(a => a.PublishDate).ToList()" />
</section>
}