This repository has been archived by the owner on Dec 31, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
151 lines (143 loc) · 5.17 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<nav class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="/index.html">RequireJS + CanJS Test</a>
</div>
<div id="navbar">
<ul class="nav navbar-nav">
<li class="navbar-text"><small class="initialism">Development mode:</small></li>
<li><a href="/index.html?development">Root Page</a></li>
<li><a href="/pages/example.html?development">Child Page</a></li>
<li class="navbar-text"><small class="initialism">Production mode:</small></li>
<li><a href="/index.html?production">Root Page</a></li>
<li><a href="/pages/example.html?production">Child Page</a></li>
</ul>
</div>
</div>
</nav>
<script>
// Highlight the active link in the navbar.
var currentPath = location.pathname + location.search;
var currentNavLinks = document.querySelectorAll(
'#navbar a[href="' + currentPath + '"]'
);
if (currentNavLinks[0]) {
currentNavLinks[0].parentNode.className = 'active';
}
</script>
<table class="table table-striped">
<thead>
<tr>
<th>Test</th>
<th>Result</th>
</tr>
</thead>
<tr>
<td>Test jQuery works</td>
<td id="jqueryWorks"><span class="label label-danger">Fail?</span></td>
</tr>
<tr>
<td>Test absolute module paths</td>
<td id="absolutePaths"><span class="label label-danger">Fail?</span></td>
</tr>
<tr>
<td>Test global references</td>
<td id="globalRefs"><span class="label label-danger">Fail?</span></td>
</tr>
<tr>
<td>Test module export references</td>
<td id="moduleRefs"><span class="label label-danger">Fail?</span></td>
</tr>
<tr>
<td>Test relative module paths</td>
<td id="relativePaths"><span class="label label-danger">Fail?</span></td>
</tr>
<tr>
<td>Test progressive loading</td>
<td id="progressiveLoad"><span class="label label-danger">Fail?</span></td>
</tr>
<tr>
<td>Test can.Component</td>
<td id="canComponent"><span class="label label-danger">Fail?</span></td>
</tr>
<tr>
<td>Test can.view.attr</td>
<td id="canViewAttr"><span class="label label-danger">Fail?</span></td>
</tr>
<tr>
<td>Test CSS module</td>
<td id="cssModule"><span class="label label-danger">Fail?</span><span class="pass"></span></td>
</tr>
<tr>
<td>Test CSS relative image</td>
<td id="cssRelativeImage"><span class="label label-danger">Fail?</span></td>
</tr>
<tr>
<td>Test CSS absolute image</td>
<td id="cssAbsoluteImage"><span class="label label-danger">Fail?</span></td>
</tr>
<tr>
<td>Test EJS template</td>
<td id="ejsTemplate"><span class="label label-danger">Fail?</span></td>
</tr>
<tr>
<td>Test can.view(templatePath)</td>
<td id="canView"><span class="label label-danger">Fail?</span></td>
</tr>
<tr>
<td>Test Mustache template</td>
<td id="mustacheTemplate"><span class="label label-danger">Fail?</span></td>
</tr>
<tr>
<td>Test Mustache global helper</td>
<td id="mustacheHelper"><span class="label label-danger">Fail?</span></td>
</tr>
<tr>
<td>Test Mustache partials</td>
<td id="mustachePartials"><span class="label label-danger">Fail?</span></td>
</tr>
<tr>
<td>Test Stache template</td>
<td id="stacheTemplate"><span class="label label-danger">Fail?</span></td>
</tr>
<tr>
<td>Test production build removes //!steal-remove blocks</td>
<td id="stealRemoveBlocks"><span class="label label-danger">Fail?</span></td>
</tr>
</table>
<br>
<br>
</div>
<script>
var isProduction = (location.search === '?production');
// Whether to use the minified or source RequireJS.
if (isProduction) {
document.write('<script src="/static/build/requirejs/require.js"><' + '/script>');
}
else {
document.write('<script src="/static/jsmvc/requirejs/require.js"><' + '/script>');
}
</script>
<script>
// Set path to find JS modules.
require.config({
baseUrl: isProduction ? '/static/build/' : '/static/jsmvc/'
});
// Load config first.
require(['require-config'], function() {
// Now load main module.
require(['pages/index/index']);
});
</script>
</body>
</html>