1
0
Fork 0
forked from alemi/upub

fix(web): img max width, slim activity header

This commit is contained in:
əlemi 2024-04-22 03:31:51 +02:00
parent af8310bfc9
commit a51a70da0a
Signed by: alemi
GPG key ID: A4895B84D311642C
2 changed files with 19 additions and 16 deletions

View file

@ -154,6 +154,7 @@
} }
img.attachment { img.attachment {
max-height: 15em; max-height: 15em;
max-width: 90%;
border: 5px solid #bf616a; border: 5px solid #bf616a;
padding: 5px; padding: 5px;
} }
@ -184,7 +185,13 @@
color: var(--background); color: var(--background);
cursor: pointer; cursor: pointer;
} }
.ml-1-r {
margin-left: 1em;
}
@media screen and (max-width: 786px) { @media screen and (max-width: 786px) {
.ml-1-r {
margin-left: 0;
}
.hidden-on-mobile { .hidden-on-mobile {
display: none; display: none;
} }

View file

@ -16,22 +16,18 @@ pub fn ActivityLine(activity: serde_json::Value) -> impl IntoView {
let kind = activity.activity_type().unwrap_or(apb::ActivityType::Activity); let kind = activity.activity_type().unwrap_or(apb::ActivityType::Activity);
view! { view! {
<div> <div>
<table class="align w-100" style="table-layout: fixed"> <a href={Uri::web(FetchKind::User, &actor_id)} class="clean hover">
<tr> <img src={avatar} class="avatar-inline mr-s ml-1-r" /><b>{username}</b><small>@{domain}</small>
<td> </a>
<a href={Uri::web(FetchKind::User, &actor_id)} class="clean hover"> <span style="float:right">
<img src={avatar} class="avatar-inline mr-s ml-1" /><b>{username}</b><small>@{domain}</small> <a class="upub-title clean" href={Uri::web(FetchKind::Object, &object_id)} ><code class="color moreinfo" title={object_id.clone()} >{kind.as_ref().to_string()}</code></a>
</a> <a class="hover ml-1 hidden-on-mobile" href={Uri::web(FetchKind::Object, &object_id)} >
</td> <DateTime t=activity.published() />
<td class="rev" > </a>
<code class="color moreinfo" title={object_id.clone()} >{kind.as_ref().to_string()}</code> <span class="hidden-on-mobile">
<a class="hover ml-1" href={Uri::web(FetchKind::Object, &object_id)} > <PrivacyMarker addressed=activity.addressed() />
<DateTime t=activity.published() /> </span>
</a> </span>
<PrivacyMarker addressed=activity.addressed() />
</td>
</tr>
</table>
</div> </div>
} }
} }