common page & animation

This commit is contained in:
life
2014-09-23 18:56:04 +08:00
parent 2221f146de
commit cff6efde91
19 changed files with 1516 additions and 172 deletions

View File

@@ -1,51 +1,57 @@
{{template "home/header_box.html" .}}
<section id="box">
<section id="box" class="animated fadeInUp">
<!--
<div>
<a class="back" href="javascript:history.go(-1);" tabindex="-1">←Back</a>
</div>
-->
<div>
<h1>leanote | {{msg . "login"}}</h1>
<form class="form-inline" id="boxForm" >
<div class="alert alert-danger" id="loginMsg"></div>
<table>
<tr>
<td>
<label for="email">{{msg . "usernameOrEmail"}}</label>
<input type="text" class="form-control" id="email" name="email" value="{{.email}}">
</td>
</tr>
<tr>
<td>
<label for="pwd">{{msg . "password"}}</label>
<input type="password" class="form-control" id="pwd" name="pwd">
</td>
</tr>
<tr>
<td>
<button id="loginBtn" class="btn btn-success" style="width: 100%">{{msg . "login"}}</button>
<br />
<a href="/findPassword">{{msg . "forgetPassword"}}</a>
{{if .openRegister}}
<br />
<a href="/register">{{msg . "register"}}</a>
{{msg . "or"}}
<a href="/demo">{{msg . "try"}}</a>
<div style="border-top: 1px dashed #666;margin:2px 0">
{{msg . "3th"}}: <a id="github">github<i class="fa fa-github"></i></a>
<span id="thirdLoginLoading" style="display: none"> <img src="/images/loading-a-20-2.gif" />正在登录...</span>
</div>
{{end}}
</td>
</tr>
</table>
</form>
<div id="quickLinks">
<a href="/index">{{msg . "home"}}</a>
<h1 id="logo">leanote</h1>
<div id="boxForm">
<div id="boxHeader">{{msg . "login"}}</div>
<form>
<div class="alert alert-danger" id="loginMsg"></div>
<div class="form-group">
<label class="control-label">{{msg . "usernameOrEmail"}}</label>
<input type="text" class="form-control" id="email" name="email" value="{{.email}}">
</div>
<div class="form-group">
<label class="control-label">{{msg . "password"}}</label>
<input type="password" class="form-control" id="pwd" name="pwd">
</div>
<div class="clearfix">
<a href="/findPassword" class="pull-right m-t-xs"><small>{{msg . "forgetPassword"}}</small></a>
<button id="loginBtn" class="btn btn-success">{{msg . "login"}}</button>
</div>
<div class="line line-dashed"></div>
<a href="#" id="github" class="btn btn-github btn-block m-b-sm"><i class="fa fa-github pull-left"></i>{{msg . "use"}} Github</a>
<div class="line line-dashed"></div>
<p class="text-muted text-center"><small>{{msg . "hasAcount"}}</small></p>
{{if .openRegister}}
<a href="/register" class="btn btn-default btn-block">{{msg . "register"}}</a>
{{end}}
{{msg . "or"}}
<a id="loginBtn" href="/demo" class="btn btn-default btn-block">{{msg . "try"}}</a>
</form>
</div>
</div>
</section>
<div id="boxFooter">
<p>
<a href="/index">{{msg . "home"}}</a>
</p>
<p>
<a href="/index">leanote</a> © 2014
</p>
</div>
<script src="/js/jquery-1.9.0.min.js"></script>
<script src="/js/bootstrap.js"></script>
@@ -98,7 +104,7 @@ $(function() {
// github
$("#github").click(function() {
$("#thirdLoginLoading").show();
$(this).button("loading");
location.href="https://github.com/login/oauth/authorize?access_type=&approval_prompt=&client_id=3790fbf1fc14bc6c5d85&redirect_uri=http%3A%2F%2Fleanote.com%2Foauth%2FgithubCallback&response_type=code&scope=user&state=";
});
});