forked from daberpro/seleku-1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcard.js
65 lines (57 loc) · 1.47 KB
/
card.js
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
let components_card = [{
name: "seleku-card",
element: [{
tagName: "div",
id: "5a21cec5",
parentId: 0,
attr: "class=\"my-box bg-i-https://tse3.mm.bing.net/th?id=OIP.QOxjPkMTk67rZobAFvqangHaEK&pid=ImgDet&rs=1\" ",
}, {
tagName: "h1",
id: "8959d20f",
parentId: 0,
attr: "id={$angka} name={namaku}",
}, {
parentElement: "h1",
id: "c482c49c",
text: " seleku {namaku} ",
parentId: "8959d20f",
}, {
tagName: "button",
id: "8c732632",
parentId: 0,
attr: "id={namaku} onclick=\"kan()\" ",
}, {
parentElement: "button",
id: "b0557e8c",
text: " add ",
parentId: "8c732632",
}, {
tagName: "input",
id: "7294c5d5",
parentId: 0,
attr: "type=\"text\" name=\"\" value=\"daber\" oninput=\"input(this)\" ",
}, {
id: "1b104922",
text: " #html",
parentId: 0,
}, ],
css: ` h1{ color: red; font-family: sans-serif; } .my-box{ width: 300px; height: 200px; background: salmon; border-radius: 10px; } `
}];
let head_elements_card = [];
class SelekuComponents_components_card extends SelekuComponents {
constructor() {
super();
}
}
registeryComponents(components_card, SelekuComponents_components_card);
Render(components_card, document.querySelector("body"));
RenderCustomElementToHead(head_elements_card);
let namaku = "hello";
let $angka = 1;
// const $var = $Reactive({_mynumbers});
function kan() {
contexts.$angka += 1;
}
function input(el) {
contexts.namaku = el.value;
}