Changed User view to use CardList instead of TileArray for Articles
This commit is contained in:
parent
09803905ed
commit
78baade948
|
@ -8,7 +8,7 @@
|
||||||
</figure>
|
</figure>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<ArticleLink Article="Article">
|
<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>
|
<small>@Article.PublishDate.ToString("d")</small>
|
||||||
<p class="@(Article.Categories.Count > 0 ? "line-clamp-2" : "line-clamp-4")">
|
<p class="@(Article.Categories.Count > 0 ? "line-clamp-2" : "line-clamp-4")">
|
||||||
@Article.BodyPlain[..Math.Min(1000, Article.BodyPlain.Length)]
|
@Article.BodyPlain[..Math.Min(1000, Article.BodyPlain.Length)]
|
||||||
|
|
|
@ -46,11 +46,8 @@
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<h2 class="text-2xl lg:text-4xl mb-3">@Localizer["Articles"]</h2>
|
<h2 class="text-2xl lg:text-4xl mb-3">@Localizer["Articles"]</h2>
|
||||||
<ArticleTileArray>
|
<ArticleCardList Articles="@User.Articles.OrderByDescending(a => a.PublishDate).ToList()" />
|
||||||
@foreach (var article in User.Articles.OrderByDescending(a => a.PublishDate)) {
|
|
||||||
<ArticleTile Article="article" />
|
|
||||||
}
|
|
||||||
</ArticleTileArray>
|
|
||||||
</section>
|
</section>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue