-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
51 lines (48 loc) · 1.46 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>RealJS - javascript micro framework</title>
<link rel="stylesheet" href="./example/style.css">
<script src = "./src/Real.js"></script>
</head>
<body>
<section id = 'app'>
<div class="flex-row">
<img src = '{logo.src}' width="{logo.width}" style = "margin: {logo.margin}"><h1>{header}</h1>
</div>
<h4>{description}</h4>
<a href="https://kaifaty.github.io/RealJS/example/performance.html">Test performance</a>
<div>{nowTime}</div>
<div>Multiply 5*5 = {multy(5,5)}</div>
<ul>
<li data-array="specialFunctions" class="{class}">{text}</li>
</ul>
</section>
</body>
<script>
let data = {
logo: {
src: "./media/realjs.svg",
width: "50px",
margin: "0 10px 0 0 "
},
header: "RealJS - javascript micro framework",
description: "Simple example",
nowTime: new Date().toLocaleTimeString(),
specialFunctions: [
{text: "No Virtual DOM using", class: "red"},
{text: "Can change attributes", class: "blue"},
{text: "y", class: "green"},
],
multy(a, b){
return a * b;
}
};
let real = new Real(window['app'], data);
setInterval(()=>{
data.nowTime = new Date().toLocaleTimeString();
real.updateNode('nowTime');
}, 1000);
</script>
</html>