diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2025-11-13 14:56:02 +0100 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2025-11-13 14:56:02 +0100 |
| commit | c7b02f02ad0a7e2888f2d7d3599719e59bbd1ee2 (patch) | |
| tree | 9f782daf2e2ff78559958f15e0b9ffe5ece78334 /static/pages/login/index.js | |
| parent | 7ee9d320e6ba9a84542d838892c43cf98b268552 (diff) | |
frontend: design prototype
Diffstat (limited to 'static/pages/login/index.js')
| -rw-r--r-- | static/pages/login/index.js | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/static/pages/login/index.js b/static/pages/login/index.js new file mode 100644 index 0000000..fc14dbf --- /dev/null +++ b/static/pages/login/index.js @@ -0,0 +1,48 @@ +import * as sfw from 'sfw'; +const { Div, Label, H1: Title, Input, Button } = sfw.element.native; + +const css = await sfw.css(import.meta.url, './index.css'); + +export default class LoginView extends sfw.element.Container { + #user + #password + + constructor() { + super({ css }); + + this.onlogin = () => {}; + + this.body.append( + Div.new({ + id: 'container', + children: [ + Div.new({ id: 'title', innerText: 'Memora' }), + Div.new({ + id: 'box', + children: [ + + Div.new({ + id: 'form', + children: [ + Label.new({ innerText: 'User' }), + this.#user = Input.new({ }), + + Label.new({ innerText: 'Password' }), + this.#password = Input.new({ type: 'password' }), + ] + }), + Button.new({ + innerText: 'Login', + onclick: () => this.onlogin(this.#user.value, this.#password.value), + }), + ] + }), + Div.new({ + id: 'subtitle', + innerText: 'Where nostalgia is home.', + }), + ] + }) + ); + } +} |