Skip to content

Instantly share code, notes, and snippets.

@lezi
Last active August 29, 2015 14:12
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 lezi/f5b8e06294b7039af04e to your computer and use it in GitHub Desktop.
Save lezi/f5b8e06294b7039af04e 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-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-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-icons/core-icons.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;
top: 0px;
left: 0px;
}
#core_drawer_panel {
position: absolute;
}
#section {
height: 100%;
box-shadow: rgba(0, 0, 0, 0.0980392) 0px 2px 4px, rgba(0, 0, 0, 0.0980392) 0px 0px 3px;
left: 2px;
top: 0px;
position: absolute;
background-color: rgb(199, 200, 219);
}
#section1 {
height: 100%;
box-sizing: border-box;
position: absolute;
width: auto;
background-color: rgb(221, 221, 221);
}
#core_menu {
font-size: 16px;
position: relative;
}
[drawer] {
background-color: rgb(255, 255, 255);
}
[main] > div {
padding: 2em;
}
[drawer] > core-item {
padding: 1em;
}
[main] paper-checkbox {
margin-right: 1em;
}
[main] {
height: 100%;
background-color: rgb(241, 241, 243);
}
[drawer] core-toolbar {
color: rgb(255, 255, 255);
background-color: rgb(79, 125, 201);
}
[main] core-toolbar {
color: rgb(255, 255, 255);
background-color: rgb(82, 110, 156);
}
[main] paper-item {
color: rgb(51, 51, 51);
}
</style>
<core-drawer-panel transition id="core_drawer_panel" touch-action class="core_drawer_panel">
<core-header-panel id="core_header_panel1" drawer>
<core-toolbar id="core_toolbar">Menu</core-toolbar>
<section id="section-menu">
<core-menu selected="0" selectedindex="0" id="core_menu">
<core-submenu opened active id="core_submenu" icon="settings" label="Topics">
<core-item id="core_item" label="Topic 1" horizontal center layout></core-item>
<core-item id="core_item1" label="Topic 2" horizontal center layout></core-item>
</core-submenu>
<core-submenu id="core_submenu1" icon="settings" label="Favorites">
<core-item id="core_item2" label="Favorite 1" horizontal center layout></core-item>
<core-item id="core_item3" label="Favorite 2" horizontal center layout></core-item>
<core-item id="core_item4" label="Favorite 3" horizontal center layout></core-item>
</core-submenu>
</core-menu>
</section>
</core-header-panel>
<core-header-panel id="core_header_panel" main>
<core-toolbar id="core_toolbar1">
<paper-icon-button icon="menu" id="paper_icon_button" on-click="{{ toggleDrawer }}"></paper-icon-button>
<span id="span" flex>System</span>
<paper-icon-button icon="search" id="paper_icon_button1"></paper-icon-button>
<paper-icon-button icon="more-vert" id="paper_icon_button2"></paper-icon-button>
<paper-menu-button id="paper_menu_button" halign="right">
<paper-icon-button icon="social:person" id="paper_icon_button3"></paper-icon-button>
</paper-menu-button>
<template id="template"></template>
</core-toolbar>
<section id="section-main">Section1</section>
</core-header-panel>
</core-drawer-panel>
</template>
<script>
Polymer({
toggleDrawer: function() {
this.$.core_drawer_panel.togglePanel();
}
});
</script>
</polymer-element>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment