Skip to content

Instantly share code, notes, and snippets.

@kenchris
Created June 30, 2014 09:04
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 kenchris/01ff62439c7ae8998251 to your computer and use it in GitHub Desktop.
Save kenchris/01ff62439c7ae8998251 to your computer and use it in GitHub Desktop.
designer
<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-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="../core-animated-pages/transitions/slide-down.html">
<link rel="import" href="../core-animated-pages/transitions/slide-up.html">
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html">
<polymer-element name="my-presenter">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
box-sizing: border-box;
}
#core_menu {
font-size: 16px;
left: 1090px;
top: 370px;
position: absolute;
}
#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);
}
#section1 {
left: 0px;
top: 0px;
position: absolute;
width: 100%;
height: 100%;
}
#section2 {
left: 0px;
top: 0px;
position: absolute;
width: 100%;
height: 100%;
}
#section3 {
left: 0px;
top: 0px;
position: absolute;
width: 100%;
height: 100%;
}
#core_scaffold {
position: absolute;
top: 250px;
right: 0px;
bottom: 0px;
left: 260px;
}
#core_header_panel {
left: 420px;
top: 370px;
position: absolute;
background-color: rgb(255, 255, 255);
}
#core_toolbar1 {
color: rgb(255, 255, 255);
background-color: rgb(79, 125, 201);
}
#core_scroll_header_panel {
width: 380px;
height: 460px;
left: 1670px;
top: 660px;
}
#core_header_panel1 {
width: 100%;
height: 100%;
left: 0px;
top: 0px;
position: absolute;
}
#pages {
width: 100%;
height: 100%;
overflow: hidden;
position: absolute;
top: 0px;
left: 0px;
background-color: rgb(238, 238, 238);
}
#section3 {
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
}
#core_card {
width: 300px;
height: 300px;
border-top-left-radius: 2px;
border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
border-bottom-left-radius: 2px;
box-shadow: rgba(0, 0, 0, 0.0980392) 0px 2px 4px, rgba(0, 0, 0, 0.0980392) 0px 0px 3px;
background-color: rgb(255, 255, 255);
}
#paper_ripple {
width: 300px;
height: 300px;
}
</style>
<core-header-panel mode="standard" id="core_header_panel1">
<core-toolbar id="core_toolbar1">
<core-icon-button icon="menu" id="core_icon_button"></core-icon-button>
<div id="div1" flex>Presenter</div>
<core-icon-button icon="arrow-back" id="back_button" on-click="{{ goBack }}"></core-icon-button>
<core-icon-button icon="arrow-forward" id="forward_button" on-click="{{ goForward }}"></core-icon-button>
</core-toolbar>
<section id="section"></section>
<core-animated-pages transitions="fade slide-up" selected="{{ slide }}" selectedindex="0" notap id="pages">
<section id="section1" layout horizontal center center-justified active>
<div id="div" fade>1</div>
</section>
<section id="section2" layout horizontal center center-justified active>
<core-card id="core_card" slide-up fade layout vertical>
</core-card>
</section>
<section id="section3" layout horizontal center center-justified active>
<div fade>3</div>
</section>
</core-animated-pages>
</core-header-panel>
</template>
<script>
Polymer('my-presenter', {
slide: 0,
noSlide: 0,
ready: function () {
this.slide = 0;
this.noSlides = this.$.pages.children.length;
},
goForward: function () {
this.slide = (this.slide + 1) % this.noSlides;
},
goBack: function () {
this.slide = (this.slide <= 0) ? this.noSlides - 1 : this.slide - 1;
}
});
</script>
</polymer-element>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment