Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
95 lines (79 sloc) 2.18 KB
@using System.Collections.Generic
@namespace Components
<style>
.croak-content {
overflow-wrap: break-word;
}
.croak-icon {
font-size: 11px;
}
.croak-icon-mid {
font-size: 15px;
}
.hashtags {
padding-top: 5px;
}
.rm {
padding-top: 7px;
padding-right: 7px;
}
.liked {
color: dodgerblue;
}
</style>
<div class="card flex-row">
<div class="card-body">
<blockquote class="blockquote mb-0">
<p class="croak-content">@Content</p>
<footer class="blockquote-footer text-muted">
<small>
by
<cite>
<a href="/byUser/@AuthorName">@AuthorName</a>
</cite>
</small>
<a @onclick="OnLikeClick" class="badge badge-light croak-icon pointer no-select">
<span class='@(IsLiked ? "liked" : "")'>
@LikesCount
<i class="material-icons croak-icon">thumb_up</i>
</span>
</a>
</footer>
</blockquote>
<div class="hashtags">
@foreach (var hashtag in Hashtags)
{
<a href="/byHashtag/@hashtag" class="badge badge-pill badge-light">#@hashtag</a>
}
</div>
</div>
@if (IsDeletable)
{
<div class="rm">
<a @onclick="OnRemoveClick"
type="button"
class="close"
aria-label="Delete">
<span class="material-icons croak-icon-mid">delete_forever</span>
</a>
</div>
}
</div>
@code {
[Parameter]
public string AuthorName { get; set; }
[Parameter]
public string Content { get; set; }
[Parameter]
public IEnumerable<string> Hashtags { get; set; }
[Parameter]
public int? LikesCount { get; set; }
[Parameter]
public bool IsDeletable { get; set; }
[Parameter]
public bool IsLiked { get; set; }
[Parameter]
public EventCallback OnLikeClick { get; set; }
[Parameter]
public EventCallback OnRemoveClick { get; set; }
}
You can’t perform that action at this time.