1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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.',
}),
]
})
);
}
}
|