mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-04-05 20:17:53 +08:00
288 lines
12 KiB
Smarty
288 lines
12 KiB
Smarty
<!DOCTYPE html>
|
||
<html lang="zh-cn">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<link rel="shortcut icon" href="{{cdnimg "/static/favicon.ico"}}">
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||
<meta name="renderer" content="webkit" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<meta name="author" content="MinDoc" />
|
||
<title>{{i18n .Lang "common.login"}} - Powered by SSHotRiver</title>
|
||
<meta name="keywords" content="MinDoc,文档在线管理系统,WIKI,wiki,wiki在线,文档在线管理,接口文档在线管理,接口文档管理">
|
||
<meta name="description" content="MinDoc文档在线管理系统 {{.site_description}}">
|
||
<!-- Bootstrap -->
|
||
<link href="{{cdncss "/static/bootstrap/css/bootstrap.min.css"}}" rel="stylesheet">
|
||
<link href="{{cdncss "/static/font-awesome/css/font-awesome.min.css"}}" rel="stylesheet">
|
||
<link href="{{cdncss "/static/css/main.css" "version"}}" rel="stylesheet">
|
||
<style>
|
||
.line {
|
||
height:0;
|
||
border-top: 1px solid #cccccc;
|
||
text-align:center;
|
||
margin: 14px 0;
|
||
}
|
||
.line > .text {
|
||
position:relative;
|
||
top:-12px;
|
||
background-color:#fff;
|
||
padding: 5px;
|
||
}
|
||
.icon-box {
|
||
align-items: center;
|
||
justify-content: center;
|
||
display: flex;
|
||
display: -webkit-flex;
|
||
}
|
||
|
||
.icon {
|
||
box-sizing: border-box;
|
||
display: inline-block;
|
||
padding: 10px;
|
||
border-radius: 50%;
|
||
cursor: pointer;
|
||
margin: 0 5px;
|
||
}
|
||
.icon-disable {
|
||
background-color: #cccccc;
|
||
cursor: not-allowed;
|
||
}
|
||
.icon-disable:hover {
|
||
background-color: #bbbbbb;
|
||
}
|
||
|
||
.icon > img {
|
||
height: 24px;
|
||
}
|
||
</style>
|
||
<!-- 滚动条样式 -->
|
||
<style>
|
||
/* 滚动条动画,从右到左循环 */
|
||
@keyframes scroll-left {
|
||
0% {
|
||
transform: translateX(50%);
|
||
}
|
||
100% {
|
||
transform: translateX(-100%);
|
||
}
|
||
}
|
||
|
||
/* 滚动条容器 */
|
||
.scrolling-text {
|
||
overflow: hidden;
|
||
white-space: nowrap;
|
||
width: 100%;
|
||
box-sizing: border-box;
|
||
background-color: #f0f0f0;
|
||
border: 1px solid #5cb85c;
|
||
margin: 80px 0 0px 0;
|
||
position: relative;
|
||
height: 40px;
|
||
border-radius: 15px;
|
||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||
}
|
||
|
||
/* 滚动的文本内容 */
|
||
.scrolling-content {
|
||
display: inline-block;
|
||
animation: scroll-left 30s linear infinite;
|
||
color: #555;
|
||
font-size: 18px;
|
||
font-weight: bold;
|
||
line-height: 40px;
|
||
padding: 0 0px;
|
||
transform: translateX(100%);
|
||
}
|
||
|
||
/* 渐变效果,用于遮盖滚动条的两端 */
|
||
.scrolling-text::before,
|
||
.scrolling-text::after {
|
||
content: '';
|
||
position: absolute;
|
||
top: 0;
|
||
width: 40px;
|
||
height: 100%;
|
||
background: linear-gradient(to right, #f0f0f0, rgba(240, 240, 240, 0));
|
||
z-index: 1;
|
||
}
|
||
|
||
.scrolling-text::after {
|
||
right: 0;
|
||
background: linear-gradient(to left, #f0f0f0, rgba(240, 240, 240, 0));
|
||
}
|
||
|
||
.scrolling-text::before {
|
||
left: 0;
|
||
}
|
||
|
||
/* 新添加的类,用于触发动画 */
|
||
.start-animation .scrolling-content {
|
||
animation-play-state: running;
|
||
}
|
||
</style>
|
||
<script>
|
||
document.addEventListener("DOMContentLoaded", function () {
|
||
document.querySelector(".scrolling-content").classList.add("start-animation");
|
||
});
|
||
</script>
|
||
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
|
||
<script src="{{cdnjs "/static/jquery/1.12.4/jquery.min.js"}}"></script>
|
||
</head>
|
||
<body class="manual-container">
|
||
<header class="navbar navbar-static-top smart-nav navbar-fixed-top manual-header" role="banner">
|
||
<div class="container">
|
||
<div class="navbar-header col-sm-12 col-md-6 col-lg-5">
|
||
<a href="{{.BaseUrl}}" class="navbar-brand">{{.SITE_NAME}}</a>
|
||
</div>
|
||
</div>
|
||
</header>
|
||
<div class="container manual-body">
|
||
<div class="row login">
|
||
<div class="login-body">
|
||
<form role="form" method="post">
|
||
{{ .xsrfdata }}
|
||
<h3 class="text-center">{{i18n .Lang "common.login"}}</h3>
|
||
<div class="form-group">
|
||
<div class="input-group">
|
||
<div class="input-group-addon">
|
||
<i class="fa fa-user"></i>
|
||
</div>
|
||
<input type="text" class="form-control" placeholder="{{i18n .Lang "common.email"}} / {{i18n .Lang "common.username"}}" name="account" id="account" autocomplete="off">
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<div class="input-group">
|
||
<div class="input-group-addon">
|
||
<i class="fa fa-lock"></i>
|
||
</div>
|
||
<input type="password" class="form-control" placeholder="{{i18n .Lang "common.password"}}" name="password" id="password" autocomplete="off">
|
||
</div>
|
||
</div>
|
||
{{if .ENABLED_CAPTCHA }}
|
||
{{if ne .ENABLED_CAPTCHA "false"}}
|
||
<div class="form-group">
|
||
<div class="input-group" style="float: left;width: 195px;">
|
||
<div class="input-group-addon">
|
||
<i class="fa fa-check-square"></i>
|
||
</div>
|
||
<input type="text" name="code" id="code" class="form-control" style="width: 150px" maxlength="5" placeholder="{{i18n .Lang "common.captcha"}}" autocomplete="off">
|
||
</div>
|
||
<img id="captcha-img" style="width: 140px;height: 40px;display: inline-block;float: right" src="{{urlfor "AccountController.Captcha"}}" onclick="this.src='{{urlfor "AccountController.Captcha"}}?key=login&t='+(new Date()).getTime();" title={{i18n .Lang "message.click_to_change"}}>
|
||
<div class="clearfix"></div>
|
||
</div>
|
||
{{end}}
|
||
{{end}}
|
||
<div class="checkbox">
|
||
<label>
|
||
<input type="checkbox" name="is_remember" value="yes"> {{i18n .Lang "common.keep_login"}}
|
||
</label>
|
||
<a href="{{urlfor "AccountController.FindPassword" }}" style="display: inline-block;float: right">{{i18n .Lang "common.forgot_password"}}</a>
|
||
</div>
|
||
<div class="form-group">
|
||
<button type="button" id="btn-login" class="btn btn-success" style="width: 100%" data-loading-text="{{i18n .Lang "common.logging_in"}}" autocomplete="off">{{i18n .Lang "common.login"}}</button>
|
||
</div>
|
||
{{if .ENABLED_REGISTER}}
|
||
{{if ne .ENABLED_REGISTER "false"}}
|
||
<div class="form-group">
|
||
{{i18n .Lang "message.no_account_yet"}} <a href="{{urlfor "AccountController.Register" }}" title={{i18n .Lang "common.register"}}>{{i18n .Lang "common.register"}}</a>
|
||
</div>
|
||
{{end}}
|
||
{{end}}
|
||
</form>
|
||
</div>
|
||
</div>
|
||
<div class="clearfix"></div>
|
||
</div>
|
||
<!-- 滚动条 -->
|
||
<div class="container">
|
||
<div class="scrolling-text">
|
||
<div class="scrolling-content">
|
||
本站内容涵盖:创业知识,副业兼职,项目拆解,职场技能,认知提升,个人成长,新媒体运营,兴趣爱好,AI使用等创业的方方面面。现在仅需99元便可开通永久特权账号,享受本站全部内容和服务,请添加微信号(hjyfa01)并备注“黄敬尧掘金频道”创建登录账号!
|
||
</div>
|
||
</div>
|
||
</div>
|
||
{{template "widgets/footer.tpl" .}}
|
||
<!-- Include all compiled plugins (below), or include individual files as needed -->
|
||
<script src="{{cdnjs "/static/bootstrap/js/bootstrap.min.js"}}" type="text/javascript"></script>
|
||
<script src="{{cdnjs "/static/layer/layer.js"}}" type="text/javascript"></script>
|
||
|
||
<script type="text/javascript">
|
||
$(document).ready(function () {
|
||
$("#account,#password,#code").on('focus', function () {
|
||
$(this).tooltip('destroy').parents('.form-group').removeClass('has-error');
|
||
});
|
||
|
||
$(document).keydown(function (e) {
|
||
var event = document.all ? window.event : e;
|
||
if (event.keyCode === 13) {
|
||
$("#btn-login").click();
|
||
}
|
||
});
|
||
|
||
$(".icon").on('click', function (){
|
||
if ($(this).hasClass("icon-disable")) {
|
||
return;
|
||
}
|
||
window.location.href = $(this).data("url");
|
||
})
|
||
|
||
$("#btn-login").on('click', function () {
|
||
$(this).tooltip('destroy').parents('.form-group').removeClass('has-error');
|
||
var $btn = $(this).button('loading');
|
||
|
||
var account = $.trim($("#account").val());
|
||
var password = $.trim($("#password").val());
|
||
var code = $("#code").val();
|
||
|
||
if (account === "") {
|
||
$("#account").tooltip({ placement: "auto", title: "{{i18n .Lang "message.account_empty"}}", trigger: 'manual' })
|
||
.tooltip('show')
|
||
.parents('.form-group').addClass('has-error');
|
||
$btn.button('reset');
|
||
return false;
|
||
} else if (password === "") {
|
||
$("#password").tooltip({ title: '{{i18n .Lang "message.password_empty"}}', trigger: 'manual' })
|
||
.tooltip('show')
|
||
.parents('.form-group').addClass('has-error');
|
||
$btn.button('reset');
|
||
return false;
|
||
} else if (code !== undefined && code === "") {
|
||
$("#code").tooltip({ title: '{{i18n .Lang "message.captcha_empty"}}', trigger: 'manual' })
|
||
.tooltip('show')
|
||
.parents('.form-group').addClass('has-error');
|
||
$btn.button('reset');
|
||
return false;
|
||
} else {
|
||
$.ajax({
|
||
url: "{{urlfor "AccountController.Login" "url" .url}}",
|
||
data: $("form").serializeArray(),
|
||
dataType: "json",
|
||
type: "POST",
|
||
success: function (res) {
|
||
if (res.errcode !== 0) {
|
||
$("#captcha-img").click();
|
||
$("#code").val('');
|
||
layer.msg(res.message);
|
||
$btn.button('reset');
|
||
} else {
|
||
turl = res.data;
|
||
if (turl === "") {
|
||
turl = "/";
|
||
}
|
||
window.location = turl;
|
||
}
|
||
},
|
||
error: function () {
|
||
$("#captcha-img").click();
|
||
$("#code").val('');
|
||
layer.msg('{{i18n .Lang "message.system_error"}}');
|
||
$btn.button('reset');
|
||
}
|
||
});
|
||
}
|
||
|
||
return false;
|
||
});
|
||
});
|
||
</script>
|
||
</body>
|
||
</html> |