api-console-assets
Version:
This repo only exists to publish api console components to npm
95 lines (73 loc) • 2.65 kB
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>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>app-drawer demo</title>
<script src="../../../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../../../font-roboto/roboto.html">
<link rel="import" href="../../../iron-icons/iron-icons.html">
<link rel="import" href="../../../paper-icon-button/paper-icon-button.html">
<link rel="import" href="../../../paper-item/paper-icon-item.html">
<link rel="import" href="../../demo/sample-content.html">
<link rel="import" href="../../app-toolbar/app-toolbar.html">
<link rel="import" href="../app-drawer.html">
<style is="custom-style">
body {
margin: 0;
font-family: 'Roboto', 'Noto', sans-serif;
background-color: #eee;
}
app-toolbar {
background-color: #4285f4;
color: #fff;
}
app-drawer {
--app-drawer-content-container: {
background-color: #B0BEC5;
}
}
.drawer-contents {
height: 100%;
overflow-y: auto;
}
</style>
</head>
<body>
<template is="dom-bind">
<app-toolbar>
<div main-title></div>
<paper-icon-button icon="menu" on-tap="toggleDrawer"></paper-icon-button>
</app-toolbar>
<sample-content size="100"></sample-content>
<app-drawer id="drawer" align="right" swipe-open>
<div class="drawer-contents">
<template is="dom-repeat" id="menu" items="[[items]]">
<paper-icon-item>
<iron-icon class="grayIcon" icon="[[item]]" item-icon></iron-icon>
<span>[[item]]</span>
</paper-icon-item>
</template>
</div>
</app-drawer>
</template>
<script>
(function(scope) {
scope.toggleDrawer = function() {
scope.$.drawer.toggle();
};
var icons = ['inbox', 'favorite', 'polymer', 'question-answer', 'send', 'archive', 'backup', 'dashboard'];
scope.items = icons.concat(icons).concat(icons);
})(document.querySelector('template[is=dom-bind]'));
</script>
</body>
</html>