-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
111 lines (95 loc) · 4.05 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>All tied together</title>
<!-- runtime -->
<script src="/third-party/react.production.min.js"></script>
<script src="/third-party/react-dom.production.min.js"></script>
<script src="/third-party/mobx.umd.min.js"></script>
<script src="/third-party/mobx-utils.umd.js"></script>
<script src="/third-party/mobx-react.min.js"></script>
<script src="/third-party/eventemitter3.min.js"></script>
<!-- jQuery plugin needs -->
<link rel="stylesheet" href="/third-party/cc_styles.css">
<script src="/third-party/jquery-3.4.0.min.js"></script>
<script src="/third-party/cc_script.js"></script>
<!-- React plugin needs -->
<link rel="stylesheet" href="/third-party/carousel.min.css">
<!-- Vue plugin needs -->
<link href="/third-party/vueperslides.css" rel="stylesheet">
<link rel="stylesheet" href="/third-party/vue.css">
<script src="/third-party/vue.min.js"></script>
<script src="/third-party/vueperslides.umd.min.js"></script>
<!-- demo styles -->
<style>
body {
background: #dedede;
}
.app {
width: 600px;
margin: 0 auto;
border: 2px solid red;
}
.red {
color: red;
font-weight: bold;
text-align: center;
}
</style>
</head>
<body>
<button onclick="runAction('view', 'activate')">Activate view</button>
<button onclick="runAction('view', 'deactivate')">Deactivate view</button>
<hr />
<div class="red">App:</div>
<div id="app" class="app"></div>
<script>
// Setup Runtime
const MBUS = new EventEmitter();
function runAction(entity, action) { window[entity][action](); }
</script>
<script>
var view, bl, plugin1, plugin2, plugin3, plugin4;
const timeVar = 0;
window.addEventListener("load", () => {
setTimeout(() => {
view = new demo_view.View("app", { mBus: MBUS });
console.log("View.init");
}, timeVar * 2)
setTimeout(() => {
view.activate();
console.log("View.activate");
}, timeVar * 4)
setTimeout(() => {
bl = new demo_bl.Bl(MBUS);
console.log("Bl.init | activate is controlled by the View");
}, timeVar * 6)
setTimeout(() => {
plugin1 = new demo_plugin1.Plugin(MBUS);
console.log("Plugin1.init");
}, timeVar)
setTimeout(() => {
plugin2 = new demo_plugin2.Plugin(MBUS);
console.log("Plugin2.init");
}, timeVar * 3)
setTimeout(() => {
plugin3 = new demo_plugin3.Plugin(MBUS);
console.log("Plugin3.init");
}, timeVar * 7)
setTimeout(() => {
plugin4 = new demo_plugin4.Plugin(MBUS);
console.log("Plugin4.init");
}, timeVar * 9)
});
</script>
<script async defer src="/_bundles/demo_bl.js"></script>
<script async defer src="/_bundles/demo_view.js"></script>
<script async defer src="/_bundles/demo_plugin1.js"></script>
<script async defer src="/_bundles/demo_plugin2.js"></script>
<script async defer src="/_bundles/demo_plugin3.js"></script>
<script async defer src="/_bundles/demo_plugin4.js"></script>
</body>
</html>