133 lines
5.5 KiB
Plaintext
133 lines
5.5 KiB
Plaintext
@{
|
|
Layout = null;
|
|
}
|
|
@model Backend.Models.LoginViewModel
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>登入 | @ViewData["ProjectName"]後台管理系統</title>
|
|
|
|
<!-- base css -->
|
|
<link id="vendorsbundle" rel="stylesheet" media="screen, print" href="~/css/vendors.bundle.css">
|
|
<link id="appbundle" rel="stylesheet" media="screen, print" href="~/css/app.bundle.css">
|
|
<link id="mytheme" rel="stylesheet" media="screen, print" href="~/css/themes/cust-theme-8.css">
|
|
<link id="myskin" rel="stylesheet" media="screen, print" href="~/css/skins/skin-master.css">
|
|
<!-- Place favicon.ico in the root directory -->
|
|
<link rel="apple-touch-icon" sizes="180x180" href="~/img/favicon/apple-touch-icon.png">
|
|
<link rel="icon" type="image/png" sizes="32x32" href="~/img/favicon/favicon-32x32.png">
|
|
<link rel="mask-icon" href="~/img/favicon/safari-pinned-tab.svg" color="#5bbad5">
|
|
<link rel="stylesheet" media="screen, print" href="~/css/page-login-alt.css">
|
|
|
|
<!-- Font Awesome -->
|
|
<link href="~/lib/fontawesome-free/css/all.min.css" rel="stylesheet" />
|
|
<!-- icheck bootstrap -->
|
|
<link href="~/lib/icheck-bootstrap/icheck-bootstrap.min.css" rel="stylesheet" />
|
|
<!-- Theme style -->
|
|
</head>
|
|
<body>
|
|
<div class="blankpage-form-field">
|
|
<div class="page-logo m-0 w-100 align-items-center justify-content-center rounded border-bottom-left-radius-0 border-bottom-right-radius-0 px-2">
|
|
<div class="w-100 page-logo-link press-scale-down d-flex align-items-center">
|
|
<img src="/img/dome.png" width="50%" aria-roledescription="logo">
|
|
<span class="page-logo-text">@(ViewBag.ProjectName)後台管理系統</span>
|
|
</div>
|
|
</div>
|
|
<div class="card p-4 border-top-left-radius-0 border-top-right-radius-0">
|
|
@if (ViewBag.ErrMsg != null && ViewBag.ErrMsg != "")
|
|
{
|
|
<p class="alert alert-danger">@ViewBag.ErrMsg</p>
|
|
}
|
|
<form id="login-form" asp-action="Index" method="post">
|
|
<div class="form-group">
|
|
<label class="form-label" for="username">帳號</label>
|
|
<input asp-for="Account" type="text" id="account" class="form-control" placeholder="Account">
|
|
<span asp-validation-for="Account" class="text-danger"></span>
|
|
<span class="help-block">
|
|
您的帳號
|
|
</span>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="form-label" for="password">密碼</label>
|
|
<input asp-for="Password" type="password" id="password" class="form-control" placeholder="Password" autocomplete="off">
|
|
<span asp-validation-for="Password" class="text-danger"></span>
|
|
<span class="help-block">
|
|
您的密碼
|
|
</span>
|
|
</div>
|
|
<div class="form-group text-left">
|
|
<div class="custom-control custom-checkbox">
|
|
<input type="checkbox" class="custom-control-input" id="rememberme">
|
|
<label class="custom-control-label" for="rememberme"> 記住我</label>
|
|
</div>
|
|
</div>
|
|
<button type="submit" class="btn btn-default float-right">登入</button>
|
|
</form>
|
|
</div>
|
|
<div class="blankpage-footer text-center">
|
|
<a asp-controller="Login" asp-action="ForgotPassword"><strong>忘記密碼</strong></a>
|
|
</div>
|
|
</div>
|
|
|
|
<video poster="~/img/backgrounds/clouds.png" id="bgvid" playsinline autoplay muted loop>
|
|
<source src="~/media/video/cc.webm" type="video/webm">
|
|
<source src="~/media/video/cc.mp4" type="video/mp4">
|
|
</video>
|
|
<!-- jQuery -->
|
|
<script src="~/lib/jquery/dist/jquery.js"></script>
|
|
<!-- Bootstrap 4 -->
|
|
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
|
|
|
<script src="~/js/vendors.bundle.js"></script>
|
|
<script src="~/js/app.bundle.js"></script>
|
|
</body>
|
|
</html>
|
|
|
|
<script>
|
|
var remember = false;
|
|
$(function () {
|
|
if (localStorage.getItem('solar-t') == 'true') {
|
|
document.getElementById("rememberme").checked = true;
|
|
remember = true;
|
|
$("#account").val(atob(localStorage.getItem('solar-a')));
|
|
$("#password").val(atob(localStorage.getItem('solar-p')));
|
|
}
|
|
else {
|
|
document.getElementById("rememberme").checked = false;
|
|
}
|
|
});
|
|
|
|
$("#rememberme").click(function () {
|
|
if (remember) {
|
|
localStorage.setItem('solar-t', 'false');
|
|
localStorage.removeItem('solar-a');
|
|
localStorage.removeItem('solar-p');
|
|
remember = false;
|
|
} else {
|
|
localStorage.setItem('solar-t', 'true');
|
|
localStorage.setItem('solar-a', btoa($("#account").val()));
|
|
localStorage.setItem('solar-p', btoa($("#password").val()));
|
|
remember = true;
|
|
}
|
|
});
|
|
|
|
$("#account").change(function () {
|
|
if (remember) {
|
|
localStorage.setItem('solar-a', btoa($("#account").val()));
|
|
} else {
|
|
localStorage.removeItem('solar-a');
|
|
}
|
|
});
|
|
|
|
$("#password").change(function () {
|
|
if (remember) {
|
|
localStorage.setItem('solar-p', btoa($("#password").val()));
|
|
} else {
|
|
localStorage.removeItem('solar-p');
|
|
}
|
|
});
|
|
</script>
|
|
|
|
|