diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2025-11-20 06:56:43 +0100 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2025-11-20 06:56:43 +0100 |
| commit | efb92a00185963a763217d4bedce7a1591c6dc22 (patch) | |
| tree | 0ac7d86154b286195819de06decdbd850561bdcb /static/pages/image-viewer | |
| parent | f6b7fe33ee7c08761f3403ca77b7530dbb2763df (diff) | |
image: implement removing
Diffstat (limited to 'static/pages/image-viewer')
| -rw-r--r-- | static/pages/image-viewer/index.css | 19 | ||||
| -rw-r--r-- | static/pages/image-viewer/index.js | 14 |
2 files changed, 25 insertions, 8 deletions
diff --git a/static/pages/image-viewer/index.css b/static/pages/image-viewer/index.css index 4b1eb9b..ec98173 100644 --- a/static/pages/image-viewer/index.css +++ b/static/pages/image-viewer/index.css @@ -6,16 +6,23 @@ display: grid; gap: 10px; padding: 10px; + padding-bottom: 50%; } #container sfw-image { margin: auto; - max-width: 700px; - width: 100%; - border-radius: var(--border-radius); - box-shadow: #223223aa 1px 1px 4px; } -#container img.hidden { - filter: brightness(0) invert(); +#subtitle { + text-align: center; + color: #7e8fa8; + font-size: 0.8em; + font-weight: lighter; + padding-top: 10px; +} + +#subtitle i { + font-family: 'Pacifico'; + font-style: normal; + color: var(--fg-disabled); } diff --git a/static/pages/image-viewer/index.js b/static/pages/image-viewer/index.js index 0cf8598..e418e6f 100644 --- a/static/pages/image-viewer/index.js +++ b/static/pages/image-viewer/index.js @@ -7,6 +7,7 @@ const css = await sfw.css(import.meta.url, './index.css') export default class ImageViewer extends sfw.element.Container { #container + #subtitle constructor() { super({ css }); @@ -15,15 +16,24 @@ export default class ImageViewer extends sfw.element.Container { this.onolder = () => {} this.body.append( - this.#container = Div.new({ id: 'container' }) + this.#container = Div.new({ + id: 'container', + children: [ + this.#subtitle = Div.new({ + id: 'subtitle', + innerHTML: 'Powered by <i>Memora<i>' + }) + ], + }) ); } add(id) { - this.#container.append(Image.new({ id })) + this.#container.insertBefore(Image.new({ id }), this.#subtitle); } clear() { this.#container.innerHTML = ''; + this.#container.append(this.#subtitle); } } |