Skip to content

Instantly share code, notes, and snippets.

@sfrdmn
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sfrdmn/82cda15fa53b692a46b4 to your computer and use it in GitHub Desktop.
Save sfrdmn/82cda15fa53b692a46b4 to your computer and use it in GitHub Desktop.
designer
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-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;
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
background-color: rgb(250, 250, 250);
}
#section1 {
height: 100%;
box-sizing: border-box;
background-color: rgb(221, 221, 221);
}
#core_icon_button {
left: 16px;
top: 12px;
position: absolute;
}
#core_icon_button1 {
left: 66px;
top: 12px;
position: absolute;
}
#core_menu {
font-size: 16px;
left: 52px;
top: 42px;
position: absolute;
}
#core_submenu1 {
left: 0px;
top: 0px;
position: absolute;
}
#core_menu_button {
left: 0px;
top: 10px;
position: absolute;
}
</style>
<core-drawer-panel transition selected="main" id="core_drawer_panel" touch-action>
<section id="drawer" drawer>
<core-menu selected="0" selectedindex="0" id="core_menu">
<core-item id="settings-btn" icon="settings" label="Settings" horizontal center layout active>
</core-item>
</core-menu>
</section>
<section id="section1" main>
<core-icon-button icon="menu" id="drawer-btn" theme="core-light-theme"></core-icon-button>
<core-icon-button icon="announcement" id="alert-btn" theme="core-light-theme"></core-icon-button>
</section>
</core-drawer-panel>
</template>
<script>
Polymer({
ready: function () {
var drawer = document.getElementById('drawer')
var drawerBtn = document.getElementById('drawer-btn')
drawerBtn.addEventListener('click', function(e) {
drawer.togglePanel()
})
}
});
</script>
</polymer-element>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment