From 318cbe98eadbb229ff970d57453c945b2aa9ba66 Mon Sep 17 00:00:00 2001 From: Thomas Mathews Date: Thu, 15 Dec 2022 10:00:20 -0800 Subject: [PATCH] web: Added media previewing --- web/css/styles.css | 23 +++++++++++++++++++++++ web/index.html | 8 ++++++++ web/js/ui/util.js | 16 ++++++++++++++++ web/js/util.js | 4 +--- 4 files changed, 48 insertions(+), 3 deletions(-) diff --git a/web/css/styles.css b/web/css/styles.css index a278e8d..e713fe8 100644 --- a/web/css/styles.css +++ b/web/css/styles.css @@ -438,6 +438,29 @@ label[role="profile-nip5"] { display: block; } +/* Media Preview */ + +.bg-blur { + backdrop-filter: blur(20px); + position: absolute; + width: 100%; + height: 100%; + z-index: var(--zModal); +} +.modal .media-container { + text-align: center; + position: absolute; + width: 100%; + height: 100%; + z-index: calc(var(--zModal) + 1); +} +.modal .media-container > img { + object-fit: scale-down; + object-position: center; + width: 100%; + height: 100%; +} + @media (prefers-color-scheme: dark) { .icon.svg { filter: invert(1); diff --git a/web/index.html b/web/index.html index 80977f9..9539f73 100644 --- a/web/index.html +++ b/web/index.html @@ -147,6 +147,14 @@
+ +