just for rename
This commit is contained in:
87
app/views/home/find_password.html
Normal file
87
app/views/home/find_password.html
Normal file
@ -0,0 +1,87 @@
|
||||
{{template "home/header_box.html" .}}
|
||||
|
||||
<section id="box" class="animated fadeInUp">
|
||||
<div>
|
||||
<h1 id="logo">leanote</h1>
|
||||
<div id="boxForm">
|
||||
<div id="boxHeader">{{msg . "findPassword"}}</div>
|
||||
<form>
|
||||
<div class="alert alert-danger" id="loginMsg"></div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="email">{{msg . "email"}}</label>
|
||||
<input type="text" class="form-control" id="email" name="email" value="{{.email}}">
|
||||
</div>
|
||||
|
||||
<button id="loginBtn" class="btn btn-success">{{msg . "findPassword"}}</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div id="boxFooter">
|
||||
<p>
|
||||
<a href="/login">{{msg . "login"}}</a>
|
||||
|
||||
<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>
|
||||
<script src="/js/common.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$("#email").focus();
|
||||
if($("#email").val()) {
|
||||
$("#pwd").focus();
|
||||
}
|
||||
function showMsg(msg, id) {
|
||||
$("#loginMsg").html(msg).show();
|
||||
if(id) {
|
||||
$("#" + id).focus();
|
||||
}
|
||||
}
|
||||
function hideMsg() {
|
||||
$("#loginMsg").hide();
|
||||
}
|
||||
$("#loginBtn").click(function(e){
|
||||
e.preventDefault();
|
||||
var email = $("#email").val();
|
||||
if(!email) {
|
||||
showMsg("{{msg . "inputEmail"}}", "email");
|
||||
return;
|
||||
} else {
|
||||
var myreg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
|
||||
if(!myreg.test(email)) {
|
||||
showMsg("{{msg . "wrongEmail"}}", "email");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$("#loginBtn").html("{{msg . "ing"}}...").addClass("disabled");
|
||||
// hideMsg();
|
||||
|
||||
$.post("/doFindPassword", {email: email}, function(e) {
|
||||
$("#loginBtn").html("{{msg . "findPassword"}}").removeClass("disabled");
|
||||
if(e.Ok) {
|
||||
var msg = "{{msg . "findPasswordSendEmailOver"}}";
|
||||
var loginAddress = getEmailLoginAddress(email);
|
||||
if(loginAddress) {
|
||||
msg += ' <a target="_blank" href="' + loginAddress + '">{{msg . "checkEmai"}}</a>';
|
||||
}
|
||||
$("#loginMsg").html(msg).show().removeClass("alert-danger").addClass("alert-success");
|
||||
} else {
|
||||
showMsg(e.Msg, "email");
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
100
app/views/home/find_password2.html
Normal file
100
app/views/home/find_password2.html
Normal file
@ -0,0 +1,100 @@
|
||||
{{template "home/header_box.html" .}}
|
||||
|
||||
<section id="box" class="animated fadeInUp">
|
||||
<div>
|
||||
<h1 id="logo">leanote</h1>
|
||||
<div id="boxForm">
|
||||
<div id="boxHeader">{{msg . "updatePassword"}}</div>
|
||||
<form>
|
||||
<div class="alert alert-danger" id="loginMsg"> </div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="email">{{msg . "email"}}</label>
|
||||
<br />
|
||||
{{.findPwd.Email}}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="pwd">{{msg . "password"}}</label>
|
||||
<input type="password" class="form-control" id="pwd" name="pwd">
|
||||
{{msg . "passwordTips"}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="pwd2">{{msg . "password2"}}</label>
|
||||
<input type="password" class="form-control" id="pwd2" name="pwd2" >
|
||||
</div>
|
||||
<button id="loginBtn" class="btn btn-success">{{msg . "updatePassword"}}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div id="boxFooter">
|
||||
<p>
|
||||
<a href="/login">{{msg . "login"}}</a>
|
||||
|
||||
<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>
|
||||
|
||||
<script>
|
||||
|
||||
$(function() {
|
||||
$("#pwd").focus();
|
||||
function showMsg(msg, id) {
|
||||
$("#loginMsg").html(msg).show();
|
||||
if(id) {
|
||||
$("#" + id).focus();
|
||||
}
|
||||
}
|
||||
function hideMsg() {
|
||||
$("#loginMsg").hide();
|
||||
}
|
||||
$("#loginBtn").click(function(e){
|
||||
e.preventDefault();
|
||||
|
||||
var pwd = $("#pwd").val();
|
||||
var pwd2 = $("#pwd2").val();
|
||||
|
||||
if(!pwd) {
|
||||
showMsg("{{msg . "inputPassword"}}", "pwd");
|
||||
return;
|
||||
} else {
|
||||
if(pwd.length < 6) {
|
||||
showMsg("{{msg . "notGoodPassword"}}", "pwd");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(!pwd2) {
|
||||
showMsg("{{msg . "inputPassword2"}}", "pwd2");
|
||||
return;
|
||||
} else {
|
||||
if(pwd != pwd2) {
|
||||
showMsg("{{msg . "confirmPassword"}}", "pwd2");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$("#loginBtn").html("{{msg . "ing"}}...").addClass("disabled");
|
||||
// hideMsg();
|
||||
|
||||
$.post("/findPasswordUpdate", {pwd: pwd, token: "{{.findPwd.Token}}"}, function(e) {
|
||||
$("#loginBtn").html("{{msg . "updatePassword"}}").removeClass("disabled");
|
||||
if(e.Ok) {
|
||||
$("#loginBtn").html("{{msg . "updatePasswordSuccessRedirectToLogin"}}");
|
||||
location.href = "/login?email={{.findPwd.Email}}";
|
||||
} else {
|
||||
showMsg(e.Msg, "pwd");
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
31
app/views/home/find_password2_timeout.html
Normal file
31
app/views/home/find_password2_timeout.html
Normal file
@ -0,0 +1,31 @@
|
||||
{{template "home/header_box.html" .}}
|
||||
|
||||
<section id="box" class="animated fadeInUp">
|
||||
<div>
|
||||
<h1 id="logo">leanote</h1>
|
||||
<div id="boxForm">
|
||||
<div id="boxHeader">{{msg . "findPasswordTimeout"}}</div>
|
||||
<form>
|
||||
<div class="alert alert-danger" id="loginMsg" style="display: block">
|
||||
{{msg . "findPasswordTimeout"}}, <a href="/findPassword">{{msg . "reFindPassword"}}</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div id="boxFooter">
|
||||
<p>
|
||||
<a href="/login">{{msg . "login"}}</a>
|
||||
|
||||
<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>
|
||||
</body>
|
||||
</html>
|
24
app/views/home/footer.html
Normal file
24
app/views/home/footer.html
Normal file
@ -0,0 +1,24 @@
|
||||
<div id="footer">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<i class="fa fa-envelope-o fa-3x icon-muted"></i>
|
||||
<h2>Contact</h2>
|
||||
<a href="http://weibo.com/leanotecom" target="_blank"><i class="fa fa-weibo"></i></a>
|
||||
<br />
|
||||
leanote@leanote.com
|
||||
<div id="beian">
|
||||
<a href="http://www.miibeian.gov.cn" target="_blank">沪ICP备14006011号</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<i class="fa fa-globe fa-3x icon-muted"></i>
|
||||
<h2>Join Us</h2>
|
||||
<a href="https://github.com/leanote/leanote">github leanote</a>
|
||||
<br />
|
||||
QQ Group: 158716820
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
111
app/views/home/header.html
Normal file
111
app/views/home/header.html
Normal file
@ -0,0 +1,111 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="keywords" content="leanote,leanote.com">
|
||||
<meta name="description" content="leanote, {{msg $ "moto"}}">
|
||||
<meta name="author" content="leanote">
|
||||
<title>{{.title}}</title>
|
||||
|
||||
<link href="/css/bootstrap.css" rel="stylesheet">
|
||||
<link href="/css/font-awesome-4.2.0/css/font-awesome.css" rel="stylesheet">
|
||||
<link href="/css/index.css" rel="stylesheet">
|
||||
<style>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
function log(o) {
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav id="headerContainer" style="background-color:#fff" class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="/index">
|
||||
<img src="/images/logo/leanote_black.png" id="" title="leanote, {{msg $ "moto"}}"/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav navbar-left">
|
||||
<li><a href="/index#" target="body" class="smooth-scroll">{{msg . "home"}}</a></li>
|
||||
<!--
|
||||
<li><a href="/index#aboutLeanote" target="#aboutLeanote" class="smooth-scroll">{{msg . "aboutLeanote"}}</a> </li>
|
||||
-->
|
||||
<li><a href="/index#download" target="#download" class="smooth-scroll">{{msg . "download"}}</a> </li>
|
||||
<li><a href="/index#donate" target="#donate" class="smooth-scroll">{{msg . "donate"}}</a> </li>
|
||||
<li><a id="leanoteBlog" href="{{.leaUrl}}/index" target="_blank" title="lea++, leanote博客平台" class="">lea++</a></li>
|
||||
<li style="position: relative; margin-right: 3px;">
|
||||
<a href="http://bbs.leanote.com" target="_blank" class="">{{msg . "discussion"}}</a>
|
||||
<div class="red-circle" style=""></div>
|
||||
</li>
|
||||
|
||||
<li id="loginBtns">
|
||||
{{if .userInfo.Email}}
|
||||
{{msg . "hi"}}, {{.userInfo.Username}}
|
||||
<a href="{{$.noteUrl}}">{{msg . "myNote"}}</a>
|
||||
<a href="/logout">{{msg . "logout"}}</a>
|
||||
{{else}}
|
||||
<a href="/login">{{msg . "login"}}</a>
|
||||
{{if .openRegister}}
|
||||
<a href="/register" class="btn-register">{{msg . "register"}}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<!--
|
||||
<div id="headerContainer" style="background-color:#fff" class="navbar-fixed-top">
|
||||
<div class="container" style="clearfix" id="header">
|
||||
<div class="pull-left">
|
||||
<h1>
|
||||
<a href="/index">
|
||||
<img src="/images/logo/leanote_black.png" id="" style="height: 50px" title="leanote, {{msg $ "moto"}}"/>
|
||||
</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<div class="pull-right" id="loginBtns">
|
||||
{{if .userInfo.Email}}
|
||||
{{msg . "hi"}}, {{.userInfo.Username}}
|
||||
<a href="{{$.noteUrl}}">{{msg . "myNote"}}</a>
|
||||
<a href="/logout">{{msg . "logout"}}</a>
|
||||
{{else}}
|
||||
<a href="/login">{{msg . "login"}}</a>
|
||||
{{if .openRegister}}
|
||||
<a href="/register" class="btn-register">{{msg . "register"}}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
<ul id="blogNav" class="pull-right">
|
||||
<li><a href="/index#" target="body" class="smooth-scroll">{{msg . "home"}}</a></li>
|
||||
<li><a href="/index#download" target="#download" class="smooth-scroll">{{msg . "download"}}</a> </li>
|
||||
<li><a href="/index#donate" target="#donate" class="smooth-scroll">{{msg . "donate"}}</a> </li>
|
||||
<li><a id="leanoteBlog" href="{{.leaUrl}}/index" target="_blank" title="lea++, leanote博客平台" class="">lea++</a></li>
|
||||
<li style="position: relative; margin-right: 3px;">
|
||||
<a href="http://bbs.leanote.com" target="_blank" class="">{{msg . "discussion"}}</a>
|
||||
<div style="position: absolute;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
background: red;
|
||||
top: 15px;
|
||||
right: 5px;
|
||||
border-radius: 9px;"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
21
app/views/home/header_box.html
Normal file
21
app/views/home/header_box.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="keywords" content="leanote,leanote.com">
|
||||
<meta name="description" content="leanote, {{msg $ "moto"}}">
|
||||
<meta name="author" content="leanote">
|
||||
<title>{{.title}}</title>
|
||||
|
||||
<link href="/css/bootstrap.css" rel="stylesheet">
|
||||
<link href="/css/font-awesome-4.2.0/css/font-awesome.css" rel="stylesheet">
|
||||
<link href="/css/index.css" rel="stylesheet">
|
||||
<style>
|
||||
html, body {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body id="boxBody">
|
135
app/views/home/index.html
Normal file
135
app/views/home/index.html
Normal file
@ -0,0 +1,135 @@
|
||||
{{template "home/header.html" .}}
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<section>
|
||||
<div class="header">
|
||||
<h2>leanote, {{msg . "moto"}}</h2>
|
||||
<p>{{msg . "moto3"}}</p>
|
||||
<p>{{msg . "moto2"}}</p>
|
||||
|
||||
<div>
|
||||
<a class="btn btn-primary" href="https://github.com/leanote/leanote">{{msg . "fork github"}}</a>
|
||||
|
||||
|
||||
<a class="btn btn-default" href="/demo">{{msg . "try"}}</a>
|
||||
{{if .openRegister}}
|
||||
|
||||
|
||||
OR
|
||||
|
||||
|
||||
<a class="btn btn-default" href="/register">{{msg . "register"}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="preview" style="position: relative;">
|
||||
<div>
|
||||
<div class="img-header">
|
||||
<img src="/images/home/mac-btns.png"/>
|
||||
</div>
|
||||
<img src="/images/home/preview2.png" style="width: 750px;" />
|
||||
</div>
|
||||
<div class="mobile">
|
||||
<div class="mobile-header">
|
||||
<img src="/images/home/mac-dot.png" />
|
||||
</div>
|
||||
<img class="mobile-image" src="/images/home/mobile.png" />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="container" id="aboutLeanote">
|
||||
<h2>{{msg . "aboutLeanote"}}</h2>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<h3>{{msg . "knowledge"}}</h3>
|
||||
<p>{{msg . "knowledgeInfo"}}</p>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<h3>{{msg . "share"}}</h3>
|
||||
<p>{{msg . "shareInfo"}}</p>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<h3>{{msg . "cooperation"}}</h3>
|
||||
<p>{{msg . "cooperationInfo"}}</p>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<h3>{{msg . "blog"}}</h3>
|
||||
<p>{{msg . "blogInfo"}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container" id="download">
|
||||
<h2 style="margin: 20px 0;text-align: center;">{{msg . "download"}}</h2>
|
||||
<div class="row">
|
||||
<div style="width:300px; margin:auto; padding: 10px;">
|
||||
Linux : <a href="https://github.com/leanote/leanote/releases/download/0.4/leanote-linux-v0.4.bin.tar.gz">leanote-linux-v0.4.bin.tar.gz</a> <br />
|
||||
MacOS X : <a href="https://github.com/leanote/leanote/releases/download/0.4/leanote-mac-v0.4.bin.tar.gz">leanote-mac-v0.4.bin.tar.gz</a> <br />
|
||||
<br />
|
||||
<a href="https://github.com/leanote/leanote#3-how-to-install-leanote">{{msg . "howToInstallLeanote"}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container" id="donate">
|
||||
<h2 style="margin: 20px 0;text-align: center;">{{msg . "donate"}}</h2>
|
||||
<div class="row">
|
||||
<div style="width:500px; margin:auto; padding: 10px;">
|
||||
<p>
|
||||
您可以通过支付宝向leanote捐赠, 所捐赠的钱将用来leanote开发.
|
||||
</p>
|
||||
<p>
|
||||
支付宝账号: <b>pay@leanote.com</b>
|
||||
</p>
|
||||
<p>
|
||||
或使用支付宝扫以下二维码捐赠:
|
||||
</p>
|
||||
<p style="text-align: center">
|
||||
<img src="/images/leanote/leanote_alipay.jpg" style="padding: 10px;
|
||||
border: 2px solid #eee;
|
||||
border-radius: 10px;"/>
|
||||
</p>
|
||||
<p>
|
||||
我们会定期将捐赠名单发布在 <a href="http://leanote.com/blog/view/5417ecf81a910828fd000000">捐赠列表</a>
|
||||
</p>
|
||||
<p>
|
||||
感谢您对leanote的支持!
|
||||
</p>
|
||||
|
||||
<hr />
|
||||
|
||||
<p>
|
||||
有任何疑问, 建议或需其它服务或支持, 欢迎联系 <code>leanote@leanote.com</code> 或加入官方QQ群: <code>158716820</code> 谢谢!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{template "home/footer.html"}}
|
||||
|
||||
<script src="/js/jquery-1.9.0.min.js"></script>
|
||||
<script src="/js/bootstrap.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
/*
|
||||
var u = navigator.userAgent;
|
||||
var isMobile = u.indexOf('Android')>-1 || u.indexOf('Linux')>-1;
|
||||
if(isMobile || $("body").width() < 600) {
|
||||
location.href = "/mobile/index";
|
||||
}
|
||||
*/
|
||||
// 平滑滚动
|
||||
$(".smooth-scroll").click(function(e) {
|
||||
e.preventDefault();
|
||||
var t = $(this).attr("target");
|
||||
var targetOffset = $(t).offset().top - 80;
|
||||
$('html,body').animate({scrollTop: targetOffset}, 300);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
140
app/views/home/index_en.html
Normal file
140
app/views/home/index_en.html
Normal file
@ -0,0 +1,140 @@
|
||||
{{template "home/header.html" .}}
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<section>
|
||||
<div class="header">
|
||||
<h2>leanote, {{msg . "moto"}}</h2>
|
||||
<p>{{msg . "moto3"}}</p>
|
||||
<p>
|
||||
Knowledge, Blog, Sharing, Cooperation... all in leanote
|
||||
</p>
|
||||
|
||||
<div>
|
||||
<a class="btn btn-primary" href="https://github.com/leanote/leanote">{{msg . "fork github"}}</a>
|
||||
|
||||
|
||||
<a class="btn btn-default" href="/demo">{{msg . "try"}}</a>
|
||||
{{if .openRegister}}
|
||||
|
||||
|
||||
OR
|
||||
|
||||
|
||||
<a class="btn btn-default" href="/register">{{msg . "register"}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="preview" style="position: relative;">
|
||||
<div>
|
||||
<div class="img-header">
|
||||
<img src="/images/home/mac-btns.png"/>
|
||||
</div>
|
||||
<img src="/images/home/preview2.png" style="width: 750px;" />
|
||||
</div>
|
||||
<div class="mobile">
|
||||
<div class="mobile-header">
|
||||
<img src="/images/home/mac-dot.png" />
|
||||
</div>
|
||||
<img class="mobile-image" src="/images/home/mobile.png" />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="container" id="aboutLeanote">
|
||||
<h2>{{msg . "aboutLeanote"}}</h2>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<h3>{{msg . "knowledge"}}</h3>
|
||||
<p>{{msg . "knowledgeInfo"}}</p>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<h3>{{msg . "share"}}</h3>
|
||||
<p>{{msg . "shareInfo"}}</p>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<h3>{{msg . "cooperation"}}</h3>
|
||||
<p>{{msg . "cooperationInfo"}}</p>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<h3>{{msg . "blog"}}</h3>
|
||||
<p>{{msg . "blogInfo"}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="container" id="download">
|
||||
<h2 style="margin: 20px 0;text-align: center;">{{msg . "download"}}</h2>
|
||||
<div class="row">
|
||||
<div style="width:300px; margin:auto; padding: 10px;">
|
||||
Linux : <a href="https://github.com/leanote/leanote/releases/download/0.4/leanote-linux-v0.4.bin.tar.gz">leanote-linux-v0.4.bin.tar.gz</a> <br />
|
||||
MacOS X : <a href="https://github.com/leanote/leanote/releases/download/0.4/leanote-mac-v0.4.bin.tar.gz">leanote-mac-v0.4.bin.tar.gz</a> <br />
|
||||
<br />
|
||||
<a href="https://github.com/leanote/leanote#3-how-to-install-leanote">{{msg . "howToInstallLeanote"}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="container" id="donate">
|
||||
<h2 style="margin: 20px 0;text-align: center;">{{msg . "donate"}}</h2>
|
||||
<div class="row">
|
||||
<div style="width:500px; margin:auto; padding: 10px;">
|
||||
<p>
|
||||
You can use <a href="http://alipay.com">alipay</a> to donate us, The donated money will be used to develop leanote.
|
||||
</p>
|
||||
<p>
|
||||
Alipay Account: <b>pay@leanote.com</b>
|
||||
</p>
|
||||
<p>
|
||||
Or you can use alipay app to scan the code to donate us:
|
||||
</p>
|
||||
<p style="text-align: center">
|
||||
<img src="/images/leanote/leanote_alipay.jpg" style="padding: 10px;
|
||||
border: 2px solid #eee;
|
||||
border-radius: 10px; width: 200px;"/>
|
||||
</p>
|
||||
<p>
|
||||
The donation list will be published at <a href="http://leanote.com/blog/view/5417ecf81a910828fd000000">Donation List</a>
|
||||
</p>
|
||||
<p>
|
||||
Thanks for your support!
|
||||
</p>
|
||||
|
||||
<hr />
|
||||
<p>
|
||||
Any questions, suggestions or need more supports, you are welcomed to contact us via <code>leanote@leanote.com</code> or the QQ Group <code>158716820</code> Thanks!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{template "home/footer.html"}}
|
||||
|
||||
<script src="/js/jquery-1.9.0.min.js"></script>
|
||||
<script src="/js/bootstrap.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
/*
|
||||
var u = navigator.userAgent;
|
||||
var isMobile = u.indexOf('Android')>-1 || u.indexOf('Linux')>-1;
|
||||
if(isMobile || $("body").width() < 600) {
|
||||
location.href = "/mobile/index";
|
||||
}
|
||||
*/
|
||||
// 平滑滚动
|
||||
$(".smooth-scroll").click(function(e) {
|
||||
e.preventDefault();
|
||||
var t = $(this).attr("target");
|
||||
var targetOffset = $(t).offset().top - 80;
|
||||
$('html,body').animate({scrollTop: targetOffset}, 300);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
139
app/views/home/index_zh.html
Normal file
139
app/views/home/index_zh.html
Normal file
@ -0,0 +1,139 @@
|
||||
{{template "home/header.html" .}}
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<section>
|
||||
<div class="header">
|
||||
<h2>leanote, {{msg . "moto"}}</h2>
|
||||
<p>{{msg . "moto3"}}</p>
|
||||
<p>{{msg . "moto2"}}</p>
|
||||
|
||||
<div>
|
||||
<a class="btn btn-primary" href="https://github.com/leanote/leanote">{{msg . "fork github"}}</a>
|
||||
|
||||
|
||||
<a class="btn btn-default" href="/demo">{{msg . "try"}}</a>
|
||||
{{if .openRegister}}
|
||||
|
||||
|
||||
OR
|
||||
|
||||
|
||||
<a class="btn btn-default" href="/register">{{msg . "register"}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="preview" style="position: relative;">
|
||||
<div>
|
||||
<div class="img-header">
|
||||
<img src="/images/home/mac-btns.png"/>
|
||||
</div>
|
||||
<img src="/images/home/preview2.png" style="width: 750px;" />
|
||||
</div>
|
||||
<div class="mobile">
|
||||
<div class="mobile-header">
|
||||
<img src="/images/home/mac-dot.png" />
|
||||
</div>
|
||||
<img class="mobile-image" src="/images/home/mobile.png" />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="container" id="aboutLeanote">
|
||||
<h2>{{msg . "aboutLeanote"}}</h2>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<h3>{{msg . "knowledge"}}</h3>
|
||||
<p>{{msg . "knowledgeInfo"}}</p>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<h3>{{msg . "share"}}</h3>
|
||||
<p>{{msg . "shareInfo"}}</p>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<h3>{{msg . "cooperation"}}</h3>
|
||||
<p>{{msg . "cooperationInfo"}}</p>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<h3>{{msg . "blog"}}</h3>
|
||||
<p>{{msg . "blogInfo"}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="container" id="download">
|
||||
<h2 style="margin: 20px 0;text-align: center;">{{msg . "download"}}</h2>
|
||||
<div class="row">
|
||||
<div style="width:300px; margin:auto; padding: 10px;">
|
||||
Linux : <a href="https://github.com/leanote/leanote/releases/download/0.4/leanote-linux-v0.4.bin.tar.gz">leanote-linux-v0.4.bin.tar.gz</a> <br />
|
||||
MacOS X : <a href="https://github.com/leanote/leanote/releases/download/0.4/leanote-mac-v0.4.bin.tar.gz">leanote-mac-v0.4.bin.tar.gz</a> <br />
|
||||
<br />
|
||||
<a href="https://github.com/leanote/leanote#3-how-to-install-leanote">{{msg . "howToInstallLeanote"}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="container" id="donate">
|
||||
<h2 style="margin: 20px 0;text-align: center;">{{msg . "donate"}}</h2>
|
||||
<div class="row">
|
||||
<div style="width:500px; margin:auto; padding: 10px;">
|
||||
<p>
|
||||
您可以通过<a href="http://alipay.com">支付宝</a>向leanote捐赠, 所捐赠的款项将用于开发leanote.
|
||||
</p>
|
||||
<p>
|
||||
支付宝账号: <b>pay@leanote.com</b>
|
||||
</p>
|
||||
<p>
|
||||
或使用支付宝扫以下二维码捐赠:
|
||||
</p>
|
||||
<p style="text-align: center">
|
||||
<img src="/images/leanote/leanote_alipay.jpg" style="padding: 10px;
|
||||
border: 2px solid #eee;
|
||||
border-radius: 10px; width: 200px;"/>
|
||||
</p>
|
||||
<p>
|
||||
我们会定期将捐赠名单发布在 <a href="http://leanote.com/blog/view/5417ecf81a910828fd000000">捐赠列表</a>
|
||||
</p>
|
||||
<p>
|
||||
感谢您对leanote的支持!
|
||||
</p>
|
||||
|
||||
<hr />
|
||||
|
||||
<p>
|
||||
有任何疑问, 建议或需其它服务或支持, 欢迎联系 <code>leanote@leanote.com</code> 或加入官方QQ群: <code>158716820</code> 谢谢!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{template "home/footer.html"}}
|
||||
|
||||
<script src="/js/jquery-1.9.0.min.js"></script>
|
||||
<script src="/js/bootstrap.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
/*
|
||||
var u = navigator.userAgent;
|
||||
var isMobile = u.indexOf('Android')>-1 || u.indexOf('Linux')>-1;
|
||||
if(isMobile || $("body").width() < 600) {
|
||||
location.href = "/mobile/index";
|
||||
}
|
||||
*/
|
||||
// 平滑滚动
|
||||
$(".smooth-scroll").click(function(e) {
|
||||
e.preventDefault();
|
||||
var t = $(this).attr("target");
|
||||
var targetOffset = $(t).offset().top - 80;
|
||||
$('html,body').animate({scrollTop: targetOffset}, 300);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
146
app/views/home/login.html
Normal file
146
app/views/home/login.html
Normal file
@ -0,0 +1,146 @@
|
||||
{{template "home/header_box.html" .}}
|
||||
|
||||
<!-- 验证码 -->
|
||||
<script type="text/x-jsrender" id="tCaptcha">
|
||||
<div class="form-group">
|
||||
<label class="control-label">{{rawMsg . "captcha"}}</label>
|
||||
<input type="text" class="form-control" id="captcha" name="captcha">
|
||||
<a id="reloadCaptcha" title="{{msg . "reloadCaptcha"}}" onclick="$('#captchaImage').attr('src', '/captcha/get?' + ((new Date()).getTime()))"><img src="/captcha/get" id="captchaImage"/></a>
|
||||
</div>
|
||||
</script>
|
||||
<section id="box" class="animated fadeInUp">
|
||||
<!--
|
||||
<div>
|
||||
<a class="back" href="javascript:history.go(-1);" tabindex="-1">←Back</a>
|
||||
</div>
|
||||
-->
|
||||
<div>
|
||||
<h1 id="logo">leanote</h1>
|
||||
<div id="boxForm">
|
||||
<div id="boxHeader">{{msg . "login"}}</div>
|
||||
<form>
|
||||
<div class="alert alert-danger" id="loginMsg"></div>
|
||||
<input id="from" type="hidden" value="{{.from}}" />
|
||||
<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 id="captchaContainer">
|
||||
|
||||
</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>
|
||||
{{msg . "or"}}
|
||||
{{end}}
|
||||
|
||||
<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>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
var needCaptcha = {{.needCaptcha}};
|
||||
|
||||
if(needCaptcha){
|
||||
$("#captchaContainer").html($("#tCaptcha").html());
|
||||
}
|
||||
|
||||
$("#email").focus();
|
||||
if($("#email").val()) {
|
||||
$("#pwd").focus();
|
||||
}
|
||||
function showMsg(msg, id) {
|
||||
$("#loginMsg").html(msg).show();
|
||||
if(id) {
|
||||
$("#" + id).focus();
|
||||
}
|
||||
}
|
||||
function hideMsg() {
|
||||
$("#loginMsg").hide();
|
||||
}
|
||||
$("#loginBtn").click(function(e){
|
||||
e.preventDefault();
|
||||
var email = $("#email").val();
|
||||
var pwd = $("#pwd").val();
|
||||
var captcha = $("#captcha").val()
|
||||
if(!email) {
|
||||
showMsg("{{msg . "inputUsername"}}", "email");
|
||||
return;
|
||||
}
|
||||
if(!pwd) {
|
||||
showMsg("{{msg . "inputPassword"}}", "pwd");
|
||||
return;
|
||||
} else {
|
||||
if(pwd.length < 6) {
|
||||
showMsg("{{msg . "wrongPassword"}}", "pwd");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(needCaptcha && !captcha) {
|
||||
showMsg("{{msg . "inputCaptcha"}}", "captcha");
|
||||
return;
|
||||
}
|
||||
|
||||
$("#loginBtn").html("{{msg . "logining"}}...").addClass("disabled");
|
||||
// hideMsg();
|
||||
|
||||
$.post("/doLogin", {email: email, pwd: pwd, captcha: $("#captcha").val()}, function(e) {
|
||||
$("#loginBtn").html("{{msg . "login"}}").removeClass("disabled");
|
||||
if(e.Ok) {
|
||||
$("#loginBtn").html("{{msg . "loginSuccess"}}...");
|
||||
var from = $("#from").val() || "{{.noteUrl}}" || "/note";
|
||||
location.href = from;
|
||||
} else {
|
||||
if(e.Item && $.trim($("#captchaContainer").text()) == "") {
|
||||
$("#captchaContainer").html($("#tCaptcha").html());
|
||||
needCaptcha = true
|
||||
}
|
||||
|
||||
showMsg(e.Msg);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// github
|
||||
$("#github").click(function() {
|
||||
$(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=";
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
22
app/views/home/modal.html
Normal file
22
app/views/home/modal.html
Normal file
@ -0,0 +1,22 @@
|
||||
<div class="modal fade bs-modal-sm" id="leanoteDialog" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="modalTitle">操作</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
..................
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
118
app/views/home/register.html
Normal file
118
app/views/home/register.html
Normal file
@ -0,0 +1,118 @@
|
||||
{{template "home/header_box.html" .}}
|
||||
<section id="box" class="animated fadeInUp">
|
||||
<!--
|
||||
<div>
|
||||
<a class="back" href="javascript:history.go(-1);" tabindex="-1">←Back</a>
|
||||
</div>
|
||||
-->
|
||||
<div>
|
||||
<h1 id="logo">leanote</h1>
|
||||
<div id="boxForm">
|
||||
<div id="boxHeader">{{msg . "register"}}</div>
|
||||
<form>
|
||||
<div class="alert alert-danger" id="loginMsg"></div>
|
||||
<input id="from" type="hidden" value="{{.from}}" />
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="email">{{msg . "email"}}</label>
|
||||
<input type="text" class="form-control" id="email" name="email">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="pwd">{{msg . "password"}}</label>
|
||||
<input type="password" class="form-control" id="pwd" name="pwd">
|
||||
{{msg . "passwordTips"}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="pwd2">{{msg . "password2"}}</label>
|
||||
<input type="password" class="form-control" id="pwd2" name="pwd2" >
|
||||
</div>
|
||||
|
||||
<button id="registerBtn" class="btn btn-success">{{msg . "register"}}</button>
|
||||
|
||||
<div class="line line-dashed"></div>
|
||||
|
||||
<p class="text-muted text-center"><small>{{msg . "hadAcount"}}</small></p>
|
||||
|
||||
<a id="loginBtn" href="/login" class="btn btn-default btn-block">{{msg . "login"}}</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>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$("#email").focus();
|
||||
|
||||
function showMsg(msg, id) {
|
||||
$("#loginMsg").html(msg).show();
|
||||
if(id) {
|
||||
$("#" + id).focus();
|
||||
}
|
||||
}
|
||||
function hideMsg() {
|
||||
$("#loginMsg").hide();
|
||||
}
|
||||
$("#registerBtn").click(function(e){
|
||||
e.preventDefault();
|
||||
var email = $("#email").val();
|
||||
var pwd = $("#pwd").val();
|
||||
var pwd2 = $("#pwd2").val();
|
||||
if(!email) {
|
||||
showMsg("{{msg . "inputEmail"}}", "email");
|
||||
return;
|
||||
} else {
|
||||
var myreg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[0-9a-zA-Z]{2,3}$/;
|
||||
if(!myreg.test(email)) {
|
||||
showMsg("{{msg . "wrongEmail"}}", "email");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(!pwd) {
|
||||
showMsg("{{msg . "inputPassword"}}", "pwd");
|
||||
return;
|
||||
} else {
|
||||
if(pwd.length < 6) {
|
||||
showMsg("{{msg . "notGoodPassword"}}", "pwd");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(!pwd2) {
|
||||
showMsg("{{msg . "inputPassword2"}}", "pwd2");
|
||||
return;
|
||||
} else {
|
||||
if(pwd != pwd2) {
|
||||
showMsg("{{msg . "confirmPassword"}}", "pwd2");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$("#registerBtn").html("{{msg . "ing"}}...").addClass("disabled");
|
||||
// hideMsg();
|
||||
|
||||
$.post("/doRegister", {email: email, pwd: pwd}, function(e) {
|
||||
$("#registerBtn").html("{{msg . "register"}}").removeClass("disabled");
|
||||
if(e.Ok) {
|
||||
$("#registerBtn").html("{{msg . "registerSuccessAndRdirectToNote"}}");
|
||||
var from = $("#from").val() || "{{.noteUrl}}" || "/note";
|
||||
location.href = from;
|
||||
} else {
|
||||
showMsg(e.Msg, "email");
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user