⚡ 初始提交 - FutureOSS v1.0 插件化运行时框架
一切皆为插件的开发者工具运行时框架
🧩 核心特性:
- 插件热插拔 (importlib 动态加载)
- 依赖自动解析 (拓扑排序 + 循环检测)
- 企业级稳定 (熔断/降级/重试/隔离)
- 事件驱动 (发布/订阅事件总线)
- 完整配置 (YAML 配置 + 热重载)
This commit is contained in:
363
website/community/assets/css/auth.css
Normal file
363
website/community/assets/css/auth.css
Normal file
@@ -0,0 +1,363 @@
|
||||
/* ============================================
|
||||
OSS Community 认证页面样式
|
||||
与官网风格保持一致
|
||||
============================================ */
|
||||
|
||||
/* 认证页面布局 */
|
||||
.auth-page {
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 40px 20px;
|
||||
margin-left: 80px;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.auth-container {
|
||||
width: 100%;
|
||||
max-width: 480px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* 认证卡片 */
|
||||
.auth-card {
|
||||
background: rgba(15, 23, 42, 0.8);
|
||||
backdrop-filter: blur(20px);
|
||||
border: 1px solid rgba(99, 102, 241, 0.2);
|
||||
border-radius: 16px;
|
||||
padding: 40px;
|
||||
box-shadow:
|
||||
0 20px 60px rgba(0, 0, 0, 0.5),
|
||||
0 0 0 1px rgba(99, 102, 241, 0.1),
|
||||
inset 0 1px 0 rgba(255, 255, 255, 0.05);
|
||||
animation: cardSlideUp 0.6s ease-out;
|
||||
}
|
||||
|
||||
@keyframes cardSlideUp {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(30px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
/* 认证头部 */
|
||||
.auth-header {
|
||||
text-align: center;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.auth-logo {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
margin: 0 auto 20px;
|
||||
background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
|
||||
border-radius: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
|
||||
}
|
||||
|
||||
.auth-logo svg {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.auth-title {
|
||||
font-size: 28px;
|
||||
font-weight: 700;
|
||||
margin: 0 0 8px 0;
|
||||
background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
}
|
||||
|
||||
.auth-subtitle {
|
||||
color: #94a3b8;
|
||||
font-size: 14px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* 表单样式 */
|
||||
.auth-form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.form-label {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #e2e8f0;
|
||||
}
|
||||
|
||||
.input-wrapper {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.input-icon {
|
||||
position: absolute;
|
||||
left: 14px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
color: #64748b;
|
||||
pointer-events: none;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
|
||||
.form-input {
|
||||
width: 100%;
|
||||
padding: 12px 14px 12px 44px;
|
||||
background: rgba(30, 41, 59, 0.6);
|
||||
border: 1px solid rgba(99, 102, 241, 0.2);
|
||||
border-radius: 8px;
|
||||
color: #e2e8f0;
|
||||
font-size: 14px;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.form-input::placeholder {
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
.form-input:focus {
|
||||
outline: none;
|
||||
border-color: #6366f1;
|
||||
background: rgba(30, 41, 59, 0.8);
|
||||
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
|
||||
}
|
||||
|
||||
.form-input:focus + .input-icon,
|
||||
.form-input:focus ~ .input-icon {
|
||||
color: #6366f1;
|
||||
}
|
||||
|
||||
.input-hint {
|
||||
font-size: 12px;
|
||||
color: #64748b;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
/* 切换密码可见性按钮 */
|
||||
.toggle-password {
|
||||
position: absolute;
|
||||
right: 12px;
|
||||
background: none;
|
||||
border: none;
|
||||
padding: 4px;
|
||||
cursor: pointer;
|
||||
color: #64748b;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
|
||||
.toggle-password:hover {
|
||||
color: #6366f1;
|
||||
}
|
||||
|
||||
.toggle-password svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
/* 表单选项 */
|
||||
.form-options {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.checkbox-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
cursor: pointer;
|
||||
color: #94a3b8;
|
||||
}
|
||||
|
||||
.checkbox-label input[type="checkbox"] {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
accent-color: #6366f1;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.forgot-link {
|
||||
color: #6366f1;
|
||||
text-decoration: none;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
|
||||
.forgot-link:hover {
|
||||
color: #8b5cf6;
|
||||
}
|
||||
|
||||
/* 警告框 */
|
||||
.alert {
|
||||
padding: 12px 16px;
|
||||
border-radius: 8px;
|
||||
font-size: 14px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.alert-error {
|
||||
background: rgba(239, 68, 68, 0.1);
|
||||
border: 1px solid rgba(239, 68, 68, 0.3);
|
||||
color: #fca5a5;
|
||||
}
|
||||
|
||||
.alert-success {
|
||||
background: rgba(34, 197, 94, 0.1);
|
||||
border: 1px solid rgba(34, 197, 94, 0.3);
|
||||
color: #86efac;
|
||||
}
|
||||
|
||||
/* 按钮样式 */
|
||||
.btn-auth {
|
||||
width: 100%;
|
||||
padding: 14px 24px;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
margin-top: 8px;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.btn-auth:disabled {
|
||||
opacity: 0.6;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.btn-spinner {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
/* 认证页脚 */
|
||||
.auth-footer {
|
||||
text-align: center;
|
||||
margin-top: 24px;
|
||||
padding-top: 24px;
|
||||
border-top: 1px solid rgba(99, 102, 241, 0.2);
|
||||
color: #94a3b8;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.auth-link {
|
||||
color: #6366f1;
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
|
||||
.auth-link:hover {
|
||||
color: #8b5cf6;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* 装饰元素 */
|
||||
.auth-decoration {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
pointer-events: none;
|
||||
overflow: hidden;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.deco-circle {
|
||||
position: absolute;
|
||||
border-radius: 50%;
|
||||
background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
|
||||
}
|
||||
|
||||
.deco-circle-1 {
|
||||
width: 400px;
|
||||
height: 400px;
|
||||
top: -100px;
|
||||
right: -100px;
|
||||
animation: float 20s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.deco-circle-2 {
|
||||
width: 300px;
|
||||
height: 300px;
|
||||
bottom: -50px;
|
||||
left: 10%;
|
||||
background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 70%);
|
||||
animation: float 15s ease-in-out infinite reverse;
|
||||
}
|
||||
|
||||
.deco-circle-3 {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
top: 40%;
|
||||
right: 15%;
|
||||
background: radial-gradient(circle, rgba(6, 182, 212, 0.2) 0%, transparent 70%);
|
||||
animation: float 18s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes float {
|
||||
0%, 100% {
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
25% {
|
||||
transform: translate(20px, -20px);
|
||||
}
|
||||
50% {
|
||||
transform: translate(-10px, 15px);
|
||||
}
|
||||
75% {
|
||||
transform: translate(15px, 10px);
|
||||
}
|
||||
}
|
||||
|
||||
/* 响应式 */
|
||||
@media (max-width: 640px) {
|
||||
.auth-page {
|
||||
margin-left: 0;
|
||||
padding: 20px 16px;
|
||||
}
|
||||
|
||||
.auth-card {
|
||||
padding: 32px 24px;
|
||||
}
|
||||
|
||||
.auth-title {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.form-options {
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
align-items: flex-start;
|
||||
}
|
||||
}
|
||||
572
website/community/assets/css/community.css
Normal file
572
website/community/assets/css/community.css
Normal file
@@ -0,0 +1,572 @@
|
||||
/* OSS Community 样式 - 已对齐官网视觉规范 */
|
||||
:root {
|
||||
--bg: #030712;
|
||||
--bg-card: rgba(255, 255, 255, 0.02);
|
||||
--border: rgba(255, 255, 255, 0.05);
|
||||
--border-hover: rgba(6, 182, 212, 0.3);
|
||||
--cyan: #06b6d4;
|
||||
--cyan-light: #22d3ee;
|
||||
--text: #fff;
|
||||
--text-secondary: #9ca3af;
|
||||
--text-muted: #6b7280;
|
||||
}
|
||||
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
|
||||
body {
|
||||
font-family: 'Inter', sans-serif;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
line-height: 1.6;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
/* 全局背景网格 */
|
||||
body::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background-image:
|
||||
linear-gradient(rgba(6, 182, 212, 0.03) 1px, transparent 1px),
|
||||
linear-gradient(90deg, rgba(6, 182, 212, 0.03) 1px, transparent 1px);
|
||||
background-size: 60px 60px;
|
||||
pointer-events: none;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
/* 头部导航 */
|
||||
.comm-header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
background: rgba(3, 7, 18, 0.8);
|
||||
backdrop-filter: blur(16px);
|
||||
border-bottom: 1px solid var(--border);
|
||||
transition: border-color 0.3s;
|
||||
}
|
||||
|
||||
.header-container {
|
||||
max-width: 1400px;
|
||||
margin: 0 auto;
|
||||
padding: 0 24px;
|
||||
height: 64px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.header-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 24px;
|
||||
}
|
||||
|
||||
.back-link {
|
||||
color: var(--text-muted);
|
||||
text-decoration: none;
|
||||
font-size: 14px;
|
||||
transition: all 0.3s ease;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.back-link:hover {
|
||||
color: var(--cyan-light);
|
||||
transform: translateX(-4px);
|
||||
}
|
||||
|
||||
.site-title {
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
background: linear-gradient(135deg, var(--cyan), #3b82f6);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
|
||||
.btn {
|
||||
padding: 10px 20px;
|
||||
border-radius: 10px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
transition: all 0.3s ease;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background: linear-gradient(135deg, var(--cyan), #3b82f6);
|
||||
color: #fff;
|
||||
box-shadow: 0 4px 12px rgba(6, 182, 212, 0.1);
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
box-shadow: 0 8px 24px rgba(6, 182, 212, 0.4);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
/* 主布局 */
|
||||
.comm-main {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 24px 100px 24px 24px; /* 右侧为 Dock 留空间 */
|
||||
min-height: calc(100vh - 64px);
|
||||
}
|
||||
|
||||
.comm-container {
|
||||
display: grid;
|
||||
grid-template-columns: 260px 1fr;
|
||||
gap: 32px;
|
||||
animation: fadeInUp 0.6s ease forwards;
|
||||
opacity: 0;
|
||||
transform: translateY(20px);
|
||||
}
|
||||
|
||||
@keyframes fadeInUp {
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
/* 侧边栏 */
|
||||
.comm-sidebar {
|
||||
position: sticky;
|
||||
top: 88px;
|
||||
height: fit-content;
|
||||
}
|
||||
|
||||
.sidebar-section {
|
||||
background: rgba(10, 15, 30, 0.6);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 16px;
|
||||
padding: 20px;
|
||||
margin-bottom: 20px;
|
||||
backdrop-filter: blur(8px);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.sidebar-section:hover {
|
||||
border-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.sidebar-section h3 {
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
color: var(--text-muted);
|
||||
margin-bottom: 16px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.1em;
|
||||
}
|
||||
|
||||
.category-list { list-style: none; }
|
||||
|
||||
.category-list li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 12px;
|
||||
border-radius: 10px;
|
||||
cursor: pointer;
|
||||
transition: all 0.25s ease;
|
||||
margin-bottom: 4px;
|
||||
color: var(--text-secondary);
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.category-list li:hover {
|
||||
background: rgba(255, 255, 255, 0.04);
|
||||
color: #fff;
|
||||
transform: translateX(4px);
|
||||
}
|
||||
|
||||
.category-list li.active {
|
||||
background: rgba(6, 182, 212, 0.1);
|
||||
border-left: 3px solid var(--cyan);
|
||||
color: var(--cyan-light);
|
||||
}
|
||||
|
||||
.cat-icon {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.cat-icon svg {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
fill: none;
|
||||
stroke: currentColor;
|
||||
stroke-width: 2;
|
||||
}
|
||||
|
||||
.category-list li.active .cat-icon { opacity: 1; color: var(--cyan); }
|
||||
|
||||
.cat-count {
|
||||
font-size: 11px;
|
||||
color: var(--text-muted);
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
padding: 2px 8px;
|
||||
border-radius: 6px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.stats-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.stat-item {
|
||||
padding: 10px 4px;
|
||||
background: rgba(255, 255, 255, 0.02);
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.stat-num {
|
||||
display: block;
|
||||
font-size: 20px;
|
||||
font-weight: 800;
|
||||
color: var(--cyan-light);
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
font-size: 10px;
|
||||
color: var(--text-muted);
|
||||
font-weight: 500;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
/* 内容区 */
|
||||
.comm-content { min-width: 0; }
|
||||
|
||||
.content-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 16px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.content-header h2 {
|
||||
font-size: 22px;
|
||||
font-weight: 700;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.content-header h2::before {
|
||||
content: '';
|
||||
display: block;
|
||||
width: 4px;
|
||||
height: 20px;
|
||||
background: var(--cyan);
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.sort-options {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
background: rgba(255, 255, 255, 0.02);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 10px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.sort-btn {
|
||||
padding: 6px 14px;
|
||||
border-radius: 8px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: var(--text-secondary);
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.sort-btn:hover { color: #fff; }
|
||||
|
||||
.sort-btn.active {
|
||||
background: rgba(6, 182, 212, 0.15);
|
||||
color: var(--cyan-light);
|
||||
box-shadow: 0 2px 6px rgba(6, 182, 212, 0.1);
|
||||
}
|
||||
|
||||
/* 帖子列表 - 卡片动效 */
|
||||
.posts-list { display: flex; flex-direction: column; gap: 16px; }
|
||||
|
||||
.post-card {
|
||||
background: rgba(10, 15, 30, 0.6);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 16px;
|
||||
padding: 24px;
|
||||
transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
animation: cardEnter 0.5s ease forwards;
|
||||
opacity: 0;
|
||||
transform: translateY(20px);
|
||||
}
|
||||
|
||||
@keyframes cardEnter {
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
.post-card::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0; left: 0; right: 0; bottom: 0;
|
||||
background: linear-gradient(135deg, rgba(6, 182, 212, 0.05), transparent);
|
||||
opacity: 0;
|
||||
transition: opacity 0.4s;
|
||||
}
|
||||
|
||||
.post-card:hover {
|
||||
border-color: var(--border-hover);
|
||||
transform: translateY(-4px) scale(1.005);
|
||||
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 12px rgba(6, 182, 212, 0.1);
|
||||
}
|
||||
|
||||
.post-card:hover::before { opacity: 1; }
|
||||
|
||||
.post-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
margin-bottom: 14px;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.post-avatar {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
border-radius: 12px;
|
||||
background: linear-gradient(135deg, var(--cyan), #3b82f6);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: 800;
|
||||
font-size: 18px;
|
||||
color: #fff;
|
||||
box-shadow: 0 4px 10px rgba(6, 182, 212, 0.3);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.post-meta { flex: 1; min-width: 0; }
|
||||
|
||||
.post-author {
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.post-time {
|
||||
font-size: 12px;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.post-tags { display: flex; gap: 6px; flex-shrink: 0; }
|
||||
|
||||
.tag {
|
||||
padding: 3px 8px;
|
||||
border-radius: 6px;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
background: rgba(6, 182, 212, 0.08);
|
||||
border: 1px solid rgba(6, 182, 212, 0.15);
|
||||
color: var(--cyan-light);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.pinned-badge {
|
||||
padding: 3px 8px;
|
||||
border-radius: 6px;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
background: rgba(245, 158, 11, 0.15);
|
||||
border: 1px solid rgba(245, 158, 11, 0.3);
|
||||
color: #fbbf24;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.post-title {
|
||||
font-size: 17px;
|
||||
font-weight: 700;
|
||||
margin-bottom: 8px;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 8px;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
color: #fff;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
|
||||
.post-card:hover .post-title { color: var(--cyan-light); }
|
||||
|
||||
.post-excerpt {
|
||||
font-size: 14px;
|
||||
color: var(--text-secondary);
|
||||
line-height: 1.6;
|
||||
margin-bottom: 14px;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.post-stats {
|
||||
display: flex;
|
||||
gap: 20px;
|
||||
font-size: 12px;
|
||||
color: var(--text-muted);
|
||||
font-weight: 500;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.post-stats span {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
|
||||
.post-stats svg {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.post-card:hover .post-stats span { color: var(--text-secondary); }
|
||||
|
||||
/* 空状态 / 加载动画 */
|
||||
.empty-state {
|
||||
text-align: center;
|
||||
padding: 80px 20px;
|
||||
color: var(--text-muted);
|
||||
animation: fadeIn 0.5s ease;
|
||||
}
|
||||
|
||||
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
|
||||
|
||||
.loading-spinner {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border: 3px solid rgba(6, 182, 212, 0.1);
|
||||
border-top-color: var(--cyan);
|
||||
border-radius: 50%;
|
||||
animation: spin 0.8s linear infinite;
|
||||
margin: 0 auto 16px;
|
||||
}
|
||||
|
||||
@keyframes spin { to { transform: rotate(360deg); } }
|
||||
|
||||
.empty-state-icon {
|
||||
font-size: 48px;
|
||||
margin-bottom: 16px;
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
/* 分页 */
|
||||
.pagination {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
margin-top: 32px;
|
||||
padding-bottom: 32px;
|
||||
}
|
||||
|
||||
.page-btn {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 10px;
|
||||
background: rgba(255, 255, 255, 0.02);
|
||||
border: 1px solid var(--border);
|
||||
color: var(--text-secondary);
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.page-btn:hover {
|
||||
background: rgba(6, 182, 212, 0.1);
|
||||
border-color: var(--border-hover);
|
||||
color: var(--cyan);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.page-btn.active {
|
||||
background: var(--cyan);
|
||||
border-color: var(--cyan);
|
||||
color: #fff;
|
||||
box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
|
||||
}
|
||||
|
||||
/* 响应式 */
|
||||
@media (max-width: 900px) {
|
||||
.comm-container {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
.comm-sidebar {
|
||||
position: static;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
||||
gap: 16px;
|
||||
}
|
||||
.stats-grid { margin-top: 0; }
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.header-container { padding: 0 16px; }
|
||||
.comm-main { padding: 16px; }
|
||||
.content-header h2 { font-size: 18px; }
|
||||
.sort-options { display: none; }
|
||||
.post-card { padding: 16px; }
|
||||
.post-title { font-size: 15px; }
|
||||
}
|
||||
/* 创建帖子按钮样式 - 区别于普通导航链接 */
|
||||
button.dock-item {
|
||||
background: transparent;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.dock-action-btn {
|
||||
color: #10b981; /* 翡翠绿 - 代表创建/动作 */
|
||||
background: rgba(16, 185, 129, 0.08);
|
||||
border: 1px solid rgba(16, 185, 129, 0.2);
|
||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.dock-action-btn:hover {
|
||||
background: rgba(16, 185, 129, 0.2);
|
||||
border-color: #10b981;
|
||||
color: #34d399;
|
||||
box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
177
website/community/assets/css/dock-popover.css
Normal file
177
website/community/assets/css/dock-popover.css
Normal file
@@ -0,0 +1,177 @@
|
||||
/* Dock 用户信息面板样式 */
|
||||
|
||||
.user-popover {
|
||||
position: fixed;
|
||||
z-index: 10001;
|
||||
width: 260px;
|
||||
background: rgba(15, 23, 42, 0.95);
|
||||
backdrop-filter: blur(12px);
|
||||
border: 1px solid rgba(99, 102, 241, 0.2);
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transform: translateY(10px) scale(0.98);
|
||||
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
pointer-events: none;
|
||||
color: #e2e8f0;
|
||||
font-family: 'Inter', sans-serif;
|
||||
}
|
||||
|
||||
.user-popover.active {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
transform: translateY(0) scale(1);
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.popover-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 16px;
|
||||
border-bottom: 1px solid rgba(99, 102, 241, 0.1);
|
||||
}
|
||||
|
||||
.popover-avatar {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
border-radius: 10px;
|
||||
background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
color: white;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.popover-info {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.popover-name {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #f1f5f9;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.popover-role {
|
||||
font-size: 11px;
|
||||
color: #94a3b8;
|
||||
margin-top: 2px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.popover-menu {
|
||||
padding: 8px;
|
||||
border-bottom: 1px solid rgba(99, 102, 241, 0.1);
|
||||
}
|
||||
|
||||
.menu-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 10px 12px;
|
||||
border-radius: 8px;
|
||||
color: #e2e8f0;
|
||||
text-decoration: none;
|
||||
transition: all 0.2s;
|
||||
background: transparent;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.menu-item:hover {
|
||||
background: rgba(99, 102, 241, 0.15);
|
||||
color: #f1f5f9;
|
||||
}
|
||||
|
||||
.menu-item svg {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
flex-shrink: 0;
|
||||
color: #94a3b8;
|
||||
}
|
||||
|
||||
.menu-item:hover svg {
|
||||
color: #c7d2fe;
|
||||
}
|
||||
|
||||
.menu-item span {
|
||||
flex: 1;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.menu-badge {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
padding: 2px 8px;
|
||||
border-radius: 10px;
|
||||
background: rgba(99, 102, 241, 0.3);
|
||||
color: #c7d2fe;
|
||||
min-width: 24px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.popover-footer {
|
||||
padding: 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.popover-btn {
|
||||
width: 100%;
|
||||
padding: 8px 12px;
|
||||
border-radius: 8px;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
transition: all 0.2s;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.btn-logout {
|
||||
background: rgba(99, 102, 241, 0.2);
|
||||
color: #c7d2fe;
|
||||
border: 1px solid rgba(99, 102, 241, 0.3);
|
||||
}
|
||||
|
||||
.btn-logout:hover {
|
||||
background: rgba(99, 102, 241, 0.3);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
background: transparent;
|
||||
color: #94a3b8;
|
||||
border: 1px solid rgba(100, 116, 139, 0.2);
|
||||
}
|
||||
|
||||
.btn-danger:hover {
|
||||
background: rgba(239, 68, 68, 0.1);
|
||||
color: #fca5a5;
|
||||
border-color: rgba(239, 68, 68, 0.3);
|
||||
}
|
||||
|
||||
.btn-danger svg {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
325
website/community/assets/css/editor.css
Normal file
325
website/community/assets/css/editor.css
Normal file
@@ -0,0 +1,325 @@
|
||||
/* OSS Community Editor - 优化版两栏布局 */
|
||||
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
|
||||
.editor-page {
|
||||
min-height: 100vh;
|
||||
background: #0f172a;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.editor-container {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 24px;
|
||||
padding-right: 100px;
|
||||
max-width: 1400px;
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 顶部工具栏 */
|
||||
.editor-toolbar {
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 12px 18px;
|
||||
background: rgba(15, 23, 42, 0.9);
|
||||
border: 1px solid rgba(99, 102, 241, 0.2);
|
||||
border-radius: 12px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.toolbar-left { display: flex; align-items: center; gap: 12px; }
|
||||
|
||||
.back-btn {
|
||||
display: flex; align-items: center; gap: 6px;
|
||||
color: #94a3b8; text-decoration: none; font-size: 14px; font-weight: 500;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
.back-btn:hover { color: #e2e8f0; }
|
||||
.back-btn svg { width: 18px; height: 18px; }
|
||||
|
||||
.toolbar-title {
|
||||
font-size: 16px; font-weight: 700;
|
||||
background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent; background-clip: text;
|
||||
}
|
||||
|
||||
.toolbar-right { display: flex; gap: 8px; }
|
||||
|
||||
.btn {
|
||||
display: flex; align-items: center; gap: 6px;
|
||||
padding: 8px 16px; border-radius: 8px; font-size: 13px;
|
||||
font-weight: 600; cursor: pointer; border: none; transition: all 0.2s;
|
||||
}
|
||||
.btn svg { width: 16px; height: 16px; }
|
||||
|
||||
.btn-outline {
|
||||
background: rgba(100, 116, 139, 0.2);
|
||||
color: #94a3b8; border: 1px solid rgba(100, 116, 139, 0.3);
|
||||
}
|
||||
.btn-outline:hover { background: rgba(100, 116, 139, 0.3); color: #e2e8f0; }
|
||||
|
||||
.btn-primary {
|
||||
background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
|
||||
color: white; box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
|
||||
}
|
||||
.btn-primary:hover { box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4); transform: translateY(-1px); }
|
||||
|
||||
/* 标题输入 */
|
||||
.editor-header {
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.title-input {
|
||||
width: 100%;
|
||||
padding: 12px 16px;
|
||||
background: rgba(30, 41, 59, 0.6);
|
||||
border: 1px solid rgba(99, 102, 241, 0.2);
|
||||
border-radius: 10px;
|
||||
color: #e2e8f0;
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
.title-input:focus {
|
||||
outline: none; border-color: #6366f1;
|
||||
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
|
||||
}
|
||||
.title-input::placeholder { color: #64748b; font-weight: 400; }
|
||||
|
||||
/* 两栏主工作区 */
|
||||
.editor-workspace {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 280px;
|
||||
gap: 20px;
|
||||
flex: 1;
|
||||
min-height: calc(100vh - 280px);
|
||||
}
|
||||
|
||||
/* 编辑器面板 */
|
||||
.editor-panel {
|
||||
background: rgba(15, 23, 42, 0.6);
|
||||
border: 1px solid rgba(99, 102, 241, 0.2);
|
||||
border-radius: 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.panel-header {
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 10px 14px;
|
||||
background: rgba(30, 41, 59, 0.4);
|
||||
border-bottom: 1px solid rgba(99, 102, 241, 0.1);
|
||||
}
|
||||
|
||||
.panel-title {
|
||||
font-size: 12px; font-weight: 600; color: #94a3b8;
|
||||
text-transform: uppercase; letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
.panel-actions { display: flex; gap: 4px; }
|
||||
|
||||
.md-btn {
|
||||
padding: 6px 8px;
|
||||
background: transparent; border: 1px solid transparent; border-radius: 6px;
|
||||
color: #64748b; cursor: pointer; transition: all 0.2s;
|
||||
}
|
||||
.md-btn:hover {
|
||||
background: rgba(99, 102, 241, 0.1);
|
||||
border-color: rgba(99, 102, 241, 0.2);
|
||||
color: #e2e8f0;
|
||||
}
|
||||
.md-btn svg { width: 16px; height: 16px; }
|
||||
|
||||
.editor-textarea {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
padding: 18px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: #e2e8f0;
|
||||
font-family: 'JetBrains Mono', monospace;
|
||||
font-size: 14px;
|
||||
line-height: 1.8;
|
||||
resize: none;
|
||||
overflow-y: auto;
|
||||
tab-size: 2;
|
||||
min-height: 600px;
|
||||
}
|
||||
.editor-textarea:focus { outline: none; }
|
||||
.editor-textarea::placeholder { color: #475569; }
|
||||
|
||||
/* 右侧栏 */
|
||||
.sidebar-panel {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.sidebar-section {
|
||||
background: rgba(15, 23, 42, 0.6);
|
||||
border: 1px solid rgba(99, 102, 241, 0.2);
|
||||
border-radius: 12px;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.sidebar-title {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: #94a3b8;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.meta-select-large {
|
||||
width: 100%;
|
||||
padding: 8px 12px;
|
||||
background: rgba(30, 41, 59, 0.6);
|
||||
border: 1px solid rgba(99, 102, 241, 0.2);
|
||||
border-radius: 8px;
|
||||
color: #e2e8f0;
|
||||
font-size: 13px;
|
||||
}
|
||||
.meta-select-large:focus { outline: none; border-color: #6366f1; }
|
||||
|
||||
/* 标签管理 */
|
||||
.tags-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.tag-item {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 4px 10px;
|
||||
background: rgba(99, 102, 241, 0.15);
|
||||
border: 1px solid rgba(99, 102, 241, 0.3);
|
||||
border-radius: 14px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
color: #c7d2fe;
|
||||
}
|
||||
|
||||
.tag-remove {
|
||||
background: none; border: none; color: #94a3b8;
|
||||
cursor: pointer; font-size: 16px; line-height: 1; padding: 0;
|
||||
width: 16px; height: 16px; display: flex; align-items: center; justify-content: center;
|
||||
}
|
||||
.tag-remove:hover { color: #ef4444; }
|
||||
|
||||
.tag-input {
|
||||
width: 100%;
|
||||
padding: 6px 10px;
|
||||
background: rgba(15, 23, 42, 0.8);
|
||||
border: 1px solid rgba(99, 102, 241, 0.2);
|
||||
border-radius: 6px;
|
||||
color: #e2e8f0;
|
||||
font-size: 12px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.tag-input:focus { outline: none; border-color: #6366f1; }
|
||||
|
||||
.tags-suggestions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.tag-suggestion {
|
||||
padding: 3px 10px;
|
||||
background: rgba(100, 116, 139, 0.15);
|
||||
border: 1px solid rgba(100, 116, 139, 0.2);
|
||||
border-radius: 12px;
|
||||
font-size: 11px;
|
||||
color: #94a3b8;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
.tag-suggestion:hover {
|
||||
background: rgba(99, 102, 241, 0.1);
|
||||
border-color: rgba(99, 102, 241, 0.2);
|
||||
color: #c7d2fe;
|
||||
}
|
||||
|
||||
/* Markdown 帮助 */
|
||||
.markdown-help {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.help-item {
|
||||
font-size: 12px;
|
||||
color: #94a3b8;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.help-item code {
|
||||
display: inline-block;
|
||||
background: rgba(30, 41, 59, 0.6);
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
font-family: 'JetBrains Mono', monospace;
|
||||
font-size: 11px;
|
||||
color: #f472b6;
|
||||
margin-right: 6px;
|
||||
min-width: 90px;
|
||||
}
|
||||
|
||||
/* Toast 提示 */
|
||||
.toast {
|
||||
position: fixed; bottom: 16px; right: 16px;
|
||||
padding: 10px 14px; border-radius: 8px;
|
||||
display: flex; align-items: center; gap: 6px;
|
||||
font-size: 13px; font-weight: 500;
|
||||
z-index: 10000; animation: toastSlideIn 0.3s ease-out;
|
||||
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
@keyframes toastSlideIn {
|
||||
from { opacity: 0; transform: translateX(100px); }
|
||||
to { opacity: 1; transform: translateX(0); }
|
||||
}
|
||||
.toast svg { width: 16px; height: 16px; }
|
||||
.toast-success { background: rgba(34, 197, 94, 0.15); border: 1px solid rgba(34, 197, 94, 0.3); color: #86efac; }
|
||||
.toast-error { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.3); color: #fca5a5; }
|
||||
|
||||
/* 响应式 */
|
||||
@media (max-width: 1024px) {
|
||||
.editor-container { padding: 20px; }
|
||||
.editor-workspace { grid-template-columns: 1fr; }
|
||||
.sidebar-panel {
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.sidebar-section { flex: 1; min-width: 200px; }
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.editor-page { margin-left: 0; }
|
||||
.editor-container { padding: 16px; padding-bottom: 80px; }
|
||||
.editor-toolbar {
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
padding: 12px;
|
||||
}
|
||||
.toolbar-left, .toolbar-right { width: 100%; justify-content: center; }
|
||||
.title-input { font-size: 18px; padding: 10px 14px; }
|
||||
.editor-workspace { min-height: auto; }
|
||||
.sidebar-panel { flex-direction: column; }
|
||||
.editor-textarea { min-height: 400px; }
|
||||
}
|
||||
316
website/community/assets/css/post-drawer.css
Normal file
316
website/community/assets/css/post-drawer.css
Normal file
@@ -0,0 +1,316 @@
|
||||
/* OSS Community - 文章抽屉样式 */
|
||||
|
||||
/* 遮罩层 */
|
||||
.post-drawer-overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
backdrop-filter: blur(4px);
|
||||
z-index: 9998;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.post-drawer-overlay.active {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
/* 抽屉容器 */
|
||||
.post-drawer {
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
bottom: 0;
|
||||
transform: translateX(-50%) translateY(100%);
|
||||
width: 90%;
|
||||
max-width: 900px;
|
||||
max-height: 85vh;
|
||||
background: #0f172a;
|
||||
border: 1px solid rgba(99, 102, 241, 0.2);
|
||||
border-bottom: none;
|
||||
border-radius: 20px 20px 0 0;
|
||||
box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
|
||||
z-index: 9999;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.post-drawer.active {
|
||||
transform: translateX(-50%) translateY(0);
|
||||
}
|
||||
|
||||
/* 抽屉顶部标题栏 */
|
||||
.post-drawer-header {
|
||||
flex-shrink: 0;
|
||||
padding: 24px 28px 20px;
|
||||
border-bottom: 1px solid rgba(99, 102, 241, 0.1);
|
||||
background: rgba(15, 23, 42, 0.95);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.post-drawer-close {
|
||||
position: absolute;
|
||||
top: 16px;
|
||||
right: 16px;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 10px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
background: rgba(30, 41, 59, 0.6);
|
||||
color: #94a3b8;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.post-drawer-close:hover {
|
||||
background: rgba(239, 68, 68, 0.2);
|
||||
border-color: rgba(239, 68, 68, 0.3);
|
||||
color: #fca5a5;
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
.post-drawer-close svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.post-drawer-title {
|
||||
font-size: 22px;
|
||||
font-weight: 700;
|
||||
color: #e2e8f0;
|
||||
margin: 0 0 12px 0;
|
||||
padding-right: 50px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.post-drawer-meta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
color: #64748b;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.post-drawer-avatar {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 8px;
|
||||
background: linear-gradient(135deg, #6366f1, #8b5cf6);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: 700;
|
||||
font-size: 14px;
|
||||
color: white;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.post-drawer-user-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.post-drawer-username {
|
||||
color: #e2e8f0;
|
||||
font-weight: 600;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.post-drawer-date {
|
||||
color: #64748b;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.post-drawer-category {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
padding: 3px 10px;
|
||||
border-radius: 8px;
|
||||
background: rgba(99, 102, 241, 0.2);
|
||||
color: #c7d2fe;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
/* 抽屉内容区域 */
|
||||
.post-drawer-body {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 28px;
|
||||
}
|
||||
|
||||
.post-drawer-content {
|
||||
color: #cbd5e1;
|
||||
font-size: 15px;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.post-drawer-content h1,
|
||||
.post-drawer-content h2,
|
||||
.post-drawer-content h3 {
|
||||
color: #e2e8f0;
|
||||
margin: 1.2em 0 0.6em;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.post-drawer-content h1 { font-size: 1.8em; border-bottom: 2px solid rgba(99, 102, 241, 0.3); padding-bottom: 0.3em; }
|
||||
.post-drawer-content h2 { font-size: 1.4em; border-bottom: 1px solid rgba(99, 102, 241, 0.2); padding-bottom: 0.2em; }
|
||||
.post-drawer-content h3 { font-size: 1.2em; }
|
||||
|
||||
.post-drawer-content p {
|
||||
color: #cbd5e1;
|
||||
line-height: 1.8;
|
||||
margin: 0.8em 0;
|
||||
}
|
||||
|
||||
.post-drawer-content code {
|
||||
background: rgba(30, 41, 59, 0.6);
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
font-family: 'JetBrains Mono', monospace;
|
||||
font-size: 0.9em;
|
||||
color: #f472b6;
|
||||
}
|
||||
|
||||
.post-drawer-content pre {
|
||||
background: rgba(15, 23, 42, 0.8);
|
||||
border: 1px solid rgba(99, 102, 241, 0.2);
|
||||
border-radius: 8px;
|
||||
padding: 16px;
|
||||
overflow-x: auto;
|
||||
margin: 0.8em 0;
|
||||
}
|
||||
|
||||
.post-drawer-content pre code {
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
color: #e2e8f0;
|
||||
}
|
||||
|
||||
.post-drawer-content blockquote {
|
||||
border-left: 4px solid #6366f1;
|
||||
margin: 0.8em 0;
|
||||
padding: 12px 16px;
|
||||
background: rgba(99, 102, 241, 0.05);
|
||||
border-radius: 0 8px 8px 0;
|
||||
color: #94a3b8;
|
||||
}
|
||||
|
||||
.post-drawer-content ul,
|
||||
.post-drawer-content ol {
|
||||
padding-left: 24px;
|
||||
color: #cbd5e1;
|
||||
}
|
||||
|
||||
.post-drawer-content li {
|
||||
margin: 0.4em 0;
|
||||
}
|
||||
|
||||
.post-drawer-content a {
|
||||
color: #6366f1;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.post-drawer-content a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.post-drawer-content img {
|
||||
max-width: 100%;
|
||||
border-radius: 8px;
|
||||
margin: 0.8em 0;
|
||||
}
|
||||
|
||||
.post-drawer-content hr {
|
||||
border: none;
|
||||
height: 1px;
|
||||
background: rgba(99, 102, 241, 0.2);
|
||||
margin: 1.5em 0;
|
||||
}
|
||||
|
||||
/* 底部统计栏 */
|
||||
.post-drawer-footer {
|
||||
flex-shrink: 0;
|
||||
padding: 16px 28px;
|
||||
border-top: 1px solid rgba(99, 102, 241, 0.1);
|
||||
background: rgba(15, 23, 42, 0.95);
|
||||
display: flex;
|
||||
gap: 24px;
|
||||
color: #64748b;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.post-drawer-stat {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.post-drawer-stat svg {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
/* 滚动条样式 */
|
||||
.post-drawer-body::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
|
||||
.post-drawer-body::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.post-drawer-body::-webkit-scrollbar-thumb {
|
||||
background: rgba(99, 102, 241, 0.3);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.post-drawer-body::-webkit-scrollbar-thumb:hover {
|
||||
background: rgba(99, 102, 241, 0.5);
|
||||
}
|
||||
|
||||
/* 响应式 */
|
||||
@media (max-width: 768px) {
|
||||
.post-drawer {
|
||||
width: 100%;
|
||||
max-width: none;
|
||||
max-height: 90vh;
|
||||
border-radius: 16px 16px 0 0;
|
||||
}
|
||||
|
||||
.post-drawer-header {
|
||||
padding: 20px 20px 16px;
|
||||
}
|
||||
|
||||
.post-drawer-title {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.post-drawer-body {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.post-drawer-content {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.post-drawer-footer {
|
||||
padding: 14px 20px;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.post-drawer-close {
|
||||
top: 12px;
|
||||
right: 12px;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user