From 0c98276d324db649c4a15be7859a501588257972 Mon Sep 17 00:00:00 2001 From: s-ol Date: Thu, 13 Jan 2022 18:27:20 +0100 Subject: move everything into client/ --- client/src/ui/Attachment.js | 26 +++++ client/src/ui/Discussion.js | 122 ++++++++++++++++++++++ client/src/ui/Links.js | 50 +++++++++ client/src/ui/Menu.js | 139 +++++++++++++++++++++++++ client/src/ui/Note.js | 249 ++++++++++++++++++++++++++++++++++++++++++++ client/src/ui/Selection.js | 93 +++++++++++++++++ client/src/ui/css.js | 13 +++ client/src/ui/index.js | 10 ++ client/src/ui/theme.js | 39 +++++++ 9 files changed, 741 insertions(+) create mode 100644 client/src/ui/Attachment.js create mode 100644 client/src/ui/Discussion.js create mode 100644 client/src/ui/Links.js create mode 100644 client/src/ui/Menu.js create mode 100644 client/src/ui/Note.js create mode 100644 client/src/ui/Selection.js create mode 100644 client/src/ui/css.js create mode 100644 client/src/ui/index.js create mode 100644 client/src/ui/theme.js (limited to 'client/src/ui') diff --git a/client/src/ui/Attachment.js b/client/src/ui/Attachment.js new file mode 100644 index 0000000..3c07ee5 --- /dev/null +++ b/client/src/ui/Attachment.js @@ -0,0 +1,26 @@ +import { h } from 'preact'; +import css from './css'; + +css` +.attachment { + margin: 1rem; + + height: 7rem; + object-fit: contain; +} + +.attachment + .attachment { + margin-top: 0; +} +`; + +export const Attachment = ({ type, mediaType, url, style }) => { + let content; + if (mediaType.startsWith('video/')) { + content =