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