mirror of
https://github.com/Kakune55/PyGetGPT.git
synced 2025-09-14 11:19:31 +08:00
为后台管理添加菜单栏
This commit is contained in:
@@ -7,7 +7,7 @@ body {
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
background-image: url("../static/img/bg_circles.png");
|
||||
background-repeat: repeat;
|
||||
background-repeat: repeat;
|
||||
}
|
||||
#chat-container {
|
||||
width: 80%; /* 使用百分比宽度 */
|
||||
|
52
static/menu.css
Normal file
52
static/menu.css
Normal file
@@ -0,0 +1,52 @@
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: 'Arial', sans-serif;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
#sidebar {
|
||||
height: 100vh;
|
||||
width: 250px;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: -200px;
|
||||
background-color: #006699;
|
||||
overflow-x: hidden;
|
||||
transition: 0.5s;
|
||||
padding-top: 60px;
|
||||
color: white;
|
||||
z-index: 2; /* 保证遮罩在页面上方 */
|
||||
}
|
||||
|
||||
#sidebar a {
|
||||
padding: 15px 10px;
|
||||
text-decoration: none;
|
||||
font-size: 18px;
|
||||
color: white;
|
||||
display: block;
|
||||
transition: 0.3s;
|
||||
}
|
||||
|
||||
#sidebar a:hover {
|
||||
background-color: #3366CC;
|
||||
}
|
||||
|
||||
#main {
|
||||
padding: 30px;
|
||||
padding-left: 80px;
|
||||
}
|
||||
|
||||
#global-blur {
|
||||
background-color: rgba(255, 255, 255, 0);
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
backdrop-filter: blur(8px); /* 模糊度可以根据需要调整 */
|
||||
transition: display;
|
||||
z-index: 1; /* 保证遮罩在页面上方 */
|
||||
pointer-events: none; /* 确保遮罩不影响下方元素的交互 */
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease
|
||||
}
|
9
static/menu.js
Normal file
9
static/menu.js
Normal file
@@ -0,0 +1,9 @@
|
||||
function openNav() {
|
||||
document.getElementById("sidebar").style.left = "0";
|
||||
document.getElementById("global-blur").style.opacity = 1;
|
||||
}
|
||||
|
||||
function closeNav() {
|
||||
document.getElementById("sidebar").style.left = "-200px";
|
||||
document.getElementById("global-blur").style.opacity = 0;
|
||||
}
|
Reference in New Issue
Block a user