Kanji login sample
by tnhu
HTML
<!-- Page component -->
<div class="page" data-com="Page" data-cfg="{ 'debug': true }" data-lazy="false">
<!--
Stylist component
@see Stylist.js
-->
<div class="view stylist active" data-com="Stylist" data-lazy="false" data-act="mouseenter:preloadStylist">
<button class="bt-feedback" data-act="feedback">Leave feedback</button>
<button class="bt-email" data-act="email|mouseenter:trackingEmail|mouseout:trackingEmail">Email</button>
<button class="bt-call" data-act="call">Call</button>
<button class="bt-profile" data-act="profile">Profile</button>
<div class="view feedback" data-com="Feedback">
<input type="text" class="name" data-act="keydown,keyup:typing"></input>
<p>Message:<textarea></textarea></p>
</div>
</div>
<!--
Blog component. It's ok that this component is not implemented
-->
<div class="view blog" data-com="Blog">
</div>
<!--
Featured component. Kanji does not do anything with a data-lazy="false" component when its class is not available
-->
<div class="view featured" data-com="Featured" data-lazy="false">
</div>
<!--
Wardrope component. It's ok that this component is not implemented
-->
<div class="view wardrope" data-com="Wardrope">
<!-- Kanji notifies an error when interaction happens on this button -->
<button class="bt-request" data-act="click:requestAdvice">Request Outfitting Advice</button>
</div>
<!--
Page's tab actions: same action implementation handles all
@see Page.js
-->
<button class="bt-stylist" data-act="switchView" data-viewid="stylist">Go to Stylist</button>
<button class="bt-blog" data-act="switchView" data-viewid="blog"></button>
<button class="bt-featured" data-act="switchView" data-viewid="featured"></button>
<button class="bt-wardrope" data-act="switchView" data-viewid="wardrope">Go to Wardrope</button>
<!--
...
CSS
/** Page CSS */
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
background: url(https://dl.dropboxusercontent.com/u/7677927/img/trunkclubios/linen-texture.jpg) repeat;
}
.hidden {
display: none;
}
#log {
position: fixed;
bottom: 0;
right: 0;
height: 150px;
width: 400px;
border: 1px solid #333;
padding: 10px;
overflow: auto;
background: rgb(0, 0, 0);
background: rgba(0, 0, 0, 0.6);
}
#log p {
font-size: 12px;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
color: green;
margin: 0 0px 8px 0;
}
#log p.title {
color: yellow;
font-weight: bold;
border-bottom: 1px solid #666;
}
button {
background: transparent;
position: absolute;
text-indent: -9999px;
}
button:active {
border: 1px solid green;
}
/** Component CSS */
.page, .view {
width: 333px;
height: 500px;
position: absolute;
margin: auto;
top: 0; left: 0; bottom: 0; right: 0;
display: none;
}
.page {
display: block;
box-shadow: 0px 5px 25px #000;
}
.view.active {
display: block;
}
.stylist {
background: url(https://dl.dropboxusercontent.com/u/7677927/img/trunkclubios/1.png) no-repeat;
}
.blog {
background: url(https://dl.dropboxusercontent.com/u/7677927/img/trunkclubios/2.png) no-repeat;
}
.featured {
background: url(https://dl.dropboxusercontent.com/u/7677927/img/trunkclubios/3.png) no-repeat;
}
.wardrope {
background: url(https://dl.dropboxusercontent.com/u/7677927/img/trunkclubios/4.png) no-repeat;
}
.bt-stylist, .bt-blog, .bt-featured, .bt-wardrope {
bottom: 0;
height: 50px;
width: 84px;
padding: 0;
margin: 0;
border: none;
}
.bt-stylist {
left: 0;
}
.bt-blog {
left: 84px;
}
.bt-featured {
left: 168px;
}
.bt-wardrope {
left: 250px;
}
.bt-feedback {
bottom: 64px;
height: 46px;
left: 10px;
width: 313px;
border-radius: 4px;
}
.bt-email {
bottom: 229px;
height: 40px;
right: 12px;
width: 40px;
border-radius: 40px;
}
.bt-call {
bottom: 229px;
...