-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathindex.html
115 lines (112 loc) · 3.47 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
112
113
114
115
<!DOCTYPE html><html><head>
<meta charset="utf-8">
<title>Gaclib -- GPU Accelerated C++ User Interface (vczh)</title>
<link rel="shortcut icon" href="../favicon.ico">
<link rel="stylesheet" type="text/css" href="../global.css">
<link rel="stylesheet" type="text/css" href="../article.css">
<link rel="stylesheet" type="text/css" href="../navigation.css">
<link rel="stylesheet" type="text/css" href="../category.css">
<script src="../scripts/rootView.js"></script>
<script src="../scripts/homeView.js"></script>
<script src="../scripts/homeCategoryArticleView.js"></script>
</head>
<body>
<div id="MVC-ViewContainer"></div>
<script lang="javascript">
{
const mvcModel = {};
const mvcViews = [
{
"targetObject": "MVC-ViewContainer",
"viewName": "Gaclib-RootView"
},
{
"targetObject": "rootViewContainer",
"viewName": "Gaclib-HomeView"
},
{
"targetObject": "homeViewContainer",
"viewName": "Gaclib-HomeCategoryArticleView"
}
];
const activeButton = "Home";
const activeCategory = "Hello";
const homeArticle = {
"index": false,
"numberBeforeTitle": false,
"topic": {
"kind": "Topic",
"title": "Welcome to Gaclib!",
"content": [
{
"kind": "Paragraph",
"content": [
{
"kind": "Text",
"text": "\n Gaclib is a GPU accelerated C++ User Interface library.\n It is flexible, customizable with rich amount of built-in layout and controls.\n It also supports control templates, list item templates, MVVM, localization, animation, etc.\n More importantly, even if the UI is very complex, it still has good performance in interaction.\n You can find it at "
},
{
"kind": "PageLink",
"href": "https://github.com/vczh-libraries/Release",
"content": [
{
"kind": "Text",
"text": "github"
}
]
},
{
"kind": "Text",
"text": ".\n This library provide many useful features.\n If you don't need all features,\n you can just use a subset of released C++ files to reduce the size of the executable.\n "
}
]
},
{
"kind": "Paragraph",
"content": [
{
"kind": "Image",
"src": "/resources/home/xml_HelloWorld.png"
}
]
}
]
}
};
const categoryArticle = {
"index": false,
"numberBeforeTitle": false,
"topic": {
"kind": "Topic",
"title": "Hello, world!",
"content": [
{
"kind": "Paragraph",
"content": [
{
"kind": "Image",
"src": "/resources/home/xml_HelloWorld.png"
}
]
}
]
}
};
window["MVC-Resources.mvcModel"] = mvcModel;
window["MVC-Resources.mvcViews"] = mvcViews;
window["MVC-Resources.activeButton"] = activeButton;
window["MVC-Resources.activeCategory"] = activeCategory;
window["MVC-Resources.homeArticle"] = homeArticle;
window["MVC-Resources.categoryArticle"] = categoryArticle;
for (const view of mvcViews) {
window[view.viewName].renderView(mvcModel, document.getElementById(view.targetObject));
}
const renderedScriptTags = document.getElementById("MVC-ViewContainer").getElementsByTagName("script");
for (const scriptTag of renderedScriptTags) {
eval(
"(function(){" + scriptTag.innerHTML + "})()"
);
}
}
</script>
</body></html>