summaryrefslogtreecommitdiffstats
path: root/third_party/polymer/components/core-style/demo.html
blob: 0681c6cca706632380a04e6ea9106a5e041564a1 (plain)
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
<!DOCTYPE html>
<!--
Copyright 2013 The Polymer Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<html>
<head>
  <title>core-style</title>
  <script src="../platform/platform.js"></script>

  <link rel="import" href="elements.html">
  <link rel="import" href="my-theme.html">
  
</head>
<body unresolved fullbleed vertical layout>
  <core-style ref="main"></core-style>

  <template is="auto-binding">
    <my-toolbar>
      <span flex>core-style</span>
      <input type="color" value="{{g.theme.colorOne}}">
      <input type="color" value="{{g.theme.colorTwo}}">
      <input type="color" value="{{g.theme.colorThree}}">
      <input type="range" min="1" max="8" value="{{g.columns}}">
      <button>A button</button>
    </my-toolbar>
    <section flex horizontal wrap layout>
      <template repeat="{{item in items}}">
        <my-panel>{{item}}</my-panel>
      </template>
    </section>
  </template>

  <script>
  (function() {

    addEventListener('polymer-ready', function() {
      var items = [];
        for (var i=0; i < 100; i++) {
          items.push(i);
        }

      CoreStyle.g.items = items;

      addEventListener('template-bound', function(e) {
        e.target.g = CoreStyle.g;
        e.target.items = items;
      });
    });

  })();
  </script>

</body>
</html>