Initial project commit

This commit is contained in:
2026-05-09 16:40:29 +08:00
commit 02b0259a9e
267 changed files with 54891 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
// only scss variables
$--colors: (
'primary': (
'base': #589ef8,
),
);
@forward 'element-plus/theme-chalk/src/dark/var.scss' with (
$colors: $--colors
);
+42
View File
@@ -0,0 +1,42 @@
$--colors: (
'primary': (
'base': green,
),
'success': (
'base': #21ba45,
),
'warning': (
'base': #f2711c,
),
'danger': (
'base': #db2828,
),
'error': (
'base': #db2828,
),
'info': (
'base': #42b8dd,
),
);
// we can add this to custom namespace, default is 'el'
@forward 'element-plus/theme-chalk/src/mixins/config.scss' with (
$namespace: 'ep'
);
// You should use them in scss, because we calculate it by sass.
// comment next lines to use default color
@forward 'element-plus/theme-chalk/src/common/var.scss' with (
// do not use same name, it will override.
$colors: $--colors,
$button-padding-horizontal: ('default': 50px)
);
// if you want to import all
// @use "element-plus/theme-chalk/src/index.scss" as *;
// You can comment it to hide debug info.
// @debug $--colors;
// custom dark variables
@use './dark.scss';
+342
View File
@@ -0,0 +1,342 @@
@use 'element-plus/theme-chalk/src/dark/css-vars.scss' as *;
:root {
--brand-primary: #1677ff;
--brand-primary-hover: #4096ff;
--brand-primary-active: #0958d9;
--bg-page: #f5f7fa;
--bg-card: #ffffff;
--bg-subtle: #fafbfc;
--border-base: #e5eaf0;
--border-split: #eef1f4;
--text-1: #1f2329;
--text-2: #4e5969;
--text-3: #86909c;
--text-disabled: #c9cdd4;
--ok: #00b578;
--warn: #faad14;
--danger: #f53f3f;
--info: #1677ff;
--radius-sm: 6px;
--radius-md: 8px;
--radius-card: 12px;
--radius-lg: 16px;
--shadow-card: 0 4px 16px rgba(31, 35, 41, 0.04);
--shadow-card-hover: 0 8px 24px rgba(22, 119, 255, 0.08);
}
* {
box-sizing: border-box;
}
html,
body,
#app {
margin: 0;
min-height: 100%;
height: 100%;
}
body {
font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
color: var(--text-1);
background: var(--bg-page);
}
a {
color: var(--brand-primary);
text-decoration: none;
}
.admin-shell {
min-height: 100vh;
display: grid;
grid-template-columns: 248px 1fr;
background: var(--bg-page);
}
.sidebar {
background: var(--bg-card);
border-right: 1px solid var(--border-split);
padding: 20px 14px;
position: sticky;
top: 0;
height: 100vh;
}
.brand {
display: flex;
align-items: center;
gap: 12px;
padding: 10px 10px 20px;
}
.brand-logo {
width: 38px;
height: 38px;
border-radius: 10px;
display: inline-flex;
align-items: center;
justify-content: center;
color: #fff;
font-size: 14px;
font-weight: 700;
background: linear-gradient(135deg, var(--brand-primary), #36a3ff);
}
.brand-text h1 {
margin: 0;
font-size: 15px;
line-height: 1.2;
}
.brand-text p {
margin: 3px 0 0;
color: var(--text-3);
font-size: 12px;
}
.nav {
display: flex;
flex-direction: column;
gap: 6px;
}
.nav-item {
height: 42px;
border: 1px solid transparent;
border-radius: 10px;
background: transparent;
display: flex;
align-items: center;
gap: 10px;
padding: 0 12px;
color: var(--text-2);
cursor: pointer;
transition: all 0.2s ease;
}
.nav-item:hover {
background: var(--bg-subtle);
color: var(--text-1);
}
.nav-item.active {
color: var(--brand-primary);
background: rgba(22, 119, 255, 0.08);
border-color: rgba(22, 119, 255, 0.24);
position: relative;
}
.nav-item.active::before {
content: '';
position: absolute;
left: -14px;
top: 8px;
bottom: 8px;
width: 3px;
border-radius: 2px;
background: var(--brand-primary);
}
.nav-icon {
width: 18px;
text-align: center;
}
.main {
min-width: 0;
display: flex;
flex-direction: column;
}
.topbar {
height: 64px;
background: rgba(255, 255, 255, 0.9);
border-bottom: 1px solid var(--border-split);
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 0 20px;
backdrop-filter: blur(6px);
position: sticky;
top: 0;
z-index: 10;
}
.search-wrap {
flex: 1;
max-width: 420px;
}
.global-search {
width: 100%;
height: 38px;
border-radius: var(--radius-md);
border: 1px solid var(--border-base);
background: #fff;
padding: 0 12px;
outline: none;
color: var(--text-2);
}
.global-search:focus {
border-color: var(--brand-primary);
box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
}
.top-actions {
display: flex;
align-items: center;
gap: 10px;
}
.icon-btn {
width: 34px;
height: 34px;
border: 1px solid var(--border-base);
border-radius: 8px;
background: #fff;
cursor: pointer;
}
.icon-btn:hover {
background: var(--bg-subtle);
}
.user-box {
display: flex;
align-items: center;
gap: 10px;
padding-left: 8px;
}
.avatar {
width: 34px;
height: 34px;
border-radius: 50%;
display: inline-flex;
align-items: center;
justify-content: center;
color: #fff;
font-size: 14px;
background: linear-gradient(135deg, #4e9cff, #1668dc);
}
.user-meta {
display: flex;
flex-direction: column;
line-height: 1.2;
}
.user-meta small {
color: var(--text-3);
}
.logout-btn {
border: 1px solid var(--border-base);
background: #fff;
color: var(--text-2);
border-radius: 8px;
height: 32px;
padding: 0 12px;
cursor: pointer;
}
.logout-btn:hover {
color: var(--danger);
border-color: #f8c5c5;
background: #fff7f7;
}
.content {
padding: 24px;
}
.page-head {
margin-bottom: 18px;
}
.page-head h2 {
margin: 0;
font-size: 24px;
}
.page-head p {
margin: 8px 0 0;
color: var(--text-3);
}
.panel-card {
border-radius: var(--radius-card);
border: 1px solid var(--border-split);
box-shadow: var(--shadow-card);
}
.admin-form {
.el-form-item {
margin-bottom: 16px;
}
.el-form-item__label {
color: var(--text-2);
font-size: 13px;
line-height: 1.2;
padding-bottom: 8px;
}
.el-input__wrapper,
.el-textarea__inner,
.el-select__wrapper {
border-radius: var(--radius-md);
border: 1px solid var(--border-base);
box-shadow: none;
transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.el-input__wrapper:hover,
.el-textarea__inner:hover,
.el-select__wrapper:hover {
border-color: #cfdae6;
}
.el-input__wrapper.is-focus,
.el-select__wrapper.is-focused,
.el-textarea__inner:focus {
border-color: var(--brand-primary);
box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
}
.el-button {
border-radius: var(--radius-md);
height: 36px;
padding: 0 16px;
font-weight: 500;
}
.el-button--primary {
background: var(--brand-primary);
border-color: var(--brand-primary);
}
.el-button--primary:hover {
background: var(--brand-primary-hover);
border-color: var(--brand-primary-hover);
}
}
@media (max-width: 992px) {
.admin-shell {
grid-template-columns: 1fr;
}
.sidebar {
position: static;
height: auto;
border-right: none;
border-bottom: 1px solid var(--border-split);
}
.content {
padding: 16px;
}
}