Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
designer
<script
src="/components/platform/platform.js">
</script>
<link rel="import"
href="/components/core-toolbar/core-toolbar.html">
<link rel="import"
href="/components/core-menu/core-menu.html">
<link rel="import"
href="/components/core-item/core-item.html">
<link rel="import"
href="/components/core-header-panel/core-header-panel.html">
<link rel="import"
href="/components/core-drawer-panel/core-drawer-panel.html">
<link rel="import"
href="/components/core-icons/core-icons.html">
<link rel="import"
href="/components/paper-icon-button/paper-icon-button.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
box-sizing: border-box;
}
#core_toolbar {
right: 0px;
left: 0px;
color: rgb(255, 255, 255);
fill: rgb(255, 255, 255);
top: 0px;
position: absolute;
background-color: rgb(79, 125, 201);
}
#core_drawer_panel {
position: absolute;
top: 60px;
right: 0px;
bottom: 0px;
left: 0px;
}
#section {
box-shadow: rgba(0, 0, 0, 0.0980392) 0px 2px 4px, rgba(0, 0, 0, 0.0980392) 0px 0px 3px;
background-color: rgb(250, 250, 250);
}
#section1 {
height: 100%;
box-sizing: border-box;
background-color: rgb(221, 221, 221);
}
</style>
<core-drawer-panel id="drawerPanel">
<core-header-panel drawer>
<core-toolbar id="navheader'">
<span>Menu</span>
</core-toolbar>
<core-menu selected="1" selectedindex="1">
<core-item label="One" horizontal center layout></core-item>
<core-item label="Two" id="core_item" horizontal center layout active></core-item>
</core-menu>
</core-header-panel>
<core-header-panel id="core_header_panel" main>
<core-toolbar id="mainheader">
<paper-icon-button icon="menu" id="navicon"></paper-icon-button>
<span flex>Title</span>
</core-toolbar>
<div class="content">
If drawer is hidden, press button to display drawer.
</div>
</core-header-panel>
</core-drawer-panel>
</template>
<script>
Polymer('my-element', {
document.addEventListener('polymer-ready', function() {
var navicon = document.getElementById('navicon');
var drawerPanel = document.getElementById('drawerPanel');
navicon.addEventListener('click', function() {
drawerPanel.togglePanel();
});
});
});
</script>
</polymer-element>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.