-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdemo.html
135 lines (134 loc) · 4.64 KB
/
demo.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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
<title>io-bundle demo</title>
<script src="../webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../show-and-tell/show-and-tell.html">
<link rel="import" href="io-bundle.html">
<link rel="stylesheet" href="theme.css" shim-shadowdom>
<style type="text/css">
html {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
body{
width: 100%;
height: 100%;
margin: 0.5rem;
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 13px;
background: #f3eee8;
}
.demo {
padding: 0.5rem;
margin: 0.5rem 0;
background: white;
position: relative;
}
.demo > :nth-child(2){
margin: 2em;
}
</style>
</head>
<body unresolved>
<h2>io-bundle Demos</h2>
<p>A collection of I/O web components for various data types.</p>
<p>Use the interactive tag inspector to experiment with attributes.</p>
<p>Documentation is available <a href="./index.html">here</a>.</p>
<div class="demo">
<show-and-tell></show-and-tell>
<io-base></io-base>
</div>
<div class="demo">
<show-and-tell></show-and-tell>
<io-boolean-icon></io-boolean-icon>
</div>
<div class="demo">
<show-and-tell></show-and-tell>
<io-boolean></io-boolean>
</div>
<div class="demo">
<show-and-tell></show-and-tell>
<io-number value="1337"></io-number>
</div>
<div class="demo">
<show-and-tell></show-and-tell>
<io-string value="Hello string"></io-string>
</div>
<div class="demo">
<show-and-tell></show-and-tell>
<io-options></io-options>
</div>
<div class="demo">
<show-and-tell></show-and-tell>
<io-object expanded></io-object>
</div>
<div class="demo">
<show-and-tell></show-and-tell>
<io-inspector></io-inspector>
</div>
<div class="demo" style="height: 200px;">
<show-and-tell></show-and-tell>
<io-menu autoExpand noHide search></io-menu>
</div>
<script>
var object, menu, options, inspector;
window.addEventListener('polymer-ready', function() {
object = document.querySelector('io-object');
options = document.querySelector('io-options');
inspector = document.querySelector('io-inspector');
menu = document.querySelector('io-menu');
object.value = ['one', true, 1];
options.options = [1, 2, ['three', 3]];
options.value = 1;
inspector.value = document.body;
menu.options = [
{ label: 'Options', icon: 'close', options: [
{ label: 'Option1', options: [
{ label: 'Suboption1', action: function() { alert('Suboption1'); } },
{ label: 'Suboption2', action: function(msg) { alert(msg); }, arguments: ['Suboption2'] },
{ label: 'Suboption3', action: function(msg1, msg2) { alert(msg1 + msg2); }, arguments: ['Suboption', '3'] }
] },
{ label: 'Option2', options: [
{ label: 'Suboption4', action: alert, arguments: ['Suboption4'] },
{ label: 'Suboption5', action: alert, arguments: ['Suboption', '5'] },
{ label: 'Suboption6', action: alert, arguments: 'Suboption 6' }
] },
{ label: 'Option3', options: [
{ label: 'suboption7' },
{ label: 'suboption8' },
{ label: 'suboption9' }
] }
] },
{ type: 'divider' },
{ label: 'Suboptions', autoExpand: false, options: [
{ label: 'Suboption1', options: [
{ label: 'Suboption2', horizontal: true, options: [
{ label: 'suboption3a' },
{ label: 'suboption3b' },
{ label: 'suboption3c' },
{ label: 'Suboption3d', options: [
{ label: 'Suboption4', options: [
{ label: 'Suboption5', options: [
{ label: 'Suboption6' }
] }
] }
] }
] }
] }
] }
];
});
setTimeout(function(){
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-53420116-1', 'auto');
ga('send', 'pageview');
},1000);
</script>
</body>
</html>