Skip to content

Instantly share code, notes, and snippets.

@hinogi
Created July 10, 2014 11:25
Show Gist options
  • Save hinogi/f9a754434c5ec726e326 to your computer and use it in GitHub Desktop.
Save hinogi/f9a754434c5ec726e326 to your computer and use it in GitHub Desktop.
designer
<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-element">
<template>
<style>
#hero1 {
position: absolute;
top: 0px;
left: 0px;
width: 300px;
height: 300px;
background-color: orange;
}
#hero2 {
position: absolute;
top: 200px;
left: 300px;
width: 300px;
height: 300px;
background-color: orange;
}
#bottom1, #bottom2 {
position: absolute;
bottom: 0px;
top: 0px;
left: 0px;
height: 50px;
}
#bottom1 {
background-color: blue;
}
#bottom2 {
background-color: green;
}
#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);
}
</style>
<core-animated-pages transitions="cross-fade" selected="{{ page }}" selectedindex="0" notap>
<section id="page1" active on-tap="{{ one }}">
<core-card id="core_card" layout vertical>test01</core-card>
</section>
<section id="page2" on-tap="{{ two }}">
<core-card id="core_card1" layout vertical>test02</core-card>
</section>
</core-animated-pages>
</template>
<script>
Polymer('my-element', {
page: 0,
one: function (){
this.selected = 2;
},
two: function (){
this.selected = 1;
}
});
</script>
</polymer-element>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment