Notes: all-left, wider, lighter, numbered cards, connector polyline

This commit is contained in:
2026-11-15 10:33:27 +08:00
parent 210483763a
commit 9b56433db6
3 changed files with 140 additions and 66 deletions
+56 -20
View File
@@ -224,13 +224,13 @@ html.dark #post-list .post-card:hover {
margin-bottom: 1rem;
}
/* ===== 注释(边注):宽屏显示在两侧留白,窄屏虚线框内嵌 ===== */
/* ===== 注释(边注):宽屏显示在左侧留白并用折线连回原文,窄屏虚线框内嵌 ===== */
.post-note-mark {
font-size: 0.7em;
line-height: 0;
vertical-align: super;
margin-left: 0.1em;
color: #2563eb;
margin-left: 0.15em;
color: #3b82f6;
font-weight: 600;
}
@@ -243,19 +243,33 @@ html.dark #post-list .post-card:hover {
display: block;
margin: 0.5rem 0;
padding: 0.5rem 0.75rem;
border: 1px dashed #cbd5e1;
border: 1px dashed #dbe0e6;
border-radius: 0.375rem;
font-size: 0.85rem;
line-height: 1.65;
color: #6b7280;
line-height: 1.7;
color: #9aa1ab;
}
.dark .post-note {
border-color: #404040;
color: #9ca3af;
border-color: #333;
color: #7e848c;
}
/* 宽屏:由 notes.js 接管,放进页面两侧的空白处(不占用正文布局) */
/* 注释卡片上的序号 */
.post-note-num {
font-size: 0.72em;
font-weight: 600;
line-height: 0;
vertical-align: super;
margin-right: 0.45em;
color: #b6bcc5;
}
.dark .post-note-num {
color: #6b7078;
}
/* 宽屏:由 notes.js 接管,放进正文左侧的空白处 */
@media (min-width: 80rem) {
html.js .post-note {
display: none;
@@ -268,33 +282,55 @@ html.dark #post-list .post-card:hover {
html.js main#content.notes-active .post-note.placed {
display: block;
position: absolute;
z-index: 1;
margin: 0;
padding: 0 0.75rem;
border: 0 solid #e5e7eb;
border: 0 solid #e4e8ee;
border-right-width: 2px;
border-radius: 0;
background: none;
font-size: 0.875rem;
line-height: 1.7;
color: #6b7280;
line-height: 1.75;
color: #9aa1ab;
}
html.dark.js main#content.notes-active .post-note.placed {
color: #9ca3af;
border-color: #333;
color: #7e848c;
border-color: #2a2a2a;
}
/* 注释靠在正文哪一侧,就在朝向正文的那边加一条细线 */
html.js main#content.notes-active .post-note.placed[data-side="right"] {
border-left-width: 2px;
/* 连接原文与注释卡片的折线 */
.post-notes-lines {
position: absolute;
z-index: 0;
pointer-events: none;
overflow: visible;
}
html.js main#content.notes-active .post-note.placed[data-side="left"] {
border-right-width: 2px;
text-align: left;
.post-notes-lines path {
fill: none;
stroke: #d7dce2;
stroke-width: 1;
}
.post-notes-lines circle {
fill: #c4cad3;
}
html.dark .post-notes-lines path {
stroke: #353535;
}
html.dark .post-notes-lines circle {
fill: #4a4a4a;
}
}
@media print {
.post-notes-lines {
display: none !important;
}
.post-note {
display: block !important;
position: static !important;