hyaenidae/server/templates/admin/comment_box.rs.html

38 lines
1.4 KiB
HTML
Raw Normal View History

@use crate::extensions::ProfileExt;
@use crate::views::OwnedProfileView;
@use hyaenidae_profiles::store::Comment;
@use hyaenidae_toolkit::{templates::link, Link};
@use hyaenidae_toolkit::templates::icon;
@use hyaenidae_toolkit::templates::ago;
@(comment: &Comment, view: &OwnedProfileView, dark: bool)
<div class="profile-box">
@:icon(&view.icon())
<div class="profile-box--content">
<div class="profile-box--all-meta">
<div>
<div class="profile-box--meta">
@if let Some(name) = view.profile.display_name() {
<div class="profile-box--meta--display">
@:link(&Link::current_tab(&view.profile.view_path()).plain(true).dark(dark), {
@name
})
</div>
}
<div class="profile-box--meta--handle">
@:link(&Link::current_tab(&view.profile.view_path()).plain(true).dark(dark), {
@view.profile.full_handle()
})
</div>
<div class="profile-box--meta--date">
posted @:ago(comment.published(), dark)
</div>
</div>
</div>
</div>
<div class="profile-box--body">@comment.body()</div>
</div>
</div>