Commit 95e7c08f authored by Liang's avatar Liang

💄 update common page

parent 54295024
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>${articleViewPwdLabel}</title>
<meta name="keywords" content="Solo,Java 博客,开源" />
<meta name="description" content="An open source blog with Java. Java 开源博客" />
<meta name="owner" content="B3log Team" />
<meta name="author" content="B3log Team" />
<meta name="generator" content="Solo" />
<meta name="copyright" content="B3log" />
<meta name="revised" content="B3log, ${year}" />
<meta name="robots" content="noindex, follow" />
<meta http-equiv="Window-target" content="_top" />
<link type="text/css" rel="stylesheet" href="${staticServePath}/css/default-init${miniPostfix}.css?${staticResourceVersion}" charset="utf-8" />
<link rel="icon" type="image/png" href="${staticServePath}/favicon.png" />
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
</head>
<body>
<div class="wrapper">
<div class="wrap">
<div class="content">
<div class="logo">
<a href="http://b3log.org" target="_blank">
<img border="0" width="153" height="56" alt="B3log" title="B3log" src="${staticServePath}/images/logo.jpg"/>
</a>
</div>
<div class="main article-pwd">
<h2>
${articleTitle}
</h2>
<div>
${articleAbstract}
</div>
<#if msg??>
<div>${msg}</div>
</#if>
<form method="POST" action="${servePath}/console/article-pwd">
<label for="pwdTyped">访问密码:</label>
<input type="password" id="pwdTyped" name="pwdTyped" />
<input type="hidden" name="articleId" value="${articleId}" />
<button id="confirm" type="submit">${confirmLabel}</button>
</form>
<a href="http://b3log.org" target="_blank">
<img border="0" class="icon" alt="B3log" title="B3log" src="${staticServePath}/favicon.png"/>
</a>
</div>
<span class="clear"></span>
</div>
</div>
<#include "macro-common-page.ftl">
<div class="footerWrapper">
<div class="footer">
&copy; ${year} - <a href="${servePath}">${blogTitle}</a><br/>
Powered by <a href="http://b3log.org" target="_blank">B3log 开源</a><a href="https://hacpai.com/tag/solo" target="_blank">Solo</a> ${version}
</div>
</div>
</div>
</body>
</html>
<@commonPage "${articleViewPwdLabel}">
<h2>
${articleTitle}
</h2>
<br>
<#if msg??>
<div>${msg}</div>
</#if>
<form method="POST" action="${servePath}/console/article-pwd">
<label for="pwdTyped">访问密码:</label>
<input type="password" id="pwdTyped" name="pwdTyped" />
<input type="hidden" name="articleId" value="${articleId}" />
<button id="confirm" type="submit">${confirmLabel}</button>
</form>
</@commonPage>
\ No newline at end of file
......@@ -23,7 +23,6 @@
html {
height: 100%;
overflow: hidden;
}
html,body {
......@@ -32,7 +31,7 @@ html,body {
}
body {
background-color: #F3F1E5;
background-color: #fff;
color: #333;
font-family: \5fae\8f6f\96c5\9ed1;
font-size: small;
......@@ -40,7 +39,7 @@ body {
}
h2 {
background-color:#ECECEC;
background-color: #F3F1E5;
border-radius: 4px 4px 0 0;
font-size: 16px;
margin: 0;
......@@ -129,14 +128,6 @@ button:active {
display: none;
}
.main .icon {
position: absolute;
right: 0px;
top: 0px;
width:16px;
height:16px;
}
.solo {
color: orangered;
font-weight: bold;
......@@ -144,32 +135,22 @@ button:active {
.logo {
float: left;
padding: 162px 12px 0;
padding: 142px 12px 0;
width: 217px;
text-align: center;
}
.wrapper {
height: auto;
min-height: 100%;
position: relative;
}
.wrap {
border-top: 5px solid #E6E5D9;
min-height: 400px;
padding: 110px 0;
background-color: #F3F1E5;
}
.content {
background: url("../images/zz.jpg") repeat-x scroll center bottom white;
border-color: #E6E5D9;
border-style: solid solid none;
border-width: 1px;
background-color: #fff;
margin: 0 auto;
padding: 0 0 28px 0;
position: relative;
width: 760px;
top: 60px;
}
.main {
......@@ -179,7 +160,7 @@ button:active {
margin: 24px 0;
padding: 12px 24px;
width: 470px;
height: 338px;
min-height: 300px;
}
.main a {
......@@ -193,11 +174,8 @@ button:active {
.footerWrapper {
background-color: #FFFFFF;
border-top: 1px solid #E6E5D9;
bottom: 0;
padding: 12px 0;
position: absolute;
text-align: center;
width: 100%;
}
.footerWrapper a {
......@@ -220,7 +198,6 @@ button:active {
/* start 403/404/500 */
.img-403, .img-500 {
box-shadow: 0 0 5px #E6E5D9;
margin: 20px 0 0 45px;
padding: 5px;
}
......@@ -270,7 +247,6 @@ button:active {
/* start init */
#init {
position: absolute;
top: 81px;
width: 470px;
}
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="robots" content="none" />
<title>${blogTitle} - 403 Forbidden!</title>
<link type="text/css" rel="stylesheet" href="${staticServePath}/css/default-init${miniPostfix}.css?${staticResourceVersion}" charset="utf-8" />
<link rel="icon" type="image/png" href="${staticServePath}/favicon.png" />
</head>
<body>
<div class="wrapper">
<div class="wrap">
<div class="content">
<div class="logo">
<a href="http://b3log.org" target="_blank">
<img border="0" width="153" height="56" alt="B3log" title="B3log" src="${staticServePath}/images/logo.jpg"/>
</a>
</div>
<div class="main">
<h2>403 Forbidden!</h2>
<img class="img-403" src="${staticServePath}/images/403.png" alt="403: forbidden" title="403: forbidden" />
<div class="a-403">
<a href="${servePath}">Index</a> |
<a href="${loginURL}">Login</a>
</div>
<a href="http://b3log.org" target="_blank">
<img border="0" class="icon" alt="B3log" title="B3log" src="${staticServePath}/favicon.png"/>
</a>
</div>
<span class="clear"></span>
</div>
</div>
</div>
<div class="footerWrapper">
<div class="footer">
&copy; ${year}
Powered by <a href="http://b3log.org" target="_blank">B3log 开源</a>, ver ${version}
</div>
</div>
</body>
</html>
<#include "../macro-common-page.ftl">
<@commonPage "403 Forbidden!">
<h2>403 Forbidden!</h2>
<img class="img-403" src="${staticServePath}/images/403.png" alt="403: forbidden" title="403: forbidden" />
<div class="a-403">
<a href="${servePath}">Index</a> |
<a href="${loginURL}">Login</a>
</div>
</@commonPage>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="robots" content="none" />
<title>${blogTitle} - 404 Not Found!</title>
<link type="text/css" rel="stylesheet" href="${staticServePath}/css/default-init${miniPostfix}.css?${staticResourceVersion}" charset="utf-8" />
<link rel="icon" type="image/png" href="${staticServePath}/favicon.png" />
</head>
<body>
<div class="wrapper">
<div class="wrap">
<div class="content">
<div class="logo">
<a href="http://b3log.org" target="_blank">
<img border="0" width="153" height="56" alt="B3log" title="B3log" src="${staticServePath}/images/logo.jpg"/>
</a>
</div>
<div class="main">
<h2>404 Not Found!</h2>
<img class="img-t0t" width="488" src="${staticServePath}/images/404.gif" title="404" alt="500: not found!" />
<div class="a-404">
欢迎访问
<a href="https://hacpai.com">黑客与画家</a>
</div>
<a href="http://b3log.org" target="_blank">
<img border="0" class="icon" alt="B3log" title="B3log" src="${staticServePath}/favicon.png"/>
</a>
</div>
<span class="clear"></span>
</div>
</div>
</div>
<div class="footerWrapper">
<div class="footer">
&copy; ${year}
Powered by <a href="http://b3log.org" target="_blank">B3log 开源</a>, ver ${version}
</div>
</div>
</body>
</html>
<#include "../macro-common-page.ftl">
<@commonPage "404 Not Found!">
<h2>${title}</h2>
<img class="img-t0t" width="488" src="${staticServePath}/images/404.gif" title="404" alt="${title}"/>
<div class="a-404">
欢迎访问
<a href="https://hacpai.com">黑客与画家</a>
</div>
</@commonPage>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>${blogTitle} - 500 Internal Server Error!</title>
<link type="text/css" rel="stylesheet" href="${staticServePath}/css/default-init${miniPostfix}.css?${staticResourceVersion}" charset="utf-8" />
<link rel="icon" type="image/png" href="${staticServePath}/favicon.png" />
</head>
<body>
<div class="wrapper">
<div class="wrap">
<div class="content">
<div class="logo">
<a href="http://b3log.org" target="_blank">
<img border="0" width="153" height="56" alt="B3log" title="B3log" src="${staticServePath}/images/logo.jpg"/>
</a>
</div>
<div class="main">
<h2>500 Internal Server Error!</h2>
<img class="img-500" src="${staticServePath}/images/500.png" title="500: internal error" alt="500: internal error" />
<div class="a-500">
Please
<a href="https://github.com/b3log/solo/issues/new">report</a> it to help us.
Return to <a href="${servePath}">Index</a>.
</div>
<a href="http://b3log.org" target="_blank">
<img border="0" class="icon" alt="B3log" title="B3log" src="${staticServePath}/favicon.png"/>
</a>
</div>
<span class="clear"></span>
</div>
</div>
</div>
<div class="footerWrapper">
<div class="footer">
&copy; ${year}
Powered by <a href="http://b3log.org" target="_blank">B3log 开源</a>, ver ${version}
</div>
</div>
</body>
</html>
<#include "../macro-common-page.ftl">
<@commonPage "500 Internal Server Error!">
<h2>500 Internal Server Error!</h2>
<img class="img-500" src="${staticServePath}/images/500.png" title="500: internal error" alt="500: internal error" />
<div class="a-500">
Please
<a href="https://github.com/b3log/solo/issues/new">report</a> it to help us.
Return to <a href="${servePath}">Index</a>.
</div>
</@commonPage>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>${welcomeToSoloLabel} Solo!</title>
<meta name="keywords" content="Solo,Java 博客,开源" />
<meta name="description" content="An open source blog with Java. Java 开源博客" />
<meta name="owner" content="B3log Team" />
<meta name="author" content="B3log Team" />
<meta name="generator" content="Solo" />
<meta name="copyright" content="B3log" />
<meta name="revised" content="B3log, ${year}" />
<meta name="robots" content="noindex, follow" />
<meta http-equiv="Window-target" content="_top" />
<link type="text/css" rel="stylesheet" href="${staticServePath}/css/default-init${miniPostfix}.css?${staticResourceVersion}" charset="utf-8" />
<link rel="icon" type="image/png" href="${staticServePath}/favicon.png" />
<style>
*,html,body {
margin: 0;
padding: 0;
}
html {
height: 100%;
overflow: hidden;
}
body {
background-color: #F3F1E5;
color: #4D505D;
font-family: \5fae\8f6f\96c5\9ed1;
font-size: small;
height: 100%;
overflow: hidden;
}
.wrapper {
height: 400px;
min-height: 100%;
position: relative;
}
.contentError {
background-color: #FFFFFF;
border: 1px solid #E6E5D9;
height: 300px;
margin: 0 auto;
padding: 50px;
position: relative;
top: 60px;
width: 600px;
}
.footerWrapper {
background-color: #FFFFFF;
border-top: 1px solid #E6E5D9;
bottom: 0;
padding: 12px 0;
position: absolute;
text-align: center;
width: 100%;
}
.footerWrapper a {
text-decoration: none;
}
</style>
</head>
<body>
<div class="wrapper">
<div class="wrap">
<div class="content" id="main">
<div class="logo">
<a href="http://b3log.org" target="_blank">
<img border="0" width="153" height="56" alt="B3log" title="B3log" src="${staticServePath}/images/logo.jpg"/>
</a>
</div>
<div class="main">
<h2>
<span>${welcomeToSoloLabel}</span>
<a target="_blank" href="http://b3log.org">
<span class="solo">&nbsp;Solo</span>
</a>
</h2>
<div id="init">
<div id="user" class="form">
<label for="userEmail">
${commentEmail1Label}
</label>
<input id="userEmail" />
<label for="userName">
${userName1Label}
</label>
<input id="userName" />
<label for="userPassword">
${userPassword1Label}
</label>
<input type="password" id="userPassword" />
<label for="userPasswordConfirm">
${userPasswordConfirm1Label}
</label>
<input type="password" id="userPasswordConfirm" />
<button onclick='getUserInfo();'>${nextStepLabel}</button>
<span id="tip"></span>
</div>
<div id="sys" class="none">
${initIntroLabel}
<button onclick='initSys();' id="initButton">${initLabel}</button>
<button onclick='returnTo();'>${previousStepLabel}</button>
<span id="tipInit"></span>
<span class="clear"></span>
</div>
</div>
<a href="http://b3log.org" target="_blank">
<img border="0" class="icon" alt="B3log" title="B3log" src="${staticServePath}/favicon.png"/>
</a>
</div>
<span class="clear"></span>
</div>
</div>
<div class="footerWrapper">
<div class="footer">
&copy; ${year}
Powered by <a href="http://b3log.org" target="_blank">B3log 开源</a><a href="https://hacpai.com/tag/solo" target="_blank">Solo</a> ${version}
</div>
</div>
</div>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript">
var validate = function() {
var userName = $("#userName").val().replace(/(^\s*)|(\s*$)/g, "");
if (!/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test($("#userEmail").val())) {
$("#tip").text("${mailInvalidLabel}");
$("#userEmail").focus();
} else if (2 > userName.length || userName.length > 20) {
$("#tip").text("${nameTooLongLabel}");
$("#userName").focus();
} else if ($("#userPassword").val().replace(/\s/g, "") === "") {
$("#tip").text("${passwordEmptyLabel}");
$("#userPassword").focus();
} else if ($("#userPassword").val() !== $("#userPasswordConfirm").val()) {
$("#tip").text("${passwordNotMatchLabel}");
$("#userPasswordConfirm").focus();
} else {
$("#tip").text("");
return true;
}
return false;
};
var getUserInfo = function() {
if (validate()) {
$("#init").animate({
"top": -178
});
$("#user").animate({
"opacity": 0
});
$("#sys").css({
"display": "block",
"opacity": 1
});
$(window).unbind().keydown(function(e) {
if (e.keyCode === 27) {// esc
returnTo();
$(window).unbind();
} else if (e.keyCode === 13) {// enter
initSys();
}
});
}
};
var returnTo = function() {
$("#init").animate({
"top": 81
});
$("#user").animate({
"opacity": 1
});
$("#sys").animate({
"opacity": 0
}, 800, function() {
this.style.display = "none";
});
};
var initSys = function() {
var requestJSONObject = {
"userName": $("#userName").val(),
"userEmail": $("#userEmail").val(),
"userPassword": $("#userPassword").val()
};
if (confirm("${confirmInitLabel}")) {
$(window).unbind();
$("#tipInit").html("<img src='${staticServePath}/images/loading.gif'/> loading...");
$.ajax({
url: "${servePath}/init",
type: "POST",
data: JSON.stringify(requestJSONObject),
success: function(result, textStatus) {
if (!result.sc) {
$("#tipInit").text(result.msg);
return;
}
window.location.href = "${servePath}/admin-index.do#main";
}
});
}
};
(function() {
try {
$("#userEmail").focus();
$("input").keypress(function(event) {
if (event.keyCode === 13) {
event.preventDefault();
}
});
$("#userPasswordConfirm").keypress(function(event) {
if (event.keyCode === 13) {
getUserInfo();
}
});
} catch (e) {
document.getElementById("main").innerHTML = "${staticErrorLabel}";
document.getElementById("main").className = "contentError";
}
// if no JSON, add it.
try {
JSON
} catch (e) {
document.write("<script src=\"${staticServePath}/js/lib/json2.js\"><\/script>");
}
})();
</script>
</body>
</html>
<#include "macro-common-page.ftl">
<@commonPage "${welcomeToSoloLabel}!">
<h2>
<span>${welcomeToSoloLabel}</span>
<a target="_blank" href="http://b3log.org">
<span class="solo">&nbsp;Solo</span>
</a>
</h2>
<div id="init">
<div id="user" class="form">
<label for="userEmail">
${commentEmail1Label}
</label>
<input id="userEmail" />
<label for="userName">
${userName1Label}
</label>
<input id="userName" />
<label for="userPassword">
${userPassword1Label}
</label>
<input type="password" id="userPassword" />
<label for="userPasswordConfirm">
${userPasswordConfirm1Label}
</label>
<input type="password" id="userPasswordConfirm" />
<button onclick='getUserInfo();'>${nextStepLabel}</button>
<span id="tip"></span>
</div>
<div id="sys" class="none">
${initIntroLabel}
<button onclick='initSys();' id="initButton">${initLabel}</button>
<button onclick='returnTo();'>${previousStepLabel}</button>
<span id="tipInit"></span>
<span class="clear"></span>
</div>
</div>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript">
var validate = function() {
var userName = $("#userName").val().replace(/(^\s*)|(\s*$)/g, "");
if (!/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test($("#userEmail").val())) {
$("#tip").text("${mailInvalidLabel}");
$("#userEmail").focus();
} else if (2 > userName.length || userName.length > 20) {
$("#tip").text("${nameTooLongLabel}");
$("#userName").focus();
} else if ($("#userPassword").val().replace(/\s/g, "") === "") {
$("#tip").text("${passwordEmptyLabel}");
$("#userPassword").focus();
} else if ($("#userPassword").val() !== $("#userPasswordConfirm").val()) {
$("#tip").text("${passwordNotMatchLabel}");
$("#userPasswordConfirm").focus();
} else {
$("#tip").text("");
return true;
}
return false;
};
var getUserInfo = function() {
if (validate()) {
$("#init").animate({
"top": -100
});
$("#user").animate({
"opacity": 0
});
$("#sys").css({
"display": "block",
"opacity": 1
});
$(window).unbind().keydown(function(e) {
if (e.keyCode === 27) {// esc
returnTo();
$(window).unbind();
} else if (e.keyCode === 13) {// enter
initSys();
}
});
}
};
var returnTo = function() {
$("#init").animate({
"top": 190
});
$("#user").animate({
"opacity": 1
});
$("#sys").animate({
"opacity": 0
}, 800, function() {
this.style.display = "none";
});
};
var initSys = function() {
var requestJSONObject = {
"userName": $("#userName").val(),
"userEmail": $("#userEmail").val(),
"userPassword": $("#userPassword").val()
};
if (confirm("${confirmInitLabel}")) {
$(window).unbind();
$("#tipInit").html("<img src='${staticServePath}/images/loading.gif'/> loading...");
$.ajax({
url: "${servePath}/init",
type: "POST",
data: JSON.stringify(requestJSONObject),
success: function(result, textStatus) {
if (!result.sc) {
$("#tipInit").text(result.msg);
return;
}
window.location.href = "${servePath}/admin-index.do#main";
}
});
}
};
(function() {
try {
$("#userEmail").focus();
$("input").keypress(function(event) {
if (event.keyCode === 13) {
event.preventDefault();
}
});
$("#userPasswordConfirm").keypress(function(event) {
if (event.keyCode === 13) {
getUserInfo();
}
});
} catch (e) {
document.getElementById("main").innerHTML = "${staticErrorLabel}";
document.getElementById("main").className = "contentError";
}
// if no JSON, add it.
try {
JSON
} catch (e) {
document.write("<script src=\"${staticServePath}/js/lib/json2.js\"><\/script>");
}
$('.main').css({
height: '336px',
'overflow': 'hidden'
})
})();
</script>
</@commonPage>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>${blogTitle}</title>
<meta name="keywords" content="Solo,Java 博客,开源" />
<meta name="description" content="An open source blog with Java. Java 开源博客" />
<meta name="owner" content="B3log Team" />
<meta name="author" content="B3log Team" />
<meta name="generator" content="Solo" />
<meta name="copyright" content="B3log" />
<meta name="revised" content="B3log, ${year}" />
<meta http-equiv="Window-target" content="_top" />
<link type="text/css" rel="stylesheet" href="${staticServePath}/css/default-init${miniPostfix}.css?${staticResourceVersion}" charset="utf-8" />
<link rel="icon" type="image/png" href="${staticServePath}/favicon.png" />
</head>
<body>
<div class="wrapper">
<div class="wrap">
<div class="content" style="top:-6px">
<div class="logo">
<a href="http://b3log.org" target="_blank">
<img border="0" width="153" height="56" alt="B3log" title="B3log" src="${staticServePath}/images/logo.jpg"/>
</a>
</div>
<div class="main kill" style="height: 385px;">
${killBrowserLabel}
<br/>
&nbsp; &nbsp;&nbsp; <button onclick="closeIframe();">${closeLabel}</button> &nbsp; &nbsp;
<button onclick="closeIframeForever();">${closeForeverLabel}</button>
<img src='${staticServePath}/images/kill-browser.png' title='Kill IE6' alt='Kill IE6'/>
<a href="http://b3log.org" target="_blank">
<img border="0" class="icon" alt="B3log" title="B3log" src="${staticServePath}/favicon.png"/>
</a>
</div>
<span class="clear"></span>
</div>
</div>
</div>
<script>
var closeIframe = function () {
window.parent.$("iframe").prev().remove();
window.parent.$("iframe").remove();
};
var closeIframeForever = function () {
window.parent.Cookie.createCookie("showKill", true, 365);
closeIframe();
};
</script>
</body>
</html>
<#include "macro-common-page.ftl">
<@commonPage "403 Forbidden!">
${killBrowserLabel}
<br/>
&nbsp; &nbsp;&nbsp; <button onclick="closeIframe();">${closeLabel}</button> &nbsp; &nbsp;
<button onclick="closeIframeForever();">${closeForeverLabel}</button>
<img src='${staticServePath}/images/kill-browser.png' title='Kill IE6' style="float: right;
margin: -171px 0 0 0;" alt='Kill IE6'/>
<script>
var closeIframe = function () {
window.parent.$("iframe").prev().remove();
window.parent.$("iframe").remove();
};
var closeIframeForever = function () {
window.parent.Cookie.createCookie("showKill", true, 365);
closeIframe();
};
</script>
</@commonPage>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>${welcomeToSoloLabel} Solo!</title>
<meta name="keywords" content="Solo,Java 博客,开源" />
<meta name="description" content="An open source blog with Java. Java 开源博客" />
<meta name="owner" content="B3log Team" />
<meta name="author" content="B3log Team" />
<meta name="generator" content="Solo" />
<meta name="copyright" content="B3log" />
<meta name="revised" content="B3log, ${year}" />
<meta name="robots" content="noindex, follow" />
<meta http-equiv="Window-target" content="_top" />
<link type="text/css" rel="stylesheet" href="${staticServePath}/css/default-init${miniPostfix}.css?${staticResourceVersion}" charset="utf-8" />
<link rel="icon" type="image/png" href="${staticServePath}/favicon.png" />
</head>
<body>
<div class="wrapper">
<div class="wrap">
<div class="content">
<div class="logo">
<a href="http://b3log.org" target="_blank">
<img border="0" width="153" height="56" alt="B3log" title="B3log" src="${staticServePath}/images/logo.jpg"/>
</a>
</div>
<div class="main">
<h2>
${loginLabel}
</h2>
<div class="form">
<label for="userEmail">
${commentEmailLabel}
</label>
<input id="userEmail" tabindex="1" />
<label for="userPassword">
${userPasswordLabel} <a href="/forgot">(${forgotLabel})</a>
</label>
<input type="password" id="userPassword" tabindex="2" />
<button onclick='login();'>${loginLabel}</button>
<span id="tip">${resetMsg}</span>
</div>
<a href="http://b3log.org" target="_blank">
<img border="0" class="icon" alt="B3log" title="B3log" src="${staticServePath}/favicon.png"/>
</a>
</div>
<span class="clear"></span>
</div>
</div>
<div class="footerWrapper">
<div class="footer">
&copy; ${year} - <a href="${servePath}">${blogTitle}</a><br/>
Powered by <a href="http://b3log.org" target="_blank">B3log 开源</a><a href="https://hacpai.com/tag/solo" target="_blank">Solo</a> ${version}
</div>
</div>
</div>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript">
(function() {
$("#userEmail").focus();
<#include "macro-common-page.ftl">
$("#userPassword, #userEmail").keypress(function(event) {
if (13 === event.keyCode) { // Enter pressed
login();
}
});
<@commonPage "${welcomeToSoloLabel}!">
<h2>
${loginLabel}
</h2>
<div class="form">
<label for="userEmail">
${commentEmailLabel}
</label>
<input id="userEmail" tabindex="1" />
<label for="userPassword">
${userPasswordLabel} <a href="/forgot">(${forgotLabel})</a>
</label>
<input type="password" id="userPassword" tabindex="2" />
<button onclick='login();'>${loginLabel}</button>
<span id="tip">${resetMsg}</span>
</div>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript">
(function() {
$("#userEmail").focus();
// if no JSON, add it.
try {
JSON
} catch (e) {
document.write("<script src=\"${staticServePath}/js/lib/json2.js\"><\/script>");
}
})();
$("#userPassword, #userEmail").keypress(function(event) {
if (13 === event.keyCode) { // Enter pressed
login();
}
});
var login = function() {
if (!/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test($("#userEmail" + status).val())) {
$("#tip").text("${mailInvalidLabel}");
$("#userEmail").focus();
return;
}
// if no JSON, add it.
try {
JSON
} catch (e) {
document.write("<script src=\"${staticServePath}/js/lib/json2.js\"><\/script>");
}
})();
if ($("#userPassword").val() === "") {
$("#tip").text("${passwordEmptyLabel}");
$("#userPassword").focus();
return;
}
var login = function() {
if (!/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test($("#userEmail" + status).val())) {
$("#tip").text("${mailInvalidLabel}");
$("#userEmail").focus();
return;
}
var requestJSONObject = {
"userEmail": $("#userEmail").val(),
"userPassword": $("#userPassword").val()
};
$("#tip").html("<img src='${staticServePath}/images/loading.gif'/> loading...")
if ($("#userPassword").val() === "") {
$("#tip").text("${passwordEmptyLabel}");
$("#userPassword").focus();
return;
}
$.ajax({
url: "${servePath}/login",
type: "POST",
contentType: "application/json",
data: JSON.stringify(requestJSONObject),
error: function() {
// alert("Login error!");
},
success: function(data, textStatus) {
if (!data.isLoggedIn) {
$("#tip").text(data.msg);
return;
}
var requestJSONObject = {
"userEmail": $("#userEmail").val(),
"userPassword": $("#userPassword").val()
};
window.location.href = data.to;
}
});
};
</script>
</body>
</html>
$("#tip").html("<img src='${staticServePath}/images/loading.gif'/> loading...")
$.ajax({
url: "${servePath}/login",
type: "POST",
contentType: "application/json",
data: JSON.stringify(requestJSONObject),
error: function() {
// alert("Login error!");
},
success: function(data, textStatus) {
if (!data.isLoggedIn) {
$("#tip").text(data.msg);
return;
}
window.location.href = data.to;
}
});
};
</script>
</@commonPage>
\ No newline at end of file
<#macro commonPage title>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="robots" content="none"/>
<title><#if blogTitle??>${blogTitle} - </#if>${title}</title>
<link type="text/css" rel="stylesheet"
href="${staticServePath}/css/default-init${miniPostfix}.css?${staticResourceVersion}" charset="utf-8"/>
<link rel="icon" type="image/png" href="${staticServePath}/favicon.png"/>
</head>
<body>
<div class="wrap">
<div class="content">
<div class="logo">
<a href="http://b3log.org" target="_blank">
<img border="0" alt="Solo" title="Solo" src="${staticServePath}/images/logo.jpg"/>
</a>
</div>
<div class="main">
<#nested >
</div>
<span class="clear"></span>
</div>
</div>
<div class="footerWrapper">
<div class="footer">
Powered by <a href="http://b3log.org" target="_blank">B3log 开源</a> • Solo ${version}
</div>
</div>
</body>
</html>
</#macro>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>${blogTitle}</title>
<meta name="keywords" content="Solo,Java 博客,开源" />
<meta name="description" content="An open source blog with Java. Java 开源博客" />
<meta name="owner" content="B3log Team" />
<meta name="author" content="B3log Team" />
<meta name="generator" content="Solo" />
<meta name="copyright" content="B3log" />
<meta name="revised" content="B3log, ${year}" />
<meta http-equiv="Window-target" content="_top" />
<link type="text/css" rel="stylesheet" href="${staticServePath}/css/default-init${miniPostfix}.css?${staticResourceVersion}" charset="utf-8" />
<link rel="icon" type="image/png" href="${staticServePath}/favicon.png" />
</head>
<body>
<div class="wrapper">
<div class="wrap">
<div class="content">
<div class="logo">
<a href="http://b3log.org" target="_blank">
<img border="0" width="153" height="56" alt="B3log" title="B3log" src="${staticServePath}/images/logo.jpg"/>
</a>
</div>
<div class="main register">
<h2>${registerSoloUserLabel}</h2>
<div class="form">
<label for="userEmail">
${commentEmail1Label}
</label>
<input id="userEmail" />
<label for="userName">
${userName1Label}
</label>
<input id="userName" />
<label for="userURL">
${userURL1Label}
</label>
<input id="userURL" />
<label for="userPassword">
${userPassword1Label}
</label>
<input type="password" id="userPassword" />
<label for="userPasswordConfirm">
${userPasswordConfirm1Label}
</label>
<input type="password" id="userPasswordConfirm" />
<button onclick='getUserInfo();'>${saveLabel}</button>
<span id="tip" ></span>
</div>
</div>
<span class="clear"></span>
</div>
</div>
<#include "macro-common-page.ftl">
<div class="footerWrapper">
<div class="footer">
&copy; ${year} - <a href="${servePath}">${blogTitle}</a><br/>
Powered by <a href="http://b3log.org" target="_blank">B3log 开源</a><a href="https://hacpai.com/tag/solo" target="_blank">Solo</a> ${version}
</div>
</div>
</div>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript">
var validate = function() {
var userName = $("#userName").val().replace(/(^\s*)|(\s*$)/g, "");
if (!/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test($("#userEmail").val())) {
$("#tip").text("${mailInvalidLabel}");
$("#userEmail").focus();
} else if (2 > userName.length || userName.length > 20) {
$("#tip").text("${nameTooLongLabel}");
$("#userName").focus();
} else if ($("#userPassword").val() === "") {
$("#tip").text("${passwordEmptyLabel}");
$("#userPassword").focus();
} else if ($("#userPassword").val() !== $("#userPasswordConfirm").val()) {
$("#tip").text("${passwordNotMatchLabel}");
$("#userPasswordConfirm").focus();
} else {
$("#tip").text("");
return true;
}
return false;
};
<@commonPage "${registerSoloUserLabel}!">
<h2>${registerSoloUserLabel}</h2>
<div class="form">
<label for="userEmail">
${commentEmail1Label}
</label>
<input id="userEmail" />
<label for="userName">
${userName1Label}
</label>
<input id="userName" />
<label for="userURL">
${userURL1Label}
</label>
<input id="userURL" />
<label for="userPassword">
${userPassword1Label}
</label>
<input type="password" id="userPassword" />
<label for="userPasswordConfirm">
${userPasswordConfirm1Label}
</label>
<input type="password" id="userPasswordConfirm" />
<button onclick='getUserInfo();'>${saveLabel}</button>
<span id="tip" ></span>
</div>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript">
var validate = function() {
var userName = $("#userName").val().replace(/(^\s*)|(\s*$)/g, "");
if (!/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test($("#userEmail").val())) {
$("#tip").text("${mailInvalidLabel}");
$("#userEmail").focus();
} else if (2 > userName.length || userName.length > 20) {
$("#tip").text("${nameTooLongLabel}");
$("#userName").focus();
} else if ($("#userPassword").val() === "") {
$("#tip").text("${passwordEmptyLabel}");
$("#userPassword").focus();
} else if ($("#userPassword").val() !== $("#userPasswordConfirm").val()) {
$("#tip").text("${passwordNotMatchLabel}");
$("#userPasswordConfirm").focus();
} else {
$("#tip").text("");
return true;
}
return false;
};
var getUserInfo = function() {
if (validate()) {
var requestJSONObject = {
"userName": $("#userName").val(),
"userEmail": $("#userEmail").val(),
"userURL": $("#userURL").val(),
"userPassword": $("#userPassword").val()
};
var getUserInfo = function() {
if (validate()) {
var requestJSONObject = {
"userName": $("#userName").val(),
"userEmail": $("#userEmail").val(),
"userURL": $("#userURL").val(),
"userPassword": $("#userPassword").val()
};
$("#tip").html("<img src='${staticServePath}/images/loading.gif'/> loading...")
$.ajax({
url: "${servePath}" + "/console/user/",
type: "POST",
cache: false,
data: JSON.stringify(requestJSONObject),
success: function(result, textStatus) {
$("#tip").text(result.msg);
if (!result.sc) {
return;
}
setTimeout(function() {
window.location.href = "${servePath}";
}, 1000);
}
})
}
}
$("#tip").html("<img src='${staticServePath}/images/loading.gif'/> loading...")
$.ajax({
url: "${servePath}" + "/console/user/",
type: "POST",
cache: false,
data: JSON.stringify(requestJSONObject),
success: function(result, textStatus) {
$("#tip").text(result.msg);
if (!result.sc) {
return;
}
setTimeout(function() {
window.location.href = "${servePath}";
}, 1000);
}
})
}
}
$(function() {
$("#userPasswordConfirm").keypress(function(event) {
if (event.keyCode === 13) {
getUserInfo();
}
});
});
$(function() {
$("#userPasswordConfirm").keypress(function(event) {
if (event.keyCode === 13) {
getUserInfo();
}
});
</script>
</body>
</html>
$('.wrap').css('padding', "40px 0");
});
</script>
</@commonPage>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>${forgotLabel} Solo!</title>
<meta name="keywords" content="Solo,Java 博客,开源" />
<meta name="description" content="An open source blog with Java. Java 开源博客" />
<meta name="owner" content="B3log Team"/>
<meta name="author" content="B3log Team"/>
<meta name="generator" content="Solo"/>
<meta name="copyright" content="B3log"/>
<meta name="revised" content="B3log, ${year}"/>
<meta name="robots" content="noindex, follow"/>
<meta http-equiv="Window-target" content="_top"/>
<link type="text/css" rel="stylesheet"
href="${staticServePath}/css/default-init${miniPostfix}.css?${staticResourceVersion}" charset="utf-8"/>
<link rel="icon" type="image/png" href="${staticServePath}/favicon.png"/>
</head>
<body>
<div class="wrapper">
<div class="wrap">
<div class="content">
<div class="logo">
<a href="http://b3log.org" target="_blank">
<img border="0" width="153" height="56" alt="B3log" title="B3log"
src="${staticServePath}/images/logo.jpg"/>
</a>
</div>
<div class="main">
<h2>
${forgotLabel}
</h2>
<#if "email" == inputType>
<div class="form">
<label for="emailOrPassword">
${commentEmailLabel}
</label>
<input id="emailOrPassword"/>
<button id="sendBtn" onclick='forgot();'>${sendLabel}</button>
<span id="tip"></span>
</div>
<#else>
<div class="form">
<label for="emailOrPassword">
${userPasswordLabel}
</label>
<input id="emailOrPassword"/>
<input type="hidden" id="userEmailHidden" value="${userEmailHidden}" />
<button id="sendBtn" onclick='reset();'>${ok}</button>
<span id="tip"></span>
</div>
</#if>
<#include "macro-common-page.ftl">
<a href="http://b3log.org" target="_blank">
<img border="0" class="icon" alt="B3log" title="B3log" src="${staticServePath}/favicon.png"/>
</a>
</div>
<span class="clear"></span>
</div>
</div>
<div class="footerWrapper">
<div class="footer">
&copy; ${year} - <a href="${servePath}">${blogTitle}</a><br/>
Powered by <a href="http://b3log.org" target="_blank">B3log 开源</a><a href="https://hacpai.com/tag/solo" target="_blank">Solo</a> ${version}
</div>
</div>
</div>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript">
(function() {
$("#emailOrPassword").focus();
<@commonPage "${forgotLabel}!">
<h2>
${forgotLabel}
</h2>
<#if "email" == inputType>
<div class="form">
<label for="emailOrPassword">
${commentEmailLabel}
</label>
<input id="emailOrPassword"/>
<button id="sendBtn" onclick='forgot();'>${sendLabel}</button>
<span id="tip"></span>
</div>
<#else>
<div class="form">
<label for="emailOrPassword">
${userPasswordLabel}
</label>
<input id="emailOrPassword"/>
<input type="hidden" id="userEmailHidden" value="${userEmailHidden}" />
<button id="sendBtn" onclick='reset();'>${ok}</button>
<span id="tip"></span>
</div>
</#if>
$("#emailOrPassword").keypress(function(event) {
if (13 === event.keyCode) { // Enter pressed
$('#sendBtn').click();
}
});
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript">
(function() {
$("#emailOrPassword").focus();
// if no JSON, add it.
try {
JSON
} catch (e) {
document.write("<script src=\"${staticServePath}/js/lib/json2.js\"><\/script>");
}
})();
$("#emailOrPassword").keypress(function(event) {
if (13 === event.keyCode) { // Enter pressed
$('#sendBtn').click();
}
});
var reset = function() {
if ($("#emailOrPassword").val() === "") {
$("#tip").text("${passwordEmptyLabel}");
$("#emailOrPassword").focus();
return;
}
var requestJSONObject = {
"newPwd": $("#emailOrPassword").val(),
"userEmail": $("#userEmailHidden").val()
};
// if no JSON, add it.
try {
JSON
} catch (e) {
document.write("<script src=\"${staticServePath}/js/lib/json2.js\"><\/script>");
}
})();
$("#tip").html("<img src='${staticServePath}/images/loading.gif'/> loading...");
$.ajax({
url: "${servePath}/reset",
type: "POST",
contentType: "application/json",
data: JSON.stringify(requestJSONObject),
error: function() {
// alert("reset password error!");
},
success: function(data, textStatus) {
if (data.succeed) {
window.location.href = data.to;
} else {
$("#tip").text(data.msg);
}
}
});
};
var reset = function() {
if ($("#emailOrPassword").val() === "") {
$("#tip").text("${passwordEmptyLabel}");
$("#emailOrPassword").focus();
return;
}
var requestJSONObject = {
"newPwd": $("#emailOrPassword").val(),
"userEmail": $("#userEmailHidden").val()
};
var forgot = function() {
if (!/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test($("#emailOrPassword" + status).val())) {
$("#tip").text("${mailInvalidLabel}");
$("#emailOrPassword").focus();
return;
$("#tip").html("<img src='${staticServePath}/images/loading.gif'/> loading...");
$.ajax({
url: "${servePath}/reset",
type: "POST",
contentType: "application/json",
data: JSON.stringify(requestJSONObject),
error: function() {
// alert("reset password error!");
},
success: function(data, textStatus) {
if (data.succeed) {
window.location.href = data.to;
} else {
$("#tip").text(data.msg);
}
}
});
};
var requestJSONObject = {
"userEmail": $("#emailOrPassword").val()
};
var forgot = function() {
if (!/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test($("#emailOrPassword" + status).val())) {
$("#tip").text("${mailInvalidLabel}");
$("#emailOrPassword").focus();
return;
}
$("#tip").html("<img src='${staticServePath}/images/loading.gif'/> loading...")
$.ajax({
url: "${servePath}/forgot",
type: "POST",
contentType: "application/json",
data: JSON.stringify(requestJSONObject),
error: function() {
// alert("reset password error!");
},
success: function(data, textStatus) {
if (data.succeed) {
window.location.href = data.to;
} else {
$("#tip").text(data.msg);
}
}
});
};
</script>
</body>
</html>
var requestJSONObject = {
"userEmail": $("#emailOrPassword").val()
};
$("#tip").html("<img src='${staticServePath}/images/loading.gif'/> loading...")
$.ajax({
url: "${servePath}/forgot",
type: "POST",
contentType: "application/json",
data: JSON.stringify(requestJSONObject),
error: function() {
// alert("reset password error!");
},
success: function(data, textStatus) {
if (data.succeed) {
window.location.href = data.to;
} else {
$("#tip").text(data.msg);
}
}
});
};
</script>
</@commonPage>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment