Blame view

bower_components/iron-dropdown/demo/index.html 4.18 KB
73bcce88   luigser   COMPONENTS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  <!doctype html>
  <!--
  @license
  Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
  This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  Code distributed by Google as part of the polymer project is also
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  -->
  <html>
  <head>
  
    <title>iron-dropdown</title>
  
    <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
    <link rel="import" href="../../iron-image/iron-image.html">
    <link rel="import" href="../../paper-styles/demo-pages.html">
    <link rel="import" href="x-select.html">
    <style>
  
c5169e0e   Renato De Donato   a new hope
22
23
24
25
      ul {
        display: block;
        position: relative;
        background-color: #fff;
73bcce88   luigser   COMPONENTS
26
        box-shadow: 0px 2px 6px #ccc;
c5169e0e   Renato De Donato   a new hope
27
28
        margin: 0.25em 0;
        padding: 0.25em;
73bcce88   luigser   COMPONENTS
29
        border-radius: 3px;
73bcce88   luigser   COMPONENTS
30
31
      }
  
c5169e0e   Renato De Donato   a new hope
32
33
      [vertical-align="top"] ul {
        margin-top: 0;
73bcce88   luigser   COMPONENTS
34
35
      }
  
c5169e0e   Renato De Donato   a new hope
36
37
      [vertical-align="bottom"] ul {
        margin-bottom: 0;
73bcce88   luigser   COMPONENTS
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
      }
  
      li {
        display: block;
        position: relative;
        margin: 0;
        padding: 0;
      }
  
      a {
        display: block;
        position: relative;
        padding: 1em;
        text-decoration: none;
      }
  
      li:not(:last-of-type) {
        border-bottom: 1px solid #eee;
      }
  
      a:hover {
        text-decoration: underline;
      }
  
c5169e0e   Renato De Donato   a new hope
62
63
64
65
66
67
68
69
70
71
72
73
74
      button {
        border: 1px solid #ccc;
        background-color: #eee;
        padding: 1em;
        border-radius: 3px;
        cursor: pointer;
      }
  
      button:focus {
        outline: none;
        border-color: blue;
      }
  
73bcce88   luigser   COMPONENTS
75
76
77
78
79
80
81
82
83
84
      iron-image {
        padding: 1em;
        background-color: #fff;
        box-shadow: 0px 2px 6px #ccc;
        border-radius: 3px;
      }
    </style>
  </head>
  <body>
    <template is="dom-bind" id="Demo">
c5169e0e   Renato De Donato   a new hope
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
      <div class="horizontal-section flex layout horizontal">
        <x-select>
          <button class="dropdown-trigger">Basic</button>
          <ul class="dropdown-content" tabindex="0">
            <template is="dom-repeat" items="[[letters]]">
              <li><a href="javascript:void(0)">[[item]]</a></li>
            </template>
          </ul>
        </x-select>
        <x-select>
          <button class="dropdown-trigger">Overflowing</button>
          <ul class="dropdown-content" tabindex="0">
            <template is="dom-repeat" items="[[dinosaurs]]">
              <li><a href="javascript:void(0)">[[item]]</a></li>
            </template>
          </ul>
        </x-select>
        <x-select vertical-align="bottom">
          <button class="dropdown-trigger">Bottom-left Aligned</button>
          <ul class="dropdown-content" tabindex="0">
            <template is="dom-repeat" items="[[letters]]">
              <li><a href="javascript:void(0)">[[item]]</a></li>
            </template>
          </ul>
        </x-select>
        <x-select horizontal-align="right" vertical-align="top">
          <button class="dropdown-trigger">Top-right Aligned</button>
          <ul class="dropdown-content" tabindex="0">
            <template is="dom-repeat" items="[[dinosaurs]]">
              <li><a href="javascript:void(0)">[[item]]</a></li>
            </template>
          </ul>
        </x-select>
        <x-select horizontal-align="left" vertical-align="top">
          <button class="dropdown-trigger">Alternate Content</button>
          <iron-image class="dropdown-content" src="../../iron-image/demo/polymer.svg"></iron-image>
        </x-select>
73bcce88   luigser   COMPONENTS
122
123
124
125
      </div>
    </template>
  
    <script>
c5169e0e   Renato De Donato   a new hope
126
127
128
129
130
131
132
      Demo.letters = [
        'alpha',
        'beta',
        'gamma',
        'delta',
        'epsilon'
      ];
73bcce88   luigser   COMPONENTS
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
      Demo.dinosaurs = [
        'allosaurus',
        'brontosaurus',
        'carcharodontosaurus',
        'diplodocus',
        'ekrixinatosaurus',
        'fukuiraptor',
        'gallimimus',
        'hadrosaurus',
        'iguanodon',
        'jainosaurus',
        'kritosaurus',
        'liaoceratops',
        'megalosaurus',
        'nemegtosaurus',
        'ornithomimus',
        'protoceratops',
        'quetecsaurus',
        'rajasaurus',
        'stegosaurus',
        'triceratops',
        'utahraptor',
        'vulcanodon',
        'wannanosaurus',
        'xenoceratops',
        'yandusaurus',
        'zephyrosaurus'
      ];
    </script>
  </body>
  </html>