2021-01-22 05:47:47 +00:00
|
|
|
@use crate::extensions::ProfileExt;
|
|
|
|
@use crate::views::OwnedProfileView;
|
2021-01-15 05:51:17 +00:00
|
|
|
@use chrono::{DateTime, Utc};
|
2021-01-11 04:09:47 +00:00
|
|
|
@use hyaenidae_toolkit::{templates::link, Link};
|
2021-01-13 04:39:59 +00:00
|
|
|
@use hyaenidae_toolkit::templates::ago;
|
2021-01-22 05:47:47 +00:00
|
|
|
@use hyaenidae_toolkit::templates::icon;
|
2021-01-11 04:09:47 +00:00
|
|
|
|
2021-01-22 05:47:47 +00:00
|
|
|
@(view: &OwnedProfileView, published: Option<DateTime<Utc>>, dark: bool, body: Content)
|
2021-01-11 04:09:47 +00:00
|
|
|
|
|
|
|
<div class="profile-box">
|
2021-01-22 05:47:47 +00:00
|
|
|
@:icon(&view.icon().small(true).dark(dark))
|
2021-01-12 03:59:42 +00:00
|
|
|
<div class="profile-box--content">
|
|
|
|
<div class="profile-box--all-meta">
|
|
|
|
<div class="profile-box--meta">
|
2021-01-22 05:47:47 +00:00
|
|
|
@if let Some(name) = view.profile.display_name() {
|
2021-01-12 03:59:42 +00:00
|
|
|
<div class="profile-box--meta--display">
|
2021-01-24 04:04:27 +00:00
|
|
|
@:link(&Link::current_tab(&view.profile.view_path()).plain(true), {
|
2021-01-12 03:59:42 +00:00
|
|
|
@name
|
|
|
|
})
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
<div class="profile-box--meta--handle">
|
2021-01-24 04:04:27 +00:00
|
|
|
@:link(&Link::current_tab(&view.profile.view_path()).plain(true), {
|
2021-01-22 05:47:47 +00:00
|
|
|
@view.profile.full_handle()
|
2021-01-12 03:59:42 +00:00
|
|
|
})
|
|
|
|
</div>
|
2021-01-15 05:51:17 +00:00
|
|
|
@if let Some(published) = published {
|
2021-01-12 03:59:42 +00:00
|
|
|
<div class="profile-box--meta--date">
|
|
|
|
posted
|
2021-01-24 04:04:27 +00:00
|
|
|
@:ago(published)
|
2021-01-12 03:59:42 +00:00
|
|
|
</div>
|
|
|
|
}
|
2021-01-11 04:09:47 +00:00
|
|
|
</div>
|
2021-01-12 03:59:42 +00:00
|
|
|
</div>
|
|
|
|
<div class="profile-box--body">@:body()</div>
|
2021-01-11 04:09:47 +00:00
|
|
|
</div>
|
|
|
|
</div>
|