feat(web): better audience tag (well sorta)
This commit is contained in:
parent
9714b002e7
commit
05738cccf7
1 changed files with 13 additions and 9 deletions
|
@ -37,15 +37,19 @@ pub fn Object(
|
||||||
let content = mdhtml::safe_html(object.content().unwrap_or_default());
|
let content = mdhtml::safe_html(object.content().unwrap_or_default());
|
||||||
|
|
||||||
let audience_badge = object.audience().id().str()
|
let audience_badge = object.audience().id().str()
|
||||||
.map(|x| view! {
|
.map(|x| {
|
||||||
<a class="clean dim" href={Uri::web(U::Actor, &x)}>
|
// TODO this isn't guaranteed to work every time...
|
||||||
<span class="border-button ml-s" title={x.clone()}>
|
let name = x.split('/').last().unwrap_or_default().to_string();
|
||||||
<code class="color mr-s">&</code>
|
view! {
|
||||||
<small class="mr-s">
|
<a class="clean dim" href={Uri::web(U::Actor, &x)}>
|
||||||
{Uri::pretty(&x, 30)}
|
<span class="border-button ml-s" title={x}>
|
||||||
</small>
|
<code class="color mr-s">&</code>
|
||||||
</span>
|
<small class="mr-s">
|
||||||
</a>
|
{name}
|
||||||
|
</small>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
let tag_badges = object.tag()
|
let tag_badges = object.tag()
|
||||||
|
|
Loading…
Reference in a new issue