Files
XinagMuKanBan/assets/css/style.css
2025-11-18 14:28:07 +08:00

145 lines
9.9 KiB
CSS
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
:root {
--sidebar-width: 220px;
--bg: #f6f7fb;
--card-bg: #fff;
--border: #e5e7eb;
--text: #111827;
--muted: #6b7280;
--primary: #3b82f6;
--danger: #ef4444;
--success: #10b981;
--warning: #f59e0b;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); }
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-width); background: #111827; color: #fff; padding: 16px; }
.sidebar h2 { margin-top: 0; font-size: 18px; }
.menu { list-style: none; padding: 0; margin: 0; }
.menu li { padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.menu li.active, .menu li:hover { background: #374151; }
.main { flex: 1; padding: 16px; }
.header { display: flex; align-items: center; gap: 8px; justify-content: space-between; margin-bottom: 12px; }
.header-right { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.header-left { display: flex; align-items: center; gap: 8px; }
.status-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.column { background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
.column.drag-over { border-color: var(--primary); box-shadow: inset 0 0 0 2px rgba(59,130,246,0.15); background: #f8fbff; }
.column h3 { margin: 0 0 8px; font-size: 16px; }
.column .count { color: var(--muted); font-size: 12px; }
.project { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 8px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.project.dragging { opacity: 0.6; }
.project .title { font-weight: 600; cursor: pointer; }
.project .actions { display: flex; gap: 6px; }
.btn { padding: 6px 10px; border: 1px solid var(--border); background: #fff; border-radius: 6px; cursor: pointer; font-size: 13px; }
.btn:hover { background:#f8fafc; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
a.btn, a.btn:link, a.btn:visited { color: var(--text); text-decoration: none; display:inline-flex; align-items:center; gap:6px; }
a.btn:hover { text-decoration: none; border-color: var(--primary); box-shadow: 0 2px 10px rgba(59,130,246,0.15); }
.btn.back-btn { position: relative; }
.btn.back-btn::before { content: "←"; color: var(--primary); margin-right: 6px; font-weight: 600; }
/* 顶部操作区:让重命名输入框更长 */
.project-actions { display:flex; gap:8px; align-items:center; margin-bottom:8px; flex-wrap: wrap; }
.project-actions #renameProjectInput { flex: 1; min-width: 380px; }
/* 提醒横幅 */
.remind-banner { display:flex; align-items:flex-start; gap:8px; background:#fff8db; border:1px solid #fde68a; color:#6b4e16; padding:8px 10px; border-radius:8px; font-size:13px; }
.remind-banner::before { content:"⚠"; font-weight:700; color:#b45309; }
.remind-banner .muted { color:#8b6b22; }
.btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.outline { background: #fff; color: var(--text); }
.input { padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; }
.select { padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; background: #fff; }
.footer { margin-top: 12px; color: var(--muted); font-size: 12px; }
.chart-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.chart-title { display:flex; align-items:center; justify-content:space-between; margin:0 0 8px; font-size:16px; }
.chart-msg { color: var(--muted); font-size: 12px; margin-top: 6px; }
.chart-container { position: relative; height: 240px; width: 100%; }
#monthlyChart { width: 100%; height: 100%; display: block; }
/* 导出管理 */
.export-item { display:flex; justify-content:space-between; align-items:center; padding:8px; border:1px solid var(--border); border-radius:8px; background:#fff; margin-bottom:8px; }
.export-info { font-size: 13px; color: var(--text); }
.export-actions { display:flex; gap:8px; }
/* 模态框 */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: none; align-items: center; justify-content: center; }
.modal { width: 640px; max-width: 92vw; background: #fff; border-radius: 10px; border: 1px solid var(--border); }
.modal-header { padding: 10px 12px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 12px; max-height: 68vh; overflow-y: auto; }
.modal-footer { padding: 10px 12px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
.note { border: 1px dashed var(--border); border-radius: 8px; padding: 8px; margin: 8px 0; }
.note .meta { color: var(--muted); font-size: 12px; }
.hidden { display: none; }
/* 小工具类 */
.muted-small { color: var(--muted); font-size: 12px; }
.muted { color: var(--muted); }
.ml-8 { margin-left: 8px; }
.notes-title { margin: 6px 0; }
.notes-add-bar { display:flex; gap:8px; align-items:center; margin-top:8px; }
.notes-add-bar textarea#newNoteInput { flex: 1; min-height: 120px; padding: 10px; font-size: 14px; line-height: 1.6; resize: vertical; }
/* 笔记内容预览(支持图片) */
.note-preview { margin-top: 6px; color: var(--muted); font-size: 13px; max-height: 280px; overflow: auto; padding: 6px; background: #fafafa; border: 1px solid var(--border); border-radius: 6px; }
.note-preview img { max-width: 100%; max-height: 240px; object-fit: contain; border-radius: 6px; margin-top: 6px; display: block; cursor: zoom-in; }
.note-preview a { color: var(--primary); text-decoration: none; word-break: break-all; }
.note-preview a:hover { text-decoration: underline; }
/* 评论气泡样式(预览在上方,编辑框在下方) */
.note-bubble { position: relative; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.04); margin-bottom: 8px; }
.note-bubble::after { content: ""; position: absolute; left: 16px; top: -6px; width: 12px; height: 12px; background: #fff; border-left: 1px solid var(--border); border-top: 1px solid var(--border); transform: rotate(45deg); }
.note-bubble img { max-width: 100%; border-radius: 8px; margin-top: 6px; }
/* Git 风格的笔记卡片 */
.note-git { background:#f9fafb; border:1px solid var(--border); border-left:4px solid #1f2937; border-radius:8px; margin:10px 0; box-shadow:0 2px 6px rgba(0,0,0,0.02); }
.note-git-header { display:flex; align-items:center; gap:10px; color:var(--muted); font-size:12px; padding:8px 12px; border-bottom:1px dashed var(--border); }
.note-git-title { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-weight:600; color:var(--text); cursor:pointer; }
.note-git-title:hover { text-decoration: underline; }
.note-git-time { margin-left:auto; color:var(--muted); }
.note-git-body { padding:12px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; white-space: pre-wrap; word-break: break-word; }
.note-git-body img { max-width:100%; max-height: clamp(220px, 48vh, 420px); object-fit: contain; border-radius:6px; margin:6px 0; display:block; cursor: zoom-in; }
/* 笔记卡片(头像+用户名+时间+操作) */
.note-card { background:#fff; border:1px solid var(--border); border-radius:12px; padding:12px; margin:10px 0; box-shadow:0 2px 8px rgba(0,0,0,0.04); }
.note-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.note-user { display:flex; align-items:center; gap:10px; }
.note-avatar { width:32px; height:32px; border-radius:50%; background:#e5e7eb; color:#374151; display:flex; align-items:center; justify-content:center; font-weight:600; }
.note-username { font-weight:600; }
.note-time { color:var(--muted); font-size:12px; }
.note-comment-btn { border:none; background:transparent; color:var(--muted); cursor:pointer; padding:4px 8px; border-radius:6px; }
.note-comment-btn:hover { background:#f3f4f6; color:var(--text); }
.note-footer { display:flex; align-items:center; justify-content:flex-end; margin-top:8px; }
.note-actions-left { display:flex; gap:14px; color:var(--muted); font-size:13px; }
.note-actions-left .action { cursor:pointer; user-select:none; }
.note-actions-left .action:hover { color:var(--text); }
.note-actions-right { display:flex; gap:8px; }
/* 图片浮窗Lightbox */
.img-lightbox-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: none; align-items: center; justify-content: center; z-index: 10000; }
.img-lightbox-content { position: relative; max-width: 92vw; max-height: 92vh; }
.img-lightbox-content img { max-width: 92vw; max-height: 92vh; border-radius: 8px; box-shadow: 0 12px 30px rgba(0,0,0,0.35); background: #fff; }
.img-lightbox-close { position: absolute; top: -10px; right: -10px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); background: #fff; color: var(--text); cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,0.2); }
/* 自适应/响应式:根据视口宽度优化布局,在浏览器缩放时也能更好适配 */
@media (max-width: 1280px) {
.status-board { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
.app { display: block; }
.main { padding: 12px; }
.status-board { grid-template-columns: repeat(2, 1fr); gap: 10px; }
.column { padding: 8px; }
.chart-container { height: clamp(180px, 28vh, 240px); }
.note-preview { max-height: clamp(200px, 34vh, 280px); }
}
@media (max-width: 640px) {
.header { flex-wrap: wrap; gap: 6px; }
.header-right { width: 100%; justify-content: flex-start; gap: 6px; }
.status-board { grid-template-columns: 1fr; }
.chart-container { height: clamp(160px, 32vh, 220px); }
.modal { width: 100%; max-width: 96vw; }
.note-preview img { max-height: 200px; }
}