forked from eliseosoto/breaking-bad-credits
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
83 lines (76 loc) · 2.76 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
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="//current.bootstrapcdn.com/bootstrap-v204/css/bootstrap-combined.min.css">
<script src="../node_modules/montage/montage.js"></script>
<link rel="stylesheet" href="style.css" />
<script type="text/montage-serialization">{
"owner": {
"prototype": "breaking-bad-credits",
"properties": {
"generatedNamesController": {"@": "generatedNamesController"}
}
},
"name": {
"prototype": "montage/ui/native/input-text.reel",
"properties": {
"element": {"#": "name"}
},
"bindings": {
"value": {"<->": "@owner.name"}
}
},
"generate": {
"prototype": "montage/ui/native/button.reel",
"properties": {
"element": {"#": "generate"},
"identifier": "generate"
},
"listeners": [
{
"type": "action",
"listener": {"@": "owner"}
}
]
},
"generatedNamesController": {
"prototype": "montage/ui/controller/array-controller",
"bindings": {
"content": {"<->": "@owner.generatedNames"}
}
},
"generatedNames": {
"prototype": "montage/ui/repetition.reel",
"properties": {
"element": {"#": "generatedNames"},
"contentController": {"@": "generatedNamesController"}
}
},
"generatedName": {
"prototype": "montage/ui/dynamic-element.reel",
"properties": {
"element": {"#": "generatedName"},
"allowedTagNames": ["strong", "span"],
"class": "generatedName"
},
"bindings": {
"innerHTML": {"<-": "@generatedNames.objectAtCurrentIteration"}
}
}
}</script>
</head>
<body>
<div class="container">
<div class="row">
<div class="span12">
<p>This will generate credit names like the ones seen on Breaking Bad</p>
<input type="text" data-montage-id="name" placeholder="Enter name" />
<button data-montage-id="generate">Generate!</button>
<ul data-montage-id="generatedNames" class="generatedNames">
<li data-montage-id="generatedName" class="generatedName"></li>
</ul>
</div>
</div>
</div>
</body>
</html>