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/index.js | |
| parent | f6b7fe33ee7c08761f3403ca77b7530dbb2763df (diff) | |
image: implement removing
Diffstat (limited to 'static/pages/image-viewer/index.js')
| -rw-r--r-- | static/pages/image-viewer/index.js | 14 |
1 files changed, 12 insertions, 2 deletions
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); } } |