58 lines
2.3 KiB
HTML
58 lines
2.3 KiB
HTML
@use crate::ActixLoader;
|
|
@use crate::extensions::{SubmissionExt, ProfileExt};
|
|
@use crate::views::{OwnedProfileView, OwnedSubmissionView};
|
|
@use crate::templates::ago;
|
|
@use hyaenidae_toolkit::templates::bbcode;
|
|
@use hyaenidae_toolkit::templates::{card_body, card_section};
|
|
@use hyaenidae_toolkit::{templates::link, Link};
|
|
@use hyaenidae_toolkit::{templates::icon, Size};
|
|
@use hyaenidae_toolkit::{templates::{tile, tiles}, Tiles};
|
|
|
|
@(loader: &ActixLoader, sub_view: &OwnedSubmissionView, pro_view: &OwnedProfileView, dark: bool)
|
|
|
|
@:card_body({
|
|
<div class="profile-box">
|
|
@:icon(&pro_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) = pro_view.profile.display_name() {
|
|
<div class="profile-box--meta--display">
|
|
@:link(&Link::current_tab(&pro_view.profile.view_path()).plain(true), {
|
|
@Html(name)
|
|
})
|
|
</div>
|
|
}
|
|
<div class="profile-box--meta--handle">
|
|
@:link(&Link::current_tab(&pro_view.profile.view_path()).plain(true), {
|
|
@pro_view.profile.full_handle()
|
|
})
|
|
</div>
|
|
@if let Some(published) = sub_view.submission.published() {
|
|
<div class="profile-box--meta--date">
|
|
@:ago(loader, published)
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="profile-box--body">
|
|
<h3>@sub_view.submission.title_text()</h3>
|
|
@if let Some(description) = sub_view.submission.description_text() {
|
|
@:bbcode({
|
|
@Html(description)
|
|
})
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
})
|
|
@:card_section({
|
|
@:tiles(&Tiles::new().small(true), {
|
|
@for t in sub_view.tiles(loader) {
|
|
@:tile(&t)
|
|
}
|
|
})
|
|
})
|