fix(web): better wrapping

This commit is contained in:
əlemi 2024-07-04 03:43:58 +02:00
parent 1c86110ed4
commit 46873b2f4c
Signed by: alemi
GPG key ID: A4895B84D311642C
3 changed files with 10 additions and 8 deletions

View file

@ -95,7 +95,6 @@
margin: 0 0 0 .5em; margin: 0 0 0 .5em;
} }
article.float-container { article.float-container {
overflow-y: hidden;
} }
b.displayname { b.displayname {
overflow-wrap: break-word; overflow-wrap: break-word;

View file

@ -217,7 +217,8 @@ impl Uri {
bare bare
} else { } else {
format!("{}..", bare.get(..len).unwrap_or_default()) format!("{}..", bare.get(..len).unwrap_or_default())
}.replace('/', "\u{200B}/\u{200B}") }
//.replace('/', "\u{200B}/\u{200B}")
} }
pub fn short(url: &str) -> String { pub fn short(url: &str) -> String {

View file

@ -60,7 +60,7 @@ pub fn Object(
let audience_badge = object.audience().id().str() let audience_badge = object.audience().id().str()
.map(|x| view! { .map(|x| view! {
<a class="clean dim" href={Uri::web(U::Actor, &x)}> <a class="clean dim" href={Uri::web(U::Actor, &x)}>
<span class="border-button ml-1" title={x.clone()}> <span class="border-button ml-s" title={x.clone()}>
<code class="color mr-s">&</code> <code class="color mr-s">&</code>
<small class="mr-s"> <small class="mr-s">
{Uri::pretty(&x, 30)} {Uri::pretty(&x, 30)}
@ -75,13 +75,13 @@ pub fn Object(
let href = Uri::web(U::Hashtag, &name); let href = Uri::web(U::Hashtag, &name);
Some(view! { Some(view! {
<a class="clean dim" href={href}> <a class="clean dim" href={href}>
<span class="border-button ml-1"> <span class="border-button ml-s">
<code class="color mr-s">#</code> <code class="color mr-s">#</code>
<small class="mr-s"> <small class="mr-s">
{name} {name}
</small> </small>
</span> </span>
</a> </a>" "
}) })
} else { } else {
None None
@ -155,9 +155,11 @@ pub fn Object(
<div class="mt-s ml-1 rev"> <div class="mt-s ml-1 rev">
{if !reply { Some(hashtag_badges) } else { None }} {if !reply { Some(hashtag_badges) } else { None }}
{if !reply { audience_badge } else { None }} {if !reply { audience_badge } else { None }}
<span style="white-space:nowrap">
<ReplyButton n=comments target=oid.clone() /> <ReplyButton n=comments target=oid.clone() />
<LikeButton n=likes liked=already_liked target=oid.clone() author=author_id private=!public /> <LikeButton n=likes liked=already_liked target=oid.clone() author=author_id private=!public />
<RepostButton n=shares target=oid /> <RepostButton n=shares target=oid />
</span>
</div> </div>
} }
} }