1
0
Fork 0
forked from alemi/upub

fix(web): better view for lemmy objects

This commit is contained in:
əlemi 2024-05-12 00:52:27 +02:00
parent 227e9c625b
commit b9f512a988
Signed by: alemi
GPG key ID: A4895B84D311642C
2 changed files with 9 additions and 1 deletions

View file

@ -112,6 +112,10 @@
position: sticky; position: sticky;
background-color: var(--background); background-color: var(--background);
} }
div.border {
padding: 1em;
border: 1px dashed var(--accent);
}
@media screen and (max-width: 786px) { @media screen and (max-width: 786px) {
div.sticky { div.sticky {
top: 1.75rem; top: 1.75rem;

View file

@ -115,7 +115,11 @@ pub fn Object(object: crate::Object) -> impl IntoView {
}; };
let post = match object.object_type() { let post = match object.object_type() {
Some(apb::ObjectType::Document(apb::DocumentType::Page)) => view! { Some(apb::ObjectType::Document(apb::DocumentType::Page)) => view! {
<table class="w-100 pa-1">{post_inner}</table> <div class="border ml-1 mr-1 mt-1">
<b>{object.name().unwrap_or_default().to_string()}</b>
<hr />
{post_inner}
</div>
}.into_view(), // lemmy }.into_view(), // lemmy
Some(apb::ObjectType::Document(apb::DocumentType::Video)) => post_inner.into_view(), // peertube? Some(apb::ObjectType::Document(apb::DocumentType::Video)) => post_inner.into_view(), // peertube?
Some(apb::ObjectType::Note) => view! { Some(apb::ObjectType::Note) => view! {