Last active
August 29, 2015 14:16
-
-
Save banksean/603d58fa423b1a028474 to your computer and use it in GitHub Desktop.
designer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../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_drawer_panel { | |
position: absolute; | |
top: 0px; | |
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 transition id="drawerPanel" touch-action selected="main"> | |
<core-header-panel drawer> | |
<core-toolbar id="navheader"> | |
<span>Menu</span> | |
</core-toolbar> | |
<core-menu> | |
<core-item label="One" horizontal center laytout class="core-selected" active></core-item> | |
<core-item label="Two" horizontal center laytout></core-item> | |
</core-menu> | |
</core-header-panel> | |
<core-header-panel main> | |
<core-toolbar id="mainheader"> | |
<paper-icon-button id="navicon" on-tap="{{ toggleDrawer }}" icon="menu" role="button" tabindex="0" aria-label="menu"></paper-icon-button> | |
<span flex>Title</span> | |
</core-toolbar> | |
<div class="content">Main content</div> | |
</core-header-panel> | |
</core-drawer-panel> | |
</template> | |
<script> | |
<!-- [START javascript] | |
document.addEventListener('polymer-ready', function() { | |
var navicon = document.getElementById('navicon'); | |
var drawerPanel = document.getElementById('drawerPanel'); | |
navicon.addEventListener('click', function() { | |
drawerPanel.togglePanel(); | |
}); | |
}); | |
[END javascript] --> | |
Polymer({ | |
toggleDrawer: function() { | |
this.$.drawerPanel.togglePanel(); | |
} | |
}); | |
</script> | |
</polymer-element> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment