31 lines
937 B
Plaintext
31 lines
937 B
Plaintext
@using Wave.Data
|
|
|
|
<article class="card card-side card-compact bg-base-200 text-base-content">
|
|
<figure class="shrink-0 max-md:!hidden sm:max-w-40">
|
|
<ArticleLink Article="Article">
|
|
<img src="/api/user/pfp/@Article.Author.Id" alt="" width="800">
|
|
</ArticleLink>
|
|
</figure>
|
|
<div class="card-body">
|
|
<ArticleLink Article="Article">
|
|
<h2 class="card-title">@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)]
|
|
</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>
|
|
|
|
@code {
|
|
[Parameter]
|
|
public required Article Article { get; set; }
|
|
}
|