YaeBlog/YaeBlog/Components/EssayCard.razor
jackfiled fe0a804677
All checks were successful
Build blog docker image / Build-Blog-Image (push) Successful in 2m30s
fix: tags in essay card and essay page.
2024-08-14 00:01:12 +08:00

41 lines
941 B
Plaintext

@using System.Text.Encodings.Web
@using YaeBlog.Core.Models
<div class="container p-3">
<div class="row fs-2 fw-bold py-2 essay-title">
<a href="/blog/essays/@(Essay.FileName)" target="_blank">@(Essay.Title)</a>
</div>
<div class="row p-2 justify-content-start">
<div class="col-auto fw-light">
@(Essay.PublishTime.ToString("yyyy-MM-dd"))
</div>
@foreach (string key in Essay.Tags)
{
<div class="col-auto">
<a href="/blog/tags/?tagName=@(UrlEncoder.Default.Encode(key))">
# @key
</a>
</div>
}
</div>
<div class="row p-2">
<div class="col">
@(Essay.Description)
</div>
</div>
<div class="row">
<div class="col border-bottom">
</div>
</div>
</div>
@code {
[Parameter]
public required BlogEssay Essay { get; set; }
}