Skip to content

Instantly share code, notes, and snippets.

@timeu
Last active August 29, 2015 14:07
Show Gist options
  • Save timeu/bb25d32a5b1eef0ac5eb to your computer and use it in GitHub Desktop.
Save timeu/bb25d32a5b1eef0ac5eb to your computer and use it in GitHub Desktop.
designer
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.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/slide-from-right.html">
<link rel="import" href="../core-selector/core-selector.html">
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../paper-shadow/paper-shadow.html">
<link rel="import" href="../paper-icon-button/paper-icon-button.html">
<polymer-element name="analysis-wizard" vertical="" layout="">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
box-sizing: border-box;
top: 0px;
left: 0px;
}
#section {
width: 100%;
height: 100%;
border: 5px solid rgb(204, 204, 204);
left: 0px;
top: 0px;
position: absolute;
}
#paper_tabs {
color: rgb(255, 255, 255);
box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 2px;
background-color: rgb(0, 188, 212);
}
#genotype_upload, #genotype_cloud {
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);
}
#genotype_pages {
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
}
#step_pages {
height: 100%;
width: 100%;
}
core-selector {
height: 100%;
}
#core_selector {
width: 100%;
height: 50px;
left: 930px;
top: 600px;
position: absolute;
}
core-icon {
height:100px !important;
width:100px !important;
color:white;
}
core-card > div {
font-size:20px;
color:white;
}
#core_card_hero {
height: 300px;
}
.back-button {
position:absolute;
top:8px;
left:8px;
}
</style>
<section id="wizardstepbar" layout vertical>
<paper-tabs noink selected="{{ selected }}" id="paper_tabs">
<paper-tab id="sb1" active>Step 1 - Genotype</paper-tab>
<paper-tab id="sb2">Step 2 - Ancestry</paper-tab>
<paper-tab id="sb3">Step 3 - Risk</paper-tab>
</paper-tabs>
</section>
<section id="main" flex relative>
<core-animated-pages transitions="slide-from-right" selected="{{ selected }}" notap id="step_pages" fit>
<section id="step1" layout vertical active>
<div id="div1" slide-from-right flex layout vertical>
<core-animated-pages transitions="hero-transition cross-fade cross-fade-delayed" selected="{{genotypeType != '' ? 1 : 0 }}" on-core-animated-pages-transition-end="{{transitionend}}" notap id="genotype_pages">
<section id="genotype_type">
<core-selector selected="{{ genotypeType }}" layout horizontal around-justified active style="margin-top:50px;">
<core-card hero?="{{genotypeType == 'upload' || lastgenotypeType == 'upload'}}" cross-fade?="{{genotypeType !='upload'}}" hero-id="genotypeType" id="genotype_upload" name="upload" layout vertical center-justified center style="background-color:orange;">
<paper-shadow z="3"></paper-shadow>
<core-icon icon="file-upload" class=""></core-icon>
<div id="div2">Upload</div>
</core-card>
<core-card hero?="{{genotypeType == 'cloud' || lastgenotypeType == 'cloud'}}" cross-fade?="{{genotypeType !='cloud'}}" hero-id="genotypeType" id="genotype_cloud" name="cloud" layout vertical center-justified center style="background-color:green;">
<paper-shadow z="3"></paper-shadow>
<core-icon icon="cloud"></core-icon>
<div>Cloud</div>
</core-card>
</core-selector>
</section>
<section id="genotype_detail">
<div relative>
<paper-icon-button class="back-button " icon="arrow-back" on-tap="{{ backAction }}" role="button" tabindex="0" aria-label="arrow-back" cross-fade-delayed=""></paper-icon-button>
<core-card hero hero-id="genotypeType" id="core_card_hero" layout vertical center-justified center style="background-color:{{genotypeType == 'upload' ? 'orange' : 'green'}};">
<core-icon icon="{{genotypeType == 'upload' ? 'file-upload' :'cloud' }}" class=""></core-icon>
<div id="div2">{{genotypeType == 'upload' ? 'Upload' : 'Cloud'}}</div>
</core-card>
</div>
<div>
DETAIL
</div>
</section>
</core-animated-pages>
</div>
</section>
<section id="step2">
<div slide-from-right>Ancestery</div>
</section>
<section id="step3">
<div slide-from-right>Risk prediction</div>
</section>
</core-animated-pages>
</section>
</template>
<script>
Polymer({
selected: 0,
genotypeType: '',
lastgenotypeType: '',
backAction: function() {
this.lastgenotypeType = this.genotypeType;
this.genotypeType = '';
},
transitionend : function() {
if (this.lastgenotypeType) {
this.lastgenotypeType = '';
}
}
});
</script>
</polymer-element>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment