登录页面展示
登录页面.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>登录页面</title>
<link rel="stylesheet" href="./css/style.css">
<link rel="stylesheet" href="./css/登录.css">
<style>
.left-bg{
width: 50rem;
height: 73rem;
background-image: url(./images/背景.png);
}
</style>
</head>
<body>
<div class="bg">
<div class="left-bg">
<h1>django-vue-lyadmin pro版</h1>
<p style="color: #666; ">Vue3 + Django4.x易于DIY+低代码开发平台</p>
<div class="copy">
<p>Copyright © 2022 django-vue-lyadmin All rights reserved.</p>
</div>
</div>
<div class="right-bg">
<div class="login-bg">
<img src="images/帮.png" alt="logo" class="logo-bg">
<span>lyadmin后台管理系统</span>
</div>
<form action="login-form">
<div>
<div class="form">
<label>账号登录</label><hr>
</div>
<div class="form account-row">
<input type="text" name="zhanghao" id="zhanghao" placeholder="请输入账号" class="account-input">
<select name="xuanze" id="xuanze" class="account-select">
<option value="admin">管理员</option>
</select>
</div>
<div class="form">
<input type="password" name="mima" id="mima" placeholder="请输入密码">
</div>
<div class="form">
<input type="text" name="yanzhengma" id="yanzhengma" placeholder="验证码" class="yanzhengma-input">
<img src="images/验证码.png" alt="验证码" class="yanzhengma-img">
</div>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<button type="submit" class="login-button">登录</button>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<div class="other">
<span>其他登录方式</span><hr>
<p><img src="images/微信.png" width="40" height="40"></p>
</div>
</div>
</form>
</div>
</div>
</div>
</body>
</html>
登录.css
.bg{
width: 100%;
height: 100%;
display: flex;
}
.left-bg{
width: 30%;
background-color: #1a1a1a;
color: #fff;
padding: 20px;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.left-bg h1{
margin-bottom: 10px;
}
.copy{
font-size: 12px;
}
.right-bg{
width: 70%;
padding: 40px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.logo-bg{
display: flex;
margin-bottom: 20px;
width: 10%;
}
.form{
margin-bottom: 15px;
display: flex;
flex-direction: column;
}
.form input{
padding: 8px;
border: 1px solid #ccc;
border-radius: 3px;
width: 100%;
}
.form select{
padding: 8px;
border: 1px solid #ccc;
border-radius: 3px;
width: 100px;
}
.login-button{
padding: 10px;
background-color: #007bff;
color: #fff;
border: none;
border-radius: 5px;
cursor: pointer;
text-align: center;
font-family: Arial, sans-serif;
width: 100%;
}
.other{
margin-top: 20px;
text-align: center;
}
.other hr{
width: 40%;
margin: 10px auto;
border: none;
border-top: 1px solid #ccc;
}
.login-bg{
width: 100%;
max-width: 400px;
text-align: center;
margin-bottom: 30px;
}
.login-bg span{
font-size: 24px;
font-weight: bold;
color: #333;
}
form{
width: 100%;
max-width: 400px;
}
.account-row{
display: flex;
gap: 10px;
flex-direction: row;
}
.account-input{
width: 70%;
}
.account-select{
width: 30%;
padding: 8px;
border: 1px solid #ccc;
border-radius: 3px;
}
.form:has(.yanzhengma-input){
display: flex;
flex-direction: row;
gap: 10px;
align-items: center;
}
.yanzhengma-input{
width: 70%;
}
.yanzhengma-img{
width: 30%;
height: auto;
object-fit: contain;
}
style.css
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
html{
font-size: 62.5%;
}
html,body{
width: 100%;
height: 100%;
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: #f9f9f9;
}
.bg .right-bg .login-bg span{
font-size: xx-large;
}
.bg .right-bg form div .form label{
font-size: medium;
text-align: left;
}
个人中心展示
个人中心.html
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>个人中心</title>
<link rel="stylesheet" href="./css/style.css">
<link rel="stylesheet" href="./css/个人.css">
</head>
<body>
<div id="bg">
<div id="nrz">
<div id="shang">
<div id="s2">
<img src="./images/头像.png" id="glimg2">
<h1>管理员</h1>
<button id="gl2">管理员</button>
</div>
<div class="b">基本设置</div>
<div id="aa">
<h4>
<div class="a">📄 账号信息</div><br>
<div class="a">🔒 密码</div>
</h4>
</div>
</div><br><hr>
<div id="xia">
<div id="c">数据管理</div>
<h4><div id="d">🗓️ 操作日志</div></h4>
</div>
</div>
<div id="nry">
<div class="nrtop">
<span>个人信息</span><hr>
</div>
<div class="nrdwon">
<div class="inf">
<label for="">账号</label>
<input type="text" name="" class="infor"><br>
<span id="word">账号信息用于登录,系统不允许更改</span>
</div>
<div class="inf">
<label for="">姓名
<input type="text" name="" class="infor">
</label>
</div>
<div class="inf">
<label for="">电话</label>
<input type="text" name="" class="infor">
</div>
<div class="inf">
<label for="">邮箱</label>
<input type="text" name="" class="infor">
</div>
<div id="xb2">
<div>
<span>性别</span>
</div>
<div>
<label>
<input type="radio" name="xb" class="xb1"> 男
</label>
</div>
<div>
<label>
<input type="radio" name="xb" class="xb1"> 女
</label>
</div>
<div>
<label>
<input type="radio" name="xb" class="xb1"> 未知
</label>
</div>
</div>
<div id="btn1">
<button id="btn">保存</button>
</div>
</div>
</div>
</div>
</body>
</html>
个人.css
#bg{
background-color: rgb(220, 219, 219);
width: 100%;
height: 100%;
display: flex;
gap: 2rem;
}
#nrz{
display: flex;
flex-direction: column;
width:30%;
height: 40rem;
background-color:white;
}
#nry{
display: flex;
flex-direction: column;
gap: 6rem;
height: 60rem;
width: 70%; /* 修改为70%宽度 */
opacity: 1;
background-color: white;
margin-right: 0; /* 添加右边距为0 */
}
.nrtop{
font-size: 2.5rem;
padding-top: 1rem;
padding-left: 2rem;
}
#glimg2{
height: 5.5rem;
width: 5.5rem;
border-radius: 10rem;
}
#gl2{
width: 5rem;
height: 3rem;
border-radius: 2rem;
background-color: rgb(17, 86, 234);
color: white;
font-size: 1rem;
cursor: pointer;
}
#s2{
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding-top: 1rem;
}
.a{
font-size: 1.8rem;
padding-left: 2.5rem;
}
#aa{
display: flex;
flex-direction: column;
gap: 2rem;
}
.b{
font-size: 1.8rem;
padding: 1.5rem;
}
#c{
font-size: 1.8rem;
padding-left: 1.5rem;
}
#d{
font-size: 1.8rem;
padding: 2.5rem;
}
.xb1{
width: 2rem;
height: 2rem;
border-radius: 10rem;
}
#xb2{
display: flex;
gap: 2rem;
padding-left: 10rem;
}
.inf{
padding-left: 10rem;
}
.infor{
width: 80rem;
height: 3.5rem;
}
.nrdwon{
display: flex;
flex-direction: column;
gap: 2rem;
}
.nrdwon div{
font-size: 2rem;
}
#btn1{
padding-left: 15rem;
}
#btn{
background-color: rgb(17, 86, 234);
color: white;
width: 6.5rem;
height: 3.5rem;
font-size: 2rem;
border-radius: 0.5rem;
}
#word{
font-size: 1.3rem;
padding-left: 4.5rem;
}
管理页面展示
管理页面.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>主页</title>
<link rel="stylesheet" href="./css/style.css">
<link rel="stylesheet" href="./css/管理.css">
<link rel="stylesheet" href="./font/font_4768l2bxsd/iconfont.css">
<link rel="stylesheet" href="./font/font_afsgk7ag46h/iconfont.css">
</head>
<body>
<div class="bg">
<div class="top">
<div class="top-left">
<img src="./images/帮.png" alt="logo">
<h2>django-vue-lyadmin-pro后台管理系统</h2>
</div>
<div class="top-right">
<div class="iconfont icon-gengxinrizhi" id="biao1">更新日志
</div>
<div><i class="iconfont icon-youshuimian" id="biao2"></i></div>
<div><i class="iconfont icon-xinfeng" id="biao3"></i></div>
<div>
<img src="./images/头像.png" alt="">
<select name="gl" id="gl">
<option value="guanliyuan">管理员</option>
</select>
</div>
</div>
</div>
<div class="bottom">
<div class="left">
<div class="left-top">
<div><i class="iconfont icon-dashboard"></i>DashBoard</div>
<div><i class="iconfont icon-evaluation"></i>数据面板</div>
<div><i class="iconfont icon-guanliyuanguanli"></i>管理员管理</div>
<div><i class="iconfont icon-yonghuguanli"></i>用户管理</div>
<div><i class="iconfont icon-jichuguanli"></i>基础管理</div>
<div><i class="iconfont icon-shangcheng"></i>商城管理</div>
<div><i class="iconfont icon-liuchengguanli"></i>流程管理</div>
<div><i class="iconfont icon-gongnengdaquan"></i>功能大全</div>
<div><i class="iconfont icon-gerenzhongxin"></i>个人中心</div>
<div><i class="iconfont icon-xitongjiankong"></i>系统监控</div>
<div><i class="iconfont icon-xitonggongju"></i>系统工具</div>
<div><i class="iconfont icon-xitongguanli"></i>系统管理</div>
<div><i class="iconfont icon-rizhiguanli"></i>日志管理</div>
</div>
<div class="left-bottom">
<i class="iconfont icon-gengxinrizhi"></i>
</div>
</div>
<div class="right">
<div class="main1">
<div class="tab-container"></div>
</div>
<div class="main2">
<div class="NR"></div>
</div>
</div>
</div>
<script>
function loadContent(text){
const NR = document.querySelector('.NR');
NR.innerHTML = '';
const contentFrame = document.createElement('iframe');
contentFrame.className = 'mini-frame';
if(text.includes('DashBoard')){
contentFrame.src = 'DashBoard.html';
} else if(text.includes('数据面板')){
contentFrame.src = '数据面板.html';
} else if(text.includes('管理员管理')){
contentFrame.src = '管理员管理.html';
} else if(text.includes('用户管理')){
contentFrame.src = '用户管理.html';
}else if(text.includes('基础管理')){
contentFrame.src = '基础管理.html';
}else if(text.includes('商城管理')){
contentFrame.src = '商城管理.html';
}else if(text.includes('流程管理')){
contentFrame.src = '流程管理.html';
}else if(text.includes('功能大全')){
contentFrame.src = '功能大全.html';
}else if(text.includes('系统监控')){
contentFrame.src = '系统监控.html';
}else if(text.includes('系统工具')){
contentFrame.src = '系统工具.html';
}else if(text.includes('系统管理')){
contentFrame.src = '系统管理.html';
}else if(text.includes('日志管理')){
contentFrame.src = '日志管理.html';
}else if(text.includes('个人中心')){
contentFrame.src = '个人中心.html';
}
NR.appendChild(contentFrame);
}
document.querySelectorAll('.left-top div').forEach(item =>{
item.addEventListener('click', function(){
const text = this.textContent.trim();
const tabContainer = document.querySelector('.tab-container');
document.querySelectorAll('.tab').forEach(t => t.classList.remove('active'));
let tab = document.querySelector(`.tab[data-text="${text}"]`);
if (!tab){
tab = document.createElement('div');
tab.className = 'tab';
tab.setAttribute('data-text', text);
tab.innerHTML = `
<span>${text}</span>
<span class="close-tab">×</span>
`;
tabContainer.appendChild(tab);
tab.querySelector('.close-tab').addEventListener('click', function(e) {
e.stopPropagation();
tab.remove();
document.querySelector('.NR').innerHTML = '';
});
}
tab.addEventListener('click', function(e){
if(e.target.classList.contains('close-tab')) return;
document.querySelectorAll('.tab').forEach(t => t.classList.remove('active'));
this.classList.add('active');
loadContent(text);
});
tab.classList.add('active');
loadContent(text);
});
});
</script>
</body>
</html>
管理.css
.bg{
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}
.top{
background-color: #292e38;
height: 7%;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
img{
width: 30px;
height: 30px;
border-radius: 5px;
}
.top-left{
width: 50%;
display: flex;
flex-direction: row;
color: #fff;
font-size: 14px;
}
.top-right{
width: 50%;
margin-left: auto;
display: flex;
align-items: center;
justify-content: flex-end;
gap: 20px;
padding-right: 20px;
}
.top-right > div{
display: flex;
align-items: center;
color: #fff;
font-size: 14px;
cursor: pointer;
}
#biao1{
color: #f38600;
transition: all 0.3s ease;
}
#biao1:hover{
transform: scale(1.1);
color: #ff9f2a;
}
#biao2{
color: #ffffff;
font-size: 1.2rem;
transition: all 0.3s ease;
}
#biao2:hover{
transform: scale(1.1);
color: #f38600;
}
#biao3{
background-color: rgb(162, 159, 159);
width: 32px;
height: 32px;
padding: 2px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 1.2rem;
transition: all 0.3s ease;
}
#biao3:hover{
background-color: #f38600;
transform: scale(1.1);
}
.top-right img{
width: 32px;
height: 32px;
border-radius: 50%;
margin-right: 8px;
}
#gl{
background: transparent;
border: none;
color: #fff;
font-size: 14px;
cursor: pointer;
outline: none;
}
#gl option{
background: #292e38;
color: #fff;
}
/************下部*************/
.bottom{
background-color: #fFFFFF;
height: 93%;
width: 100%;
display: flex;
flex-direction: row;
}
.left{
background-color: #292e38;
height: 100%;
width: 10%;
display: flex;
flex-direction: column;
justify-content:space-between;
}
.left-top div{
width: 100%;
height: 3rem;
color: #fff;
font-size: 16px;
}
.left-top i{
margin-right: 1rem;
}
.left-top div:hover{
background-color: #ffffff;
color: rgb(55, 125, 223, 0.889);
font-weight: bold;
}
.left-bottom{
align-items: center;
margin-top: 7rem;
bottom: 1rem;
margin-left: 4rem;
}
.left-bottom i{
color: #fff;
width: 6rem;
height: 5rem;
font-size: 16px;
}
.left-bottom div:hover{
background-color: #ffffff;
color: rgb(55, 125, 223, 0.889);
font-weight: bold;
}
.right{
background-color: #fFFFFF;
width: calc(100% - 15rem);
height: 43.6rem;
position: absolute;
left: 14.5rem;
top: 4.5rem;
}
.main1{
width: 80.6rem;
height: 2rem;
display: flex;
padding: 0.2rem;
margin-top: 0;
margin-bottom: 10px;
}
.tab-container{
display: flex;
flex-wrap: wrap;
gap: 5px;
padding: 5px;
margin-top: 0;
}
.tab{
background: #fff;
padding: 5px 10px;
border-radius: 3px;
cursor: pointer;
display: flex;
align-items: center;
border: 1px solid #fff;
margin-right: 5px;
}
.tab.active{
background: #1890ff;
color: #fff;
}
.close-tab{
margin-left: 5px;
font-size: 16px;
line-height: 1;
}
.close-tab:hover{
color: #ff4d4f;
}
.mini-frame{
width: 100%;
height: 100%;
border: none;
}
.main2{
width: 100%;
height: 41.6rem;
position: relative;
overflow: hidden;
margin-top: 10px;
}
.NR{
width: 100%;
height: 100%;
position: relative;
}