Skip to content

Instantly share code, notes, and snippets.

@mgenov
Last active August 29, 2015 14:08
Show Gist options
  • Save mgenov/5157b792c8e334639436 to your computer and use it in GitHub Desktop.
Save mgenov/5157b792c8e334639436 to your computer and use it in GitHub Desktop.
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.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-menu/core-submenu.html">
<link rel="import" href="../paper-slider/paper-slider.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
box-sizing: border-box;
}
#core_scaffold {
position: absolute;
top: 0px;
right: 0px;
bottom: 0px;
left: 0px;
}
#core_header_panel {
background-color: rgb(255, 255, 255);
}
#core_toolbar {
color: rgb(255, 255, 255);
background-color: rgb(79, 125, 201);
}
#core_menu {
font-size: 16px;
}
#paper_slider {
left: 430px;
top: 130px;
position: absolute;
}
#paper_slider1 {
left: 230px;
top: 100px;
position: absolute;
}
</style>
<core-scaffold id="core_scaffold">
<core-header-panel mode="seamed" id="core_header_panel" navigation flex>
<core-toolbar id="core_toolbar"></core-toolbar>
<core-menu selected="Осветление" valueattr="label" selectedindex="0" id="core_menu" theme="core-light-theme">
<core-item id="lights" icon="settings" label="Осветление" horizontal center layout active></core-item>
<core-item id="clima" icon="settings" label="Климатизация" horizontal center layout></core-item>
</core-menu>
</core-header-panel>
<div id="div" tool>{{ counter }}</div>
<paper-slider value="65" id="paper_slider" on-tap="{{ updateValue }}"></paper-slider>
<paper-slider value="39" id="paper_slider1"></paper-slider>
<say-hello name="John"></say-hello>
<button on-tap="{{ updateValue }}">Increment</button>
</core-scaffold>
</template>
<script>
Polymer({
counter: 0,
ready: function() {
this.addEventListener('said-hello', function(e) {
alert('Said hi to ' + e.detail.name + ' from ' + e.target.localName);
});
},
updateValue: function () {
this.fire('said-hello', {name: "Miroslav", "email": "[email protected]"});
this.counter++;
}
});
</script>
</polymer-element>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment