Files
hsa/Html/apps/static/css/desktop.css
2025-12-12 16:26:51 +08:00

343 lines
7.8 KiB
CSS

/* 左右两侧的页面内容 */
.sidebar {
background-color: #f0f0f0;
height: 100%;
display: flex;
flex-direction: column; /* 使子元素垂直排列 */
}
#leftSidebar {
padding-left: 3px;
}
body {
font-family: Arial, sans-serif;
display: flex;
flex-direction: column;
height: 100vh;
margin: 0;
}
.chatbox {
flex-grow: 1;
padding: 20px;
width: 100%;
flex: 1;
overflow-y: auto;
border: 1px solid #ccc;
background-color: #f9f9f9;
}
.chat-message {
max-width: 95%;
padding: 10px 15px;
border-radius: 20px;
margin-bottom: 10px;
}
.user-message {
background-color: #d1e7dd;
text-align: right;
margin-left: auto;
}
.server-message {
background-color: #f1f1f1;
text-align: left;
margin-right: auto;
}
textarea {
flex-grow: 1;
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
resize: none;
}
button {
padding: 10px 20px;
margin-left: 10px;
background-color: #28a745;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}
pre {
background-color: #eee;
padding: 10px;
border-radius: 4px;
}
code {
font-family: monospace;
}
/* 让父容器为flex布局 */
.maxcontainer {
display: flex;
flex-grow: 1;
height: 100%;
position: relative;
}
.chatbox-header {
padding: 10px;
background-color: #f1f1f1;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #ddd;
}
.input-area {
display: flex;
gap: 10px;
margin-top: 15px;
padding: 10px;
background-color: #f1f1f1;
border-top: 1px solid #ddd;
}
.slider-container, .language-toggle {
display: flex;
align-items: center;
}
.slider-container input[type="range"] {
width: 70%;
margin-left: 10px;
}
.btn-group-toggle .btn {
padding: 5px 10px;
}
#leftSidebar, .vscode-web, #rightSidebar {
height: 100%;
overflow: auto;
}
/* 主容器,使用 grid 布局 */
#maxcontainer {
display: grid;
grid-template-columns: 2fr 5px 3fr 5px 2fr; /* 默认宽度比例 */
height: 100%;
}
/* 各区域基础样式 */
.sidebar {
overflow: auto; /* 确保内容可以滚动 */
}
.vscode-web {
width: 100%;
height: 100%;
}
.resizer {
background-color: #ccc;
cursor: col-resize;
width: 5px;
}
.gutter {
background-color: #ccc; /* 分隔条颜色 */
cursor: col-resize;
}#container {
display: grid;
grid-template-columns: 1fr 5px 3fr 5px 1fr; /* 初始比例 */
height: 100%;
}
#leftSidebar, #vscodeWeb, #rightSidebar {
overflow: auto;
}
#dragbar, #dragbar2 {
background-color: #ccc;
cursor: col-resize;
}
/* 设置每个子框的基本样式 */
.progress-box {
height: 100%; /* 高度为 100%,撑满容器 */
display: flex;
flex-direction: row; /* 使子框横向排列 */
justify-content: flex-start;
align-items: center;
gap: 2px; /* 进度条之间的间距 */
}
.progress-title {
height: 8px; /* 更细的进度条 */
flex: 1; /* 均匀分配宽度 */
border-radius: 4px; /* 圆角设计,更扁平化 */
transition: all 0.3s ease; /* 平滑过渡效果 */
position: relative;
cursor: pointer;
box-shadow: 0 1px 3px rgba(0,0,0,0.1); /* 轻微阴影,增加层次感 */
overflow: visible; /* 允许文字溢出 */
}
/* 颜色方案:已学习为蓝色,当前学习为绿色,未学习为白色 */
.blue {
background-color: #007bff; /* 蓝色 - 已学习 */
}
.green {
background-color: #28a745; /* 绿色 - 当前学习 */
}
.white {
background-color: #e9ecef; /* 浅灰色 - 未学习,比纯白色更美观 */
}
/* 进度条悬停效果 */
.progress-title:hover {
transform: translateY(-1px); /* 轻微上浮效果 */
box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* 增强阴影 */
}
/* 进度条详细信息的样式 */
#progress-detail {
position: absolute;
display: none;
padding: 10px;
background-color: rgba(0, 0, 0, 0.8);
color: white;
border-radius: 6px;
max-width: 200px;
font-size: 14px;
z-index: 1000;
pointer-events: none; /* 防止干扰鼠标事件 */
box-shadow: 0 2px 10px rgba(0,0,0,0.3); /* 增强阴影 */
}
.button {
display: flex;
align-items: center;
padding: 15px;
border-bottom: 1px solid #eee;
cursor: pointer;
transition: background-color 0.3s ease;
}
.button:hover {
background-color: #f0f0f0;
}
.close-button {
width: auto;
height: auto;
text-align: center;
padding: 5px;
padding-bottom: 2px;
padding-top: 2px;
border-radius: 5px;
}
/* 新增的侧边工具栏样式 */
.sidebar-tools {
position: fixed;
top: 50%;
transform: translateY(-50%);
right: -250px; /* 初始隐藏 */
width: 250px;
background-color: #fff;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
border-radius: 10px 0 0 10px;
transition: right 0.3s ease-in-out;
z-index: 1000;
}
.sidebar-tools.open {
right: 0;
}
.sidebar-tools .tool-button {
display: flex;
align-items: center;
padding: 15px;
border-bottom: 1px solid #eee;
cursor: pointer;
transition: background-color 0.3s ease;
}
.sidebar-tools .tool-button:hover {
background-color: #f0f0f0;
}
.sidebar-tools .tool-button .icon {
width: 30px;
height: 30px;
margin-right: 10px;
background-color: #007bff;
border-radius: 5px;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
}
.sidebar-tools .tool-button .description {
flex-grow: 1;
}
.toggle-button {
position: fixed;
top: 50%;
transform: translateY(-50%);
right: -10px; /* 初始隐藏 */
width: 50px;
height: 50px;
background-color: #007bff;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
cursor: pointer;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
transition: right 0.3s ease-in-out;
z-index: 1001;
}
.toggle-button.open {
right: 250px;
}
.toggle-button .icon {
font-size: 20px;
}
/* 设置滚动条的宽度、颜色等 */
-webkit-scrollbar {
width: 8px; /* 初始滚动条宽度 */
height: 8px; /* 水平滚动条宽度 */
}
/* 设置滚动条轨道的颜色 */
-webkit-scrollbar-track {
background: #f1f1f1;
}
/* 设置滚动条滑块的颜色 */
-webkit-scrollbar-thumb {
background: #888;
border-radius: 10px;
}
/* 当鼠标悬停在滚动条上时,改变其宽度和颜色 */
-webkit-scrollbar:hover {
width: 12px; /* 鼠标悬停时变粗 */
height: 12px;
}
/* 滚动条滑块的颜色变化 */
-webkit-scrollbar-thumb:hover {
background: #555; /* 鼠标悬停时变暗 */
}