From 307a1e3ece84bdafc4c85464f7847542e2d6b919 Mon Sep 17 00:00:00 2001 From: WlodekM Date: Sat, 30 Nov 2024 19:21:31 +0200 Subject: attachments --- pages/main/page.js | 3 +++ shitstylse.css | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/pages/main/page.js b/pages/main/page.js index ab3cb78..96726a9 100644 --- a/pages/main/page.js +++ b/pages/main/page.js @@ -68,6 +68,9 @@ export function onload() { .child('span') .class('post-content') .text(msg?.content) + .child('div') + .for(msg.attachments, a => html('img').class('attachment').attr('src', a)) + .up() .up() msgArea.appendChild(elem) } diff --git a/shitstylse.css b/shitstylse.css index 2097b37..0b7cc65 100644 --- a/shitstylse.css +++ b/shitstylse.css @@ -38,6 +38,13 @@ body { color: #000000aa } +.attachment { + max-height: 25vw; + max-width: 25vw; + width: auto; + height: auto; +} + #messageInput { flex-grow: 1; } -- cgit 1.4.1-2-gfad0