OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <!-- | 2 <!-- |
3 @license | 3 @license |
4 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | 4 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. |
5 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt | 5 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt |
6 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | 6 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt |
7 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt | 7 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt |
8 Code distributed by Google as part of the polymer project is also | 8 Code distributed by Google as part of the polymer project is also |
9 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt | 9 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt |
10 --> | 10 --> |
11 <html> | 11 <html> |
12 <head> | 12 <head> |
13 <title>iron-icon demo</title> | 13 <title>iron-icon demo</title> |
14 <script src="../../webcomponentsjs/webcomponents-lite.js"></script> | 14 <script src="../../webcomponentsjs/webcomponents-lite.js"></script> |
15 <link rel="import" href="../iron-icon.html"> | 15 <link rel="import" href="../iron-icon.html"> |
16 <link rel="import" href="../../iron-iconset/iron-iconset.html"> | 16 <link rel="import" href="../../paper-styles/demo-pages.html" > |
17 <link href="../../paper-styles/demo-pages.html" rel="import"> | |
18 | 17 |
19 <style is="custom-style"> | 18 <style is="custom-style"> |
| 19 #loading_message { |
| 20 color: #444; |
| 21 margin-bottom: 16px; |
| 22 } |
20 .vertical-section h4 { | 23 .vertical-section h4 { |
21 border-left: 3px solid var(--paper-grey-300); | 24 border-left: 3px solid var(--paper-grey-300); |
22 padding-left: 10px; | 25 padding-left: 10px; |
23 } | 26 } |
24 | 27 |
25 .vertical-section h4:hover { | 28 .vertical-section h4:hover { |
26 border-left-color: var(--google-blue-700); | 29 border-left-color: var(--google-blue-700); |
27 } | 30 } |
28 </style> | 31 </style> |
29 </head> | 32 </head> |
30 <body> | 33 <body> |
31 <div class="vertical-section-container centered"> | 34 <div class="vertical-section-container centered"> |
32 <h4>This demo is for a single <iron-icon>. If you're looking for the | 35 <h4> |
33 whole set of available icons, check out the <iron-icons> demo.</h4> | 36 This demo is for an <iron-icon> with an asynchronously loaded |
| 37 iconset. |
| 38 </h4> |
| 39 |
| 40 <div id='loading_message'>Waiting to load iconset...</div> |
34 | 41 |
35 <div class="vertical-section"> | 42 <div class="vertical-section"> |
36 <!-- iron-icon using a iron-iconset as its icon source --> | 43 <!-- iron-icon using a iron-iconset as its icon source --> |
37 <iron-iconset name="example" icons="location" src="location.png" size="24"
width="24"></iron-iconset> | 44 <iron-iconset name="example" icons="location" src="location.png" size="24"
width="24"></iron-iconset> |
38 | 45 |
39 <h4><iron-icon icon="example:location"></h4> | 46 <h4><iron-icon icon="example:location"></h4> |
40 <iron-icon icon="example:location"></iron-icon> | 47 <iron-icon icon="example:location"></iron-icon> |
41 | 48 |
42 <!-- iron-icon using an image url as its icon source --> | |
43 <h4><iron-icon src="location.png"></h4> | |
44 <iron-icon src="location.png"></iron-icon> | |
45 </div> | 49 </div> |
46 </div> | 50 </div> |
| 51 <script> |
| 52 setTimeout(function() { |
| 53 // Import the code that powers the iron-iconset asynchronously |
| 54 var linkElem = document.createElement('link'); |
| 55 linkElem.setAttribute('rel', 'import'); |
| 56 linkElem.setAttribute('href', '../../iron-iconset/iron-iconset.html'); |
| 57 document.head.appendChild(linkElem); |
| 58 document.querySelector('#loading_message').innerText = "Iconset Loaded."; |
| 59 }, 1000); |
| 60 </script> |
47 </body> | 61 </body> |
48 </html> | 62 </html> |
OLD | NEW |