Skip to content
This repository has been archived by the owner on Aug 31, 2024. It is now read-only.

Commit

Permalink
New 2.x demo
Browse files Browse the repository at this point in the history
  • Loading branch information
klan committed Nov 6, 2017
1 parent 5e44fce commit 2ed715b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mdi-iconset-svg",
"version": "2.0.1",
"version": "2.0.2",
"description": "Iconset for the Material Design Icons collection",
"authors": [
"kriss-kross-io <[email protected]> (https://kriss-kross.io)"
Expand Down
32 changes: 18 additions & 14 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<head>
<title>iron-icons demo</title>
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>

<link rel="import" href="../../paper-styles/demo-pages.html">
<link rel="import" href="../../paper-styles/color.html">
<link rel="import" href="../../iron-meta/iron-meta.html">
Expand Down Expand Up @@ -68,29 +69,32 @@

<dom-bind>
<template is="dom-bind" id="scope">
<dom-repeat>
<template is="dom-repeat" id="iconsetRepeat">
<h2>{{item.name}}</h2>
<div class="set">
<template is="dom-repeat" items="{{getIconNames(item)}}">
<span class="container">
<iron-icon icon="{{item}}"></iron-icon>
<div>{{item}}</div>
</span>
</template>
</div>
</template>
</dom-repeat>

<template is="dom-repeat" id="iconsetRepeat" items="[[getIconsets()]]">
<h2>{{item.name}}</h2>
<div class="set">
<template is="dom-repeat" items="[[getIconNames(item)]]">
<span class="container">
<iron-icon icon="[[item]]"></iron-icon>
<div>{{item}}</div>
</span>
</template>
</div>
</template>

</template>
</dom-bind>

<script>
window.addEventListener('WebComponentsReady', function() {
scope.getIconsets = function() {
return new Polymer.IronMeta({type: 'iconset'}).list;
};
scope.getIconNames = function(iconset) {
return iconset.getIconNames();
};
scope.parentNode.getIconsets = scope.getIconsets;
scope.parentNode.getIconNames = scope.getIconNames;
iconsetRepeat.items = new Polymer.IronMeta({type: 'iconset'}).list;
});
</script>
</body>
Expand Down

0 comments on commit 2ed715b

Please sign in to comment.