Skip to content

Instantly share code, notes, and snippets.

@tlimpanont
Created November 26, 2014 13:10
Show Gist options
  • Save tlimpanont/bb8ae62781de552b9691 to your computer and use it in GitHub Desktop.
Save tlimpanont/bb8ae62781de552b9691 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">
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
box-sizing: border-box;
}
#core_animated_pages {
width: 100%;
height: 100%;
overflow: hidden;
left: 0px;
top: 0px;
position: absolute;
background-color: rgb(238, 238, 238);
}
.upper {
padding: 20px;
background: rgb(233, 150, 122);
}
.under {
width: 100%;
background: rgb(72, 61, 139);
}
h1 {
font-size: 3em;
}
p {
text-align: center;
}
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-button {
padding: 10px;
color: white;
background: olive;
}
paper-fab {
margin: 10px;
}
.no_text {
color: white;
font-size: 20px;
}
#section {
width: 100%;
height: 100%;
}
#section1 {
width: 100%;
height: 100%;
}
.buy {
background: rgb(30, 144, 255);
}
#paper_button1 {
border-top-left-radius: 3px;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
border-bottom-left-radius: 3px;
-webkit-transform-origin: 0px 0px;
}
</style>
<core-animated-pages transitions=" hero-transition cross-fade-all" lastselected="2" selectedindex="0" notap id="core_animated_pages">
<section id="section" vertical layout active>
<div class="upper" flex vertical layout center>
<h1 id="h1">Do you think you can change the world?</h1>
<core-card vertical layout center center-justified>
<paper-button raised id="paper_button1" on-click="whyNot" hero-id="whynot" hero>Yeah, why not!</paper-button>
</core-card>
</div>
<div class="under" horizontal layout end-justified>
<div vertical layout center-justified>
<span id="span" class="no_text">No, I'm not Obama</span>
</div>
<div>
<paper-fab icon="av:play-arrow" id="paper_fab" hero-id="notobama" hero></paper-fab>
</div>
</div>
</section>
<section id="section1" vertical layout>
<div class="upper" flex vertical layout center>
<h1>You're crazy! Go eat some spacecake!</h1>
<core-card vertical layout center center-justified>
<paper-button raised id="paper_button" class="buy">Buy me spacecake!</paper-button>
</core-card>
</div>
<div class="under" horizontal layout end-justified>
<div vertical layout center-justified>
<span id="span" class="no_text">Please reconsider your answer</span>
</div>
<div>
<paper-fab icon="arrow-back" id="paper_fab" hero-id="whynot" hero></paper-fab>
</div>
</div>
</section>
<section id="section2" vertical layout>
<div class="upper" flex vertical layout center>
<core-card vertical layout center center-justified hero-id="notobama" hero>
<h1>Well that's a great self-reflection!</h1>
</core-card>
</div>
</section>
</core-animated-pages>
</template>
<script>
Polymer({
whyNot: function (event) {
alert(event.type);
}
});
</script>
</polymer-element>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment