forked from alemi/upub
fix(web): img max width, slim activity header
This commit is contained in:
parent
af8310bfc9
commit
a51a70da0a
2 changed files with 19 additions and 16 deletions
|
@ -154,6 +154,7 @@
|
|||
}
|
||||
img.attachment {
|
||||
max-height: 15em;
|
||||
max-width: 90%;
|
||||
border: 5px solid #bf616a;
|
||||
padding: 5px;
|
||||
}
|
||||
|
@ -184,7 +185,13 @@
|
|||
color: var(--background);
|
||||
cursor: pointer;
|
||||
}
|
||||
.ml-1-r {
|
||||
margin-left: 1em;
|
||||
}
|
||||
@media screen and (max-width: 786px) {
|
||||
.ml-1-r {
|
||||
margin-left: 0;
|
||||
}
|
||||
.hidden-on-mobile {
|
||||
display: none;
|
||||
}
|
||||
|
|
|
@ -16,22 +16,18 @@ pub fn ActivityLine(activity: serde_json::Value) -> impl IntoView {
|
|||
let kind = activity.activity_type().unwrap_or(apb::ActivityType::Activity);
|
||||
view! {
|
||||
<div>
|
||||
<table class="align w-100" style="table-layout: fixed">
|
||||
<tr>
|
||||
<td>
|
||||
<a href={Uri::web(FetchKind::User, &actor_id)} class="clean hover">
|
||||
<img src={avatar} class="avatar-inline mr-s ml-1" /><b>{username}</b><small>@{domain}</small>
|
||||
</a>
|
||||
</td>
|
||||
<td class="rev" >
|
||||
<code class="color moreinfo" title={object_id.clone()} >{kind.as_ref().to_string()}</code>
|
||||
<a class="hover ml-1" href={Uri::web(FetchKind::Object, &object_id)} >
|
||||
<DateTime t=activity.published() />
|
||||
</a>
|
||||
<PrivacyMarker addressed=activity.addressed() />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a href={Uri::web(FetchKind::User, &actor_id)} class="clean hover">
|
||||
<img src={avatar} class="avatar-inline mr-s ml-1-r" /><b>{username}</b><small>@{domain}</small>
|
||||
</a>
|
||||
<span style="float:right">
|
||||
<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 class="hover ml-1 hidden-on-mobile" href={Uri::web(FetchKind::Object, &object_id)} >
|
||||
<DateTime t=activity.published() />
|
||||
</a>
|
||||
<span class="hidden-on-mobile">
|
||||
<PrivacyMarker addressed=activity.addressed() />
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue