-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlibrary.css
More file actions
186 lines (170 loc) · 6.82 KB
/
Copy pathlibrary.css
File metadata and controls
186 lines (170 loc) · 6.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
:root {
--bg-primary: #0d1117; --bg-secondary: #161b22; --border: #30363d;
--text: #c9d1d9; --text-muted: #8b949e; --accent: #58a6ff; --danger: #f85149;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: var(--bg-primary); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, sans-serif; display: flex; height: 100vh; overflow: hidden; }
.sidebar { width: 260px; background: var(--bg-secondary); border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.logo { padding: 24px; font-size: 20px; font-weight: 600; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); }
.nav-menu { display: flex; flex-direction: column; padding: 16px 12px; gap: 8px; }
.nav-item {
display: flex; align-items: center; gap: 10px; /* 新增 Flex 对齐 */
padding: 10px 16px; border-radius: 6px; color: var(--text-muted); text-decoration: none; font-size: 14px; transition: all 0.2s;
}
/* 新增 SVG 尺寸控制 */
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.nav-item.active { background: rgba(88,166,255,0.1); color: var(--accent); font-weight: 500; }
.main-content { flex: 1; overflow-y: auto; padding: 40px; }
.section-header { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 1px solid var(--border); padding-bottom: 16px; margin-bottom: 24px; }
.section-header h2 { font-size: 24px; font-weight: 500; color: #fff; }
.subtitle { font-size: 13px; color: var(--text-muted); }
.btn-primary { background: #238636; color: #fff; padding: 8px 16px; border-radius: 6px; font-size: 13px; cursor: pointer; transition: 0.2s; }
.btn-primary:hover { background: #2ea043; }
/* 书架网格 */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 24px; }
.book-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; padding: 16px; cursor: pointer; transition: 0.2s; display: flex; flex-direction: column; aspect-ratio: 3/4; position: relative; }
.book-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.book-icon { font-size: 48px; text-align: center; flex: 1; display: flex; align-items: center; justify-content: center; opacity: 0.8; }
.book-title { font-size: 13px; font-weight: 500; text-align: center; word-break: break-all; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.btn-delete-book {
position: absolute; top: 12px; right: 12px;
background: rgba(0,0,0,0.6); border: none; color: #fff;
width: 32px; height: 32px; /* 增大点击热区 */
border-radius: 50%; cursor: pointer; opacity: 0; transition: 0.2s;
display: flex; align-items: center; justify-content: center; /* 完美居中X */
font-size: 18px; /* 放大图标 */
z-index: 10; /* 防止被卡片其他元素遮挡 */
}
.book-card:hover .btn-delete-book { opacity: 1; }
.btn-delete-book:hover { background: var(--danger); }
/* 武器库列表 */
.principle-list {
display: flex;
flex-direction: column;
gap: 32px; /* 从 16px 翻倍,彻底拉开记录之间的间距 */
}
.principle-card {
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 12px; /* 圆角更大更优雅 */
padding: 24px 32px 64px 32px; /* 底部留出 64px 空间,防止文字和操作按钮重叠 */
position: relative;
box-shadow: 0 4px 20px rgba(0,0,0,0.15); /* 增加悬浮阴影,让卡片具备物理厚度感 */
}
.p-meta { font-size: 12px; color: var(--accent); margin-bottom: 12px; display: flex; justify-content: space-between; }
.p-actions {
position: absolute;
bottom: 20px;
right: 20px;
display: flex;
gap: 8px;
}
.btn-action-p {
background: transparent;
border: 1px solid var(--border);
color: var(--text-muted);
padding: 4px 12px;
border-radius: 4px;
font-size: 12px;
cursor: pointer;
transition: 0.2s;
}
.btn-action-p:hover {
background: var(--bg-hover);
color: var(--text);
}
.btn-action-p.copy:hover {
border-color: var(--accent);
color: var(--accent);
}
.btn-action-p.delete:hover {
border-color: var(--danger);
color: var(--danger);
}
/* 空状态 */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 80px 20px; color: var(--text-muted); text-align: center; }
.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }
.empty-state p { font-size: 14px; margin-bottom: 4px; }
.empty-state .hint { font-size: 12px; opacity: 0.6; }
/* 隐藏文件输入 */
.btn-primary input { display: none; }
/* 视图切换 */
.view-section { display: none; }
.view-section.active { display: block; }
/* 滚动条 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
/* 全局拖拽遮罩 */
.drag-overlay {
position: fixed; top: 0; left: 0; right: 0; bottom: 0;
background: rgba(13, 17, 23, 0.95);
z-index: 9999;
display: flex; align-items: center; justify-content: center;
border: 4px dashed var(--accent);
margin: 16px; border-radius: 16px;
pointer-events: none; /* 关键:让事件穿透 */
}
.drag-content { text-align: center; color: var(--accent); }
/* 知识晶体 Markdown 样式适配 (精装博客级排版) */
.p-text {
font-size: 14.5px; /* 字体适中,清晰锐利 */
color: #e6edf3;
}
.p-text p {
margin-bottom: 12px; /* 适度收紧段落间距 */
line-height: 1.75; /* 优化行高 */
text-align: justify;
}
.p-text p:last-child { margin-bottom: 0; }
.p-text ul, .p-text ol {
padding-left: 24px;
margin-top: 6px;
margin-bottom: 12px;
}
.p-text li {
margin-bottom: 6px;
line-height: 1.75;
}
.p-text li p { margin-bottom: 0; }
.p-text strong {
color: var(--accent);
font-weight: 600;
background: rgba(88, 166, 255, 0.1);
padding: 0 4px;
border-radius: 4px;
}
.p-text h1, .p-text h2, .p-text h3, .p-text h4 {
color: #fff;
margin-top: 20px;
margin-bottom: 10px;
font-weight: 600;
line-height: 1.4;
}
.p-text h3 { font-size: 18px; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.p-text h4 { font-size: 16px; }
/* 新增:引用块样式 */
.p-text blockquote {
border-left: 4px solid var(--accent);
margin: 12px 0;
color: var(--text-muted);
background: rgba(88, 166, 255, 0.05);
padding: 8px 16px;
border-radius: 0 4px 4px 0;
}
/* 书架背景水印引导 */
.bg-watermark {
position: fixed;
top: 55%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 2.5rem;
font-weight: 700;
color: rgba(255, 255, 255, 0.04); /* 极低透明度,不喧宾夺主 */
pointer-events: none; /* 事件穿透,不影响点击 */
z-index: 0;
white-space: nowrap;
user-select: none;
}
.book-grid { position: relative; z-index: 1; } /* 确保书籍盖在水印上方 */