Last active
August 29, 2015 14:19
-
-
Save smolleyes/4f18e465129e111657cc to your computer and use it in GitHub Desktop.
designer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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-pages/core-pages.html"> | |
<link rel="import" href="../paper-input/paper-input.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="core-stgui"> | |
<template> | |
<style> | |
:host { | |
width: 100%; | |
box-sizing: border-box; | |
height: 100%; | |
} | |
#core_header_panel { | |
width: 100%; | |
height: 100%; | |
left: 0px; | |
top: 0px; | |
position: absolute; | |
} | |
#core_toolbar { | |
color: rgb(255, 255, 255); | |
background-color: rgb(79, 125, 201); | |
} | |
#section { | |
height: 100%; | |
top: 0px; | |
left: 0px; | |
width: 100%; | |
opacity: 1; | |
position: absolute; | |
background: linear-gradient(rgb(214, 227, 231), rgb(173, 216, 230)) rgb(255, 255, 255); | |
} | |
#username { | |
width: 100%; | |
padding: 10px; | |
} | |
#password { | |
margin-top:10px; | |
width: 100%; | |
} | |
#paper_input_id { | |
width: 100%; | |
padding: 10px; | |
} | |
#paper_input_passwd { | |
width: 100%; | |
padding: 10px; | |
} | |
#paper_ripple { | |
width: 300px; | |
height: 300px; | |
background-color: rgb(255, 255, 255); | |
} | |
#core_icon1 { | |
height: 64px; | |
width: 64px; | |
margin: 0px 8px; | |
border-radius: 50%; | |
overflow: hidden; | |
} | |
#core_icon2 { | |
height: 64px; | |
width: 64px; | |
border-radius: 50%; | |
overflow: hidden; | |
} | |
#core_pages { | |
width: 100%; | |
height: 100%; | |
border: 1px solid silver; | |
position: absolute; | |
top: 0px; | |
left: 0px; | |
} | |
#section1 { | |
position: absolute; | |
top: 0px; | |
left: 0px; | |
width: 100%; | |
height: 100%; | |
background-color: rgb(255, 255, 255); | |
} | |
#core_card { | |
width: 300px; | |
height: 200px; | |
border-radius: 2px; | |
box-shadow: rgba(0, 0, 0, 0.0980392) 0px 2px 4px, rgba(0, 0, 0, 0.0980392) 0px 0px 3px; | |
padding: 10px; | |
background-color: rgb(255, 255, 255); | |
} | |
#core_icon_button { | |
left: 1720px; | |
top: 620px; | |
} | |
paper-fab.green { | |
background: rgb(37, 155, 36); | |
} | |
#div1 { | |
width: 100%; | |
height: 100%; | |
} | |
#paper_fab { | |
content: ''; | |
} | |
</style> | |
<core-header-panel mode="waterfall" id="core_header_panel"> | |
<core-toolbar id="core_toolbar"> | |
<div id="div" horizontal layout center center-justified two flex>Connexion</div> | |
</core-toolbar> | |
<section id="section" center-justified vertical layout center> | |
<core-pages selected="0" selectedindex="0" notap id="core_pages" vertical layout center center-justified wrap> | |
<section id="section1" active vertical layout center center-justified> | |
<core-card id="core_card" center start-justified vertical layout> | |
<paper-input label="Identifiant:" floatinglabel id="username" committed></paper-input> | |
<paper-input label="Mot de passe:" floatinglabel id="password" committed type="password" on-tap="{{ showValidateButton }}"></paper-input> | |
<div hidden?="{{isHidden}}" id="div1" vertical layout end end-justified wrap> | |
<paper-fab icon="done" mini id="paper_fab" class="green" title="done" on-tap="{{ validateForm }}"></paper-fab> | |
</div> | |
</core-card> | |
</section> | |
</core-pages> | |
</section> | |
</core-header-panel> | |
</template> | |
<script> | |
Polymer({ | |
isHidden: true, | |
showValidateButton: function () { | |
var username = this.$.username.value; | |
if(username !== "") { | |
this.isHidden = false; | |
} else { | |
this.isHidden = true; | |
} | |
}, | |
validateForm: function () { | |
var username = this.$.username.value; | |
var pass = this.$.password.value; | |
console.log(username,pass) | |
}, | |
error: 'valid' | |
}); | |
</script> | |
</polymer-element> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment