diff --git a/web/index.html b/web/index.html index 32d7b87..bf7c59d 100644 --- a/web/index.html +++ b/web/index.html @@ -155,12 +155,18 @@ max-height: 2em; } img.attachment { + cursor: pointer; height: 10em; width: 100%; border: 5px solid #bf616a; padding: 5px; object-fit: cover; } + img.expand { + height: unset; + max-height: 50vh; + object-fit: contain; + } div.tl-header { background-color: #bf616a55; color: #bf616a; diff --git a/web/src/components/object.rs b/web/src/components/object.rs index 873c5dc..b1a7c21 100644 --- a/web/src/components/object.rs +++ b/web/src/components/object.rs @@ -11,12 +11,19 @@ pub fn Object(object: serde_json::Value) -> impl IntoView { let author_id = object.attributed_to().id().unwrap_or_default(); let author = CACHE.get_or(&author_id, serde_json::Value::String(author_id.clone())); let attachments = object.attachment() - .map(|x| view! { -

- - - -

+ .map(|x| { + let (expand, set_expand) = create_signal(false); + view! { +

+ +

+ } }) .collect_view(); let attachments_padding = if object.attachment().is_empty() {