<!DOCTYPE html>
<html>
<head>
{include file="common/meta" /}
<style type="text/css">
/* 基础样式重置与全局设置 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
color: #333;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
background-size: cover;
background-position: center;
background-attachment: fixed;
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
margin: 0;
transition: background-color 0.5s ease;
}
a {
color: #667eea;
text-decoration: none;
transition: color 0.3s ease;
}
a:hover {
color: #5a67d8;
}
/* 登录容器样式 */
.container {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.login-wrapper {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
}
.login-screen {
max-width: 430px;
width: 100%;
padding: 0 20px;
margin: 0 auto;
animation: fadeIn 0.6s ease-out;
}
.login-screen .well {
border-radius: 12px;
-webkit-box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
border: none;
overflow: hidden;
padding: 0;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.login-screen .well:hover {
transform: translateY(-5px);
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}
/* 头像样式 */
.profile-img-card {
width: 80px;
height: 80px;
display: block;
-moz-border-radius: 50%;
-webkit-border-radius: 50%;
border-radius: 50%;
margin: -40px auto 20px;
border: 4px solid #fff;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
transition: transform 0.3s ease;
object-fit: cover;
}
.profile-img-card:hover {
transform: scale(1.05);
}
.profile-name-card {
text-align: center;
font-size: 18px;
font-weight: 500;
margin-bottom: 20px;
color: #4a5568;
}
/* 登录头部 */
.login-head {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-radius: 12px 12px 0 0;
padding: 20px 0;
position: relative;
overflow: hidden;
}
.login-head::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1IiBoZWlnaHQ9IjUiPgo8cmVjdCB3aWR0aD0iNSIgaGVpZ2h0PSI1IiBmaWxsPSIjZmZmZmZmMjAiPjwvcmVjdD4KPHBhdGggZD0iTTAgNUw1IDBaTTYgNEw0IDZaTS0xIDFMMSAtMVoiIHN0cm9rZT0iI2ZmZmZmZjIwIiBzdHJva2Utd2lkdGg9IjEiPjwvcGF0aD4KPC9zdmc+');
opacity: 0.2;
}
.login-head img {
width: 100%;
max-width: 200px;
display: block;
margin: 0 auto;
position: relative;
z-index: 1;
}
/* 登录表单区域 */
.login-form {
padding: 30px 40px 40px;
position: relative;
z-index: 99;
}
#login-form {
margin-top: 10px;
}
/* 输入框样式 */
#login-form .input-group {
margin-bottom: 20px;
position: relative;
}
#login-form .form-control {
font-size: 14px;
padding: 12px 15px 12px 45px;
border: 1px solid #e2e8f0;
border-radius: 8px;
transition: all 0.3s ease;
background-color: #f8fafc;
}
#login-form .form-control:focus {
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
background-color: #ffffff;
outline: none;
transform: translateY(-1px);
}
#login-form .form-control::placeholder {
color: #a0aec0;
}
#login-form .input-group-addon {
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 45px;
display: flex;
align-items: center;
justify-content: center;
background-color: transparent;
border: none;
color: #667eea;
border-radius: 8px 0 0 8px;
z-index: 10;
font-size: 16px; /* 确保图标有足够的大小 */
}
/* 为图标元素添加明确的样式 */
#login-form .input-group-addon i {
display: block;
font-size: 18px;
line-height: 1;
text-align: center;
font-weight: normal;
}
/* 验证码添加on样式 */
.captcha-addon {
display: flex;
align-items: center;
justify-content: flex-end;
padding: 0;
border: none;
cursor: pointer;
width: 30%;
}
/* 验证码样式 */
#login-form .input-group:last-child .input-group-addon {
border-radius: 8px;
}
#login-form .input-group:last-child .form-control {
border-radius: 8px 0 0 8px;
}
#login-form .input-group:last-child .input-group-addon:last-child {
position: static;
width: auto;
padding: 0;
border: none;
border-radius: 0 8px 8px 0;
overflow: hidden;
}
#login-form .input-group:last-child .input-group-addon:last-child img {
width: 100px;
height: 44px;
border-radius: 0 8px 8px 0;
transition: transform 0.3s ease;
}
#login-form .input-group:last-child .input-group-addon:last-child img:hover {
transform: scale(1.05);
}
/* 记住登录选项 */
.form-group.checkbox {
margin-bottom: 20px;
}
.form-group.checkbox label {
display: flex;
align-items: center;
cursor: pointer;
font-size: 14px;
color: #4a5568;
transition: color 0.3s ease;
}
.form-group.checkbox label:hover {
color: #667eea;
}
.form-group.checkbox input[type="checkbox"] {
margin-right: 8px;
width: 16px;
height: 16px;
cursor: pointer;
}
/* 登录按钮 */
.form-group button[type="submit"] {
font-size: 16px;
font-weight: 600;
padding: 12px 0;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.form-group button[type="submit"]::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
transition: left 0.5s ease;
}
.form-group button[type="submit"]:hover::before {
left: 100%;
}
.form-group button[type="submit"]:hover {
transform: translateY(-2px);
box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}
.form-group button[type="submit"]:active {
transform: translateY(0);
box-shadow: 0 5px 10px rgba(102, 126, 234, 0.4);
}
/* 错误提示样式 */
#errtips {
padding: 12px 15px;
margin-bottom: 20px;
border-radius: 8px;
font-size: 14px;
animation: slideDown 0.3s ease;
}
/* 动画效果 */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes slideDown {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* 响应式设计 */
@media (max-width: 767px) {
.login-screen {
padding: 0 15px;
}
.login-form {
padding: 25px 30px 35px;
}
.login-head img {
max-width: 180px;
}
}
@media (max-width: 480px) {
.login-form {
padding: 20px 25px 30px;
}
.profile-img-card {
width: 70px;
height: 70px;
margin: -35px auto 15px;
}
#login-form .form-control {
font-size: 14px;
padding: 10px 12px 10px 40px;
}
#login-form .input-group-addon {
width: 40px;
}
.form-group button[type="submit"] {
font-size: 15px;
padding: 10px 0;
}
}
</style>
<!--@formatter:off-->
{if $background}
<style type="text/css">
body{
background-image: url('{$background|htmlentities}');
background-color: #f1f4fd;
background-blend-mode: overlay;
}
</style>
{/if}
<!--@formatter:on-->
</head>
<body>
<div class="container">
<div class="login-wrapper">
<div class="login-screen">
<div class="well">
<div class="login-head">
<img src="__CDN__/assets/img/login-head.png" alt="Logo" />
</div>
<div class="login-form">
<img id="profile-img" class="profile-img-card" src="__CDN__/assets/img/avatar.png" alt="User Avatar"/>
<p id="profile-name" class="profile-name-card"> {$site.name}</p>
<form action="" method="post" id="login-form">
<!--@AdminLoginFormBegin-->
<div id="errtips" class="hide alert alert-danger"></div>
{:token()}
<div class="input-group" style="width: 100%;">
<div class="input-group-addon"><i class="fa fa-user" aria-hidden="true"></i></div>
<input type="text" class="form-control" id="pd-form-username" placeholder="{:__('Username')}" name="username" autocomplete="off" value="" data-rule="{:__('Username')}:required;username"/>
</div>
<div class="input-group" style="width: 100%;">
<div class="input-group-addon"><i class="fa fa-lock" aria-hidden="true"></i></div>
<input type="password" class="form-control" id="pd-form-password" placeholder="{:__('Password')}" name="password" autocomplete="off" value="" data-rule="{:__('Password')}:required;password"/>
</div>
<!--@CaptchaBegin-->
{if $Think.config.fastadmin.login_captcha}
<div class="input-group">
<div class="input-group-addon"><i class="fa fa-shield" aria-hidden="true"></i></div>
<input type="text" name="captcha" class="form-control" placeholder="{:__('Captcha')}" data-rule="{:__('Captcha')}:required;length({$Think.config.captcha.length|htmlentities})" autocomplete="off" style="width: 70%;"/>
<span class="captcha-addon">
<img src="{:rtrim('__PUBLIC__', '/')}/index.php?s=/captcha" width="100%" height="33" onclick="this.src = '{:rtrim('__PUBLIC__', '/')}/index.php?s=/captcha&r=' + Math.random();" alt="Captcha"/>
</span>
</div>
{/if}
<!--@CaptchaEnd-->
{if $keeyloginhours>0}
<div class="form-group checkbox">
<label class="inline" for="keeplogin" data-toggle="tooltip" title="{:__('The duration of the session is %s hours', $keeyloginhours)}">
<input type="checkbox" name="keeplogin" id="keeplogin" value="1"/>
{:__('Keep login')}
</label>
</div>
{/if}
<div class="form-group">
<button type="submit" class="btn btn-lg btn-block">{:__('Sign in')}</button>
</div>
<!--@AdminLoginFormEnd-->
</form>
</div>
</div>
</div>
</div>
</div>
{include file="common/script" /}
<script>
// 添加表单提交动画效果
$(document).ready(function() {
$('#login-form').on('submit', function() {
$(this).find('button[type="submit"]').html('<i class="fa fa-spinner fa-spin"></i> {:__('Signing in...')}').prop('disabled', true);
});
});
</script>
</body>
</html>