51 lines
2 KiB
HTML
51 lines
2 KiB
HTML
@use crate::ActixLoader;
|
|
@use crate::comments::{CommentNode, Cache};
|
|
@use crate::extensions::ProfileExt;
|
|
@use crate::templates::ago;
|
|
@use crate::views::OwnedProfileView;
|
|
@use chrono::{DateTime, Utc};
|
|
@use hyaenidae_toolkit::{templates::link, Link};
|
|
@use hyaenidae_toolkit::{templates::icon, Size};
|
|
@use i18n_embed_fl::fl;
|
|
|
|
@(loader: &ActixLoader, view: &OwnedProfileView, published: DateTime<Utc>, parent: &CommentNode, cache: &Cache, dark: bool, meta: Content, body: Content)
|
|
|
|
<div class="profile-box">
|
|
@:icon(&view.icon(loader).size(Size::Small).dark(dark))
|
|
<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), {
|
|
@Html(name)
|
|
})
|
|
</div>
|
|
}
|
|
<div class="profile-box--meta--handle">
|
|
@:link(&Link::current_tab(&view.profile.view_path()).plain(true), {
|
|
@view.profile.full_handle()
|
|
})
|
|
</div>
|
|
<div class="profile-box--meta--date">
|
|
@:ago(loader, published)
|
|
</div>
|
|
</div>
|
|
<div class="profile-box--replying-to">
|
|
@if let Some(l) = parent.view_link(cache) {
|
|
@if let Some(name) = parent.name(cache) {
|
|
@:link(&l, {
|
|
@Html(fl!(loader, "replying-to", profileName = name))
|
|
})
|
|
}
|
|
}
|
|
</div>
|
|
</div>
|
|
<div class="profile-box--extra-meta">@:meta()</div>
|
|
</div>
|
|
<div class="profile-box--body">@:body()</div>
|
|
</div>
|
|
</div>
|
|
|