-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestPage.html
36 lines (30 loc) · 983 Bytes
/
testPage.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
<!DOCTYPE html>
<html>
<head>
<title>Test page for nano</title>
<!-- include lib -->
<script type="text/javascript" src="nano.js"></script>
<!-- test data -->
<script type="text/javascript">
data = {
user: {
login: "tomek",
first_name: "Thomas",
last_name: "Mazur",
account: {
status: "active",
expires_at: "2009-12-31"
}
}
}
</script>
</head>
<body>
<p id="testLayout">nano("<p>Hello {user.first_name} {user.last_name}! Your account is <strong>{user.account.status}</strong></p>", data)</p>
<script type="text/javascript">
window.onload = function () {
document.getElementById('testLayout').innerHTML = nano("<p>Hello {user.first_name} {user.last_name}! Your account is <strong>{user.account.status}</strong></p>", data);
}
</script>
</body>
</html>