nps/web/views/login/index.html

85 lines
2.4 KiB
Go
Executable File

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>nps admin login</title>
<link href="{{.web_base_url}}/static/css/bootstrap.min.css" rel="stylesheet">
<link href="{{.web_base_url}}/static/font-awesome/css/font-awesome.css" rel="stylesheet">
<link href="{{.web_base_url}}/static/css/style.css" rel="stylesheet">
</head>
<body class="gray-bg">
<div class="loginColumns animated fadeInDown">
<div class="row">
<div class="col-md-offset-3 col-md-6">
<h2 class="font-bold">nps</h2>
<p>
A convenient proxy server
</p>
<p>
Using it, it can penetrate the intranet tcpudpsocks5httpp2p and so on
</p>
<p>
and more?
</p>
<p>
goto <a href="//github.com/cnlh/nps">nps</a>
</p>
<div class="ibox-content">
<form class="m-t" onsubmit="return false">
<div class="form-group">
<input name="username" class="form-control" placeholder="username" required="">
</div>
<div class="form-group">
<input name="password" type="password" class="form-control" placeholder="password" required="">
</div>
<button onclick="login()" class="btn btn-primary block full-width m-b">login</button>
{{if eq true .register_allow}}
<a class="btn btn-sm btn-white btn-block" href="{{.web_base_url}}/login/register">register</a>
{{end}}
</form>
</div>
</div>
</div>
<hr/>
</div>
</body>
<script src="{{.web_base_url}}/static/js/jquery-2.1.1.js"></script>
</html>
<script type="text/javascript">
// Login Page Flipbox control
function login() {
$.ajax({
type: "POST",
url: "{{.web_base_url}}/login/verify",
data: $("form").serializeArray(),
success: function (res) {
if (res.status) {
window.location.href = "{{.web_base_url}}/index/index"
} else {
alert(res.msg)
}
}
})
return false
}
</script>
</body>
</html>