1
This commit is contained in:
353
app/css/index.less
Normal file
353
app/css/index.less
Normal file
@@ -0,0 +1,353 @@
|
||||
// ============================================
|
||||
// 全局变量定义
|
||||
// ============================================
|
||||
@primary-color: #667eea;
|
||||
@secondary-color: #764ba2;
|
||||
@text-color: #333;
|
||||
@text-secondary: #666;
|
||||
@text-muted: #999;
|
||||
@border-color: #ddd;
|
||||
@background-light: #f5f5f5;
|
||||
@white: #fff;
|
||||
|
||||
@gradient-primary: linear-gradient(135deg, @primary-color 0%, @secondary-color 100%);
|
||||
|
||||
// 边距
|
||||
@spacing-xs: 5px;
|
||||
@spacing-sm: 10px;
|
||||
@spacing-md: 15px;
|
||||
@spacing-lg: 20px;
|
||||
@spacing-xl: 30px;
|
||||
|
||||
// 圆角
|
||||
@radius-sm: 5px;
|
||||
@radius-md: 8px;
|
||||
@radius-lg: 10px;
|
||||
@radius-xl: 12px;
|
||||
|
||||
// 阴影
|
||||
@shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
@shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);
|
||||
@shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
|
||||
|
||||
// ============================================
|
||||
// 基础样式重置
|
||||
// ============================================
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
font-family: 'Microsoft YaHei', sans-serif;
|
||||
background: @background-light;
|
||||
color: @text-color;
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// 全局容器布局(主应用容器)
|
||||
// ============================================
|
||||
.container {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: @spacing-sm;
|
||||
background: @gradient-primary;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
gap: @spacing-sm;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// 全局工具类
|
||||
// ============================================
|
||||
.mt10 {
|
||||
margin-top: @spacing-sm;
|
||||
}
|
||||
|
||||
.mt60 {
|
||||
margin-top: @spacing-xl;
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// 头部样式
|
||||
// ============================================
|
||||
.header {
|
||||
text-align: left;
|
||||
color: @white;
|
||||
margin-bottom: @spacing-sm;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
h1 {
|
||||
font-size: 20px;
|
||||
margin-bottom: 0;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
.header-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: @spacing-sm;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.header-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: @spacing-sm;
|
||||
}
|
||||
|
||||
.status-indicator {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 6px 12px;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border-radius: 20px;
|
||||
font-size: 14px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.status-dot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background: #ff4444;
|
||||
|
||||
&.connected {
|
||||
background: #44ff44;
|
||||
animation: pulse 2s infinite;
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// 侧边栏样式
|
||||
// ============================================
|
||||
.sidebar {
|
||||
width: 200px;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border-radius: @radius-lg;
|
||||
padding: @spacing-lg 0;
|
||||
box-shadow: @shadow-sm;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.sidebar-menu {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.menu-item {
|
||||
padding: 15px 20px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
transition: all 0.3s ease;
|
||||
border-left: 3px solid transparent;
|
||||
color: @text-color;
|
||||
|
||||
&:hover {
|
||||
background: rgba(102, 126, 234, 0.1);
|
||||
}
|
||||
|
||||
&.active {
|
||||
background: rgba(102, 126, 234, 0.15);
|
||||
border-left-color: @primary-color;
|
||||
color: @primary-color;
|
||||
font-weight: bold;
|
||||
|
||||
.menu-icon {
|
||||
color: @primary-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.menu-icon {
|
||||
font-size: 18px;
|
||||
width: 20px;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
color: @text-secondary;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.menu-text {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// 内容区域
|
||||
// ============================================
|
||||
.content-area {
|
||||
flex: 1;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border-radius: @radius-lg;
|
||||
padding: @spacing-xl;
|
||||
box-shadow: @shadow-sm;
|
||||
overflow-y: auto;
|
||||
min-width: 0;
|
||||
position: relative;
|
||||
|
||||
&.full-width {
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.page-title {
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
color: @text-color;
|
||||
margin-bottom: @spacing-xl;
|
||||
padding-bottom: 15px;
|
||||
border-bottom: 2px solid @primary-color;
|
||||
}
|
||||
|
||||
.placeholder-content {
|
||||
text-align: center;
|
||||
padding: 40px 20px;
|
||||
color: @text-muted;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// 启动加载动画(全局,在 HTML 中使用)
|
||||
// ============================================
|
||||
.loading-screen {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: @gradient-primary;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 9999;
|
||||
opacity: 1;
|
||||
transition: opacity 0.5s ease-out;
|
||||
|
||||
&.hidden {
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
.loading-content {
|
||||
text-align: center;
|
||||
color: @white;
|
||||
}
|
||||
|
||||
.loading-logo {
|
||||
margin-bottom: @spacing-xl;
|
||||
}
|
||||
|
||||
.logo-circle {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border: 4px solid rgba(255, 255, 255, 0.3);
|
||||
border-top-color: @white;
|
||||
border-radius: 50%;
|
||||
animation: spin 1s linear infinite;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.loading-text {
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
margin-bottom: @spacing-lg;
|
||||
animation: pulse 2s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.loading-progress {
|
||||
width: 200px;
|
||||
height: 4px;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border-radius: 2px;
|
||||
overflow: hidden;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.progress-bar-animated {
|
||||
height: 100%;
|
||||
background: @white;
|
||||
border-radius: 2px;
|
||||
animation: progress 1.5s ease-in-out infinite;
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// 全局动画
|
||||
// ============================================
|
||||
@keyframes fadeIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes slideDown {
|
||||
from {
|
||||
transform: translateY(-50px);
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
transform: translateY(0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0%, 100% {
|
||||
opacity: 1;
|
||||
}
|
||||
50% {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes progress {
|
||||
0% {
|
||||
width: 0%;
|
||||
transform: translateX(0);
|
||||
}
|
||||
50% {
|
||||
width: 70%;
|
||||
transform: translateX(0);
|
||||
}
|
||||
100% {
|
||||
width: 100%;
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user