Initial commit
This commit is contained in:
670
xuexiao/static/css/style.css
Normal file
670
xuexiao/static/css/style.css
Normal file
@@ -0,0 +1,670 @@
|
||||
/* ========== Soft UI / Neumorphism Design System ========== */
|
||||
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');
|
||||
|
||||
:root {
|
||||
--bg-page: #EEEEF5;
|
||||
--bg-alt: #F0F2F8;
|
||||
--card-bg: #F5F5FA;
|
||||
--primary: #6C63FF;
|
||||
--primary-hover: #5a52e0;
|
||||
--primary-soft: #EAE8FF;
|
||||
--green-soft: #E2F5EE;
|
||||
--yellow-soft: #FFF3E0;
|
||||
--text-primary: #1A1A2E;
|
||||
--text-muted: #9090A8;
|
||||
--shadow-light: -4px -4px 10px rgba(255, 255, 255, 0.8);
|
||||
--shadow-dark: 4px 4px 10px rgba(163, 163, 200, 0.35);
|
||||
--shadow-hover-light: -6px -6px 14px rgba(255, 255, 255, 0.9);
|
||||
--shadow-hover-dark: 6px 6px 14px rgba(163, 163, 200, 0.4);
|
||||
--inset: inset 3px 3px 8px rgba(163, 163, 200, 0.35), inset -3px -3px 8px rgba(255, 255, 255, 0.8);
|
||||
--radius-sm: 12px;
|
||||
--radius-md: 16px;
|
||||
--radius-lg: 24px;
|
||||
--rail-width: 72px;
|
||||
--panel-width: 260px;
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
|
||||
body {
|
||||
font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
||||
background: var(--bg-page);
|
||||
color: var(--text-primary);
|
||||
min-height: 100vh;
|
||||
margin: 0;
|
||||
font-weight: 400;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6, .fw-bold { font-weight: 700; color: var(--text-primary); }
|
||||
|
||||
.text-muted { color: var(--text-muted) !important; }
|
||||
|
||||
/* ========== Neumorphic surfaces ========== */
|
||||
.neo-surface {
|
||||
background: var(--card-bg);
|
||||
border-radius: var(--radius-md);
|
||||
box-shadow: var(--shadow-light), var(--shadow-dark);
|
||||
border: none;
|
||||
transition: box-shadow 0.25s ease, transform 0.2s ease;
|
||||
}
|
||||
|
||||
.neo-surface:hover {
|
||||
box-shadow: var(--shadow-hover-light), var(--shadow-hover-dark);
|
||||
}
|
||||
|
||||
.neo-inset {
|
||||
box-shadow: var(--inset);
|
||||
background: var(--bg-page);
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
|
||||
.neo-btn {
|
||||
background: var(--card-bg);
|
||||
border: none;
|
||||
border-radius: var(--radius-sm);
|
||||
color: var(--text-primary);
|
||||
font-weight: 600;
|
||||
padding: 10px 20px;
|
||||
box-shadow: var(--shadow-light), var(--shadow-dark);
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.neo-btn:hover {
|
||||
color: var(--primary);
|
||||
box-shadow: var(--shadow-hover-light), var(--shadow-hover-dark);
|
||||
}
|
||||
|
||||
.neo-btn:active,
|
||||
.neo-btn.active {
|
||||
box-shadow: var(--inset);
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
.neo-btn-primary {
|
||||
background: var(--primary);
|
||||
color: #fff;
|
||||
box-shadow: 4px 4px 12px rgba(108, 99, 255, 0.35), -2px -2px 8px rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
.neo-btn-primary:hover {
|
||||
background: var(--primary-hover);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* ========== App shell: 3 columns ========== */
|
||||
.app-shell {
|
||||
display: flex;
|
||||
min-height: 100vh;
|
||||
background: var(--bg-page);
|
||||
}
|
||||
|
||||
/* Left icon rail */
|
||||
.icon-rail {
|
||||
width: var(--rail-width);
|
||||
flex-shrink: 0;
|
||||
padding: 20px 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
height: 100vh;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.rail-brand {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
background: var(--primary);
|
||||
border-radius: var(--radius-md);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #fff;
|
||||
font-size: 1.35rem;
|
||||
margin-bottom: 16px;
|
||||
box-shadow: 4px 4px 12px rgba(108, 99, 255, 0.4);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.rail-link {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border-radius: var(--radius-md);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: var(--text-muted);
|
||||
text-decoration: none;
|
||||
font-size: 1.2rem;
|
||||
transition: all 0.2s ease;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.rail-link:hover {
|
||||
background: var(--card-bg);
|
||||
color: var(--primary);
|
||||
box-shadow: var(--shadow-light), var(--shadow-dark);
|
||||
}
|
||||
|
||||
.rail-link.active {
|
||||
background: var(--primary);
|
||||
color: #fff;
|
||||
box-shadow: 4px 4px 12px rgba(108, 99, 255, 0.45);
|
||||
}
|
||||
|
||||
.rail-link[data-tooltip]:hover::after {
|
||||
content: attr(data-tooltip);
|
||||
position: absolute;
|
||||
left: calc(100% + 12px);
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
background: var(--text-primary);
|
||||
color: #fff;
|
||||
padding: 6px 12px;
|
||||
border-radius: 8px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
z-index: 1100;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.rail-spacer { flex: 1; }
|
||||
|
||||
.rail-link.logout { color: #e57373; margin-top: 8px; }
|
||||
|
||||
/* Main column */
|
||||
.main-column {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
padding: 28px 32px 40px;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
/* Right panel */
|
||||
.quick-panel {
|
||||
width: var(--panel-width);
|
||||
flex-shrink: 0;
|
||||
padding: 28px 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
height: 100vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
/* ========== Greeting ========== */
|
||||
.greeting-title {
|
||||
font-size: 1.75rem;
|
||||
font-weight: 700;
|
||||
margin: 0 0 4px;
|
||||
}
|
||||
|
||||
.greeting-sub {
|
||||
color: var(--text-muted);
|
||||
font-size: 0.95rem;
|
||||
margin: 0 0 28px;
|
||||
}
|
||||
|
||||
/* ========== Stat cards ========== */
|
||||
.stat-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
||||
gap: 20px;
|
||||
margin-bottom: 28px;
|
||||
}
|
||||
|
||||
.neo-stat {
|
||||
padding: 20px 22px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.stat-icon {
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
border-radius: var(--radius-md);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 1.35rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.stat-icon.purple { background: var(--primary-soft); color: var(--primary); }
|
||||
.stat-icon.green { background: var(--green-soft); color: #2e9d6a; }
|
||||
.stat-icon.yellow { background: var(--yellow-soft); color: #e6a23c; }
|
||||
.stat-icon.blue { background: #E8F0FF; color: #4a7fd4; }
|
||||
|
||||
.stat-value {
|
||||
font-size: 1.65rem;
|
||||
font-weight: 700;
|
||||
line-height: 1.2;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
font-size: 0.8rem;
|
||||
color: var(--text-muted);
|
||||
margin: 4px 0 0;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
/* ========== Chart ========== */
|
||||
.chart-card {
|
||||
padding: 24px 28px;
|
||||
margin-bottom: 28px;
|
||||
}
|
||||
|
||||
.chart-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.chart-bars {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
height: 180px;
|
||||
padding-top: 8px;
|
||||
}
|
||||
|
||||
.chart-col {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
height: 100%;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.chart-bar-wrap {
|
||||
width: 100%;
|
||||
max-width: 48px;
|
||||
height: 140px;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
background: linear-gradient(to top, transparent 0%, transparent 100%);
|
||||
border-bottom: 1px dashed rgba(144, 144, 168, 0.35);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.chart-bar {
|
||||
width: 70%;
|
||||
border-radius: 10px 10px 4px 4px;
|
||||
background: #D8D8E8;
|
||||
transition: height 0.4s ease, background 0.3s ease;
|
||||
min-height: 8px;
|
||||
}
|
||||
|
||||
.chart-bar.active {
|
||||
background: var(--primary);
|
||||
box-shadow: 0 4px 14px rgba(108, 99, 255, 0.45);
|
||||
}
|
||||
|
||||
.chart-month {
|
||||
font-size: 0.75rem;
|
||||
color: var(--text-muted);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* ========== Right panel: user ========== */
|
||||
.user-card {
|
||||
padding: 22px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.user-avatar {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
border-radius: 50%;
|
||||
background: linear-gradient(135deg, var(--primary), #9d97ff);
|
||||
color: #fff;
|
||||
font-size: 1.5rem;
|
||||
font-weight: 700;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0 auto 12px;
|
||||
box-shadow: 4px 4px 12px rgba(108, 99, 255, 0.35);
|
||||
}
|
||||
|
||||
.user-name { font-weight: 700; font-size: 1rem; margin: 0; }
|
||||
.user-role {
|
||||
display: inline-block;
|
||||
margin-top: 8px;
|
||||
padding: 4px 12px;
|
||||
border-radius: 20px;
|
||||
background: var(--primary-soft);
|
||||
color: var(--primary);
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* ========== Quick menu ========== */
|
||||
.menu-card { padding: 8px 12px; }
|
||||
|
||||
.menu-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 14px 16px;
|
||||
border-radius: var(--radius-sm);
|
||||
text-decoration: none;
|
||||
color: var(--text-primary);
|
||||
font-weight: 500;
|
||||
font-size: 0.9rem;
|
||||
transition: background 0.2s ease;
|
||||
}
|
||||
|
||||
.menu-item:hover {
|
||||
background: rgba(108, 99, 255, 0.08);
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
.menu-item i:first-child {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 10px;
|
||||
background: var(--primary-soft);
|
||||
color: var(--primary);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.menu-item .arrow {
|
||||
margin-left: auto;
|
||||
color: var(--text-muted);
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
/* ========== Progress ring ========== */
|
||||
.progress-card {
|
||||
padding: 24px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.progress-ring-wrap {
|
||||
position: relative;
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
margin: 0 auto 12px;
|
||||
}
|
||||
|
||||
.progress-ring-wrap svg { transform: rotate(-90deg); }
|
||||
|
||||
.progress-pct {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 1.5rem;
|
||||
font-weight: 700;
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
/* ========== Activity list (no dividers) ========== */
|
||||
.feed-card { padding: 20px 22px; }
|
||||
|
||||
.feed-title {
|
||||
font-weight: 700;
|
||||
font-size: 1rem;
|
||||
margin: 0 0 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.feed-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
padding: 12px 0;
|
||||
}
|
||||
|
||||
.feed-avatar {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
border-radius: 50%;
|
||||
background: var(--primary-soft);
|
||||
color: var(--primary);
|
||||
font-weight: 700;
|
||||
font-size: 0.9rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.feed-avatar.warn { background: var(--yellow-soft); color: #c77d2e; }
|
||||
.feed-avatar.ok { background: var(--green-soft); color: #2e9d6a; }
|
||||
|
||||
.feed-body { flex: 1; min-width: 0; }
|
||||
.feed-name { font-weight: 700; font-size: 0.9rem; margin: 0; }
|
||||
.feed-preview { font-size: 0.8rem; color: var(--text-muted); margin: 2px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.feed-meta { font-size: 0.8rem; font-weight: 600; color: var(--primary); white-space: nowrap; }
|
||||
.feed-meta.money { color: #2e9d6a; }
|
||||
|
||||
/* ========== Page content (inner pages) ========== */
|
||||
.page-toolbar {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.page-title {
|
||||
font-size: 1.5rem;
|
||||
font-weight: 700;
|
||||
margin: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.page-title i { color: var(--primary); }
|
||||
|
||||
/* Tables in neo style */
|
||||
.neo-table-wrap {
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.neo-table-wrap .table {
|
||||
margin: 0;
|
||||
--bs-table-bg: transparent;
|
||||
}
|
||||
|
||||
.neo-table-wrap .table thead th {
|
||||
background: rgba(108, 99, 255, 0.06);
|
||||
border: none;
|
||||
color: var(--text-muted);
|
||||
font-weight: 600;
|
||||
font-size: 0.8rem;
|
||||
padding: 14px 18px;
|
||||
}
|
||||
|
||||
.neo-table-wrap .table tbody td {
|
||||
border: none;
|
||||
border-bottom: 1px solid rgba(144, 144, 168, 0.12);
|
||||
padding: 14px 18px;
|
||||
font-size: 0.875rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.neo-table-wrap .table tbody tr:last-child td { border-bottom: none; }
|
||||
.neo-table-wrap .table tbody tr:hover td {
|
||||
background: rgba(108, 99, 255, 0.04);
|
||||
}
|
||||
|
||||
/* Forms */
|
||||
.form-control, .form-select {
|
||||
background: var(--bg-page);
|
||||
border: none;
|
||||
border-radius: var(--radius-sm);
|
||||
box-shadow: var(--inset);
|
||||
padding: 10px 14px;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.form-control:focus, .form-select:focus {
|
||||
background: var(--card-bg);
|
||||
box-shadow: var(--inset), 0 0 0 2px rgba(108, 99, 255, 0.25);
|
||||
border: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.form-label {
|
||||
font-weight: 600;
|
||||
font-size: 0.85rem;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.input-group-text {
|
||||
background: var(--card-bg);
|
||||
border: none;
|
||||
box-shadow: var(--inset);
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
/* Tags / badges */
|
||||
.tag {
|
||||
display: inline-block;
|
||||
padding: 4px 10px;
|
||||
border-radius: 20px;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.tag-purple { background: var(--primary-soft); color: var(--primary); }
|
||||
.tag-green { background: var(--green-soft); color: #2e9d6a; }
|
||||
.tag-yellow { background: var(--yellow-soft); color: #c77d2e; }
|
||||
|
||||
/* Alerts neo */
|
||||
.alert {
|
||||
border: none;
|
||||
border-radius: var(--radius-md);
|
||||
box-shadow: var(--shadow-light), var(--shadow-dark);
|
||||
}
|
||||
|
||||
/* Login */
|
||||
.login-page {
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: var(--bg-page);
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
.login-card {
|
||||
width: 100%;
|
||||
max-width: 420px;
|
||||
padding: 48px 40px;
|
||||
}
|
||||
|
||||
.login-logo {
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
background: var(--primary);
|
||||
border-radius: var(--radius-lg);
|
||||
color: #fff;
|
||||
font-size: 2rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0 auto 20px;
|
||||
box-shadow: 4px 4px 16px rgba(108, 99, 255, 0.4);
|
||||
}
|
||||
|
||||
/* Hide right panel on smaller screens */
|
||||
@media (max-width: 1200px) {
|
||||
.quick-panel { display: none; }
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.icon-rail { width: 56px; padding: 12px 8px; }
|
||||
.rail-link, .rail-brand { width: 40px; height: 40px; }
|
||||
.main-column { padding: 16px; }
|
||||
.stat-grid { grid-template-columns: 1fr 1fr; }
|
||||
}
|
||||
|
||||
/* Override bootstrap cards globally when inside app */
|
||||
.main-column .card {
|
||||
background: var(--card-bg);
|
||||
border: none;
|
||||
border-radius: var(--radius-md);
|
||||
box-shadow: var(--shadow-light), var(--shadow-dark);
|
||||
}
|
||||
|
||||
.main-column .card:hover {
|
||||
box-shadow: var(--shadow-hover-light), var(--shadow-hover-dark);
|
||||
}
|
||||
|
||||
.main-column .card-header {
|
||||
background: transparent;
|
||||
border: none;
|
||||
font-weight: 700;
|
||||
padding: 18px 22px 0;
|
||||
}
|
||||
|
||||
.main-column .card-body { padding: 18px 22px 22px; }
|
||||
|
||||
.main-column .btn-primary {
|
||||
background: var(--primary);
|
||||
border: none;
|
||||
border-radius: var(--radius-sm);
|
||||
font-weight: 600;
|
||||
box-shadow: 4px 4px 12px rgba(108, 99, 255, 0.35);
|
||||
}
|
||||
|
||||
.main-column .btn-primary:hover {
|
||||
background: var(--primary-hover);
|
||||
}
|
||||
|
||||
.main-column .btn-outline-secondary {
|
||||
background: var(--card-bg);
|
||||
border: none;
|
||||
box-shadow: var(--shadow-light), var(--shadow-dark);
|
||||
color: var(--text-muted);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.main-column .btn-outline-secondary:hover {
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
.main-column .btn-success { border: none; border-radius: var(--radius-sm); font-weight: 600; }
|
||||
.main-column .btn-danger { border: none; border-radius: var(--radius-sm); font-weight: 600; }
|
||||
|
||||
/* Flash in main */
|
||||
.flash-wrap { margin-bottom: 20px; }
|
||||
|
||||
/* 可排序表头(全站复用) */
|
||||
.th-sort {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.25rem;
|
||||
}
|
||||
.th-sort:hover { color: var(--primary); }
|
||||
.th-sort.active { color: var(--primary); font-weight: 600; }
|
||||
.th-sort .bi { font-size: 0.75rem; opacity: 0.85; }
|
||||
Reference in New Issue
Block a user