/* 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; } }