阅读进度 + 继续阅读 + 文章系列 + 完整 SEO

This commit is contained in:
2026-07-17 12:34:19 +08:00 Unverified
parent 336dcc7670
commit 6ac59f404b
9 changed files with 424 additions and 4 deletions
+1
View File
@@ -12,3 +12,4 @@
@import "./site/12-theme.css";
@import "./site/13-responsive.css";
@import "./site/14-animations.css";
@import "./site/15-reading-series.css";
+153
View File
@@ -0,0 +1,153 @@
.reading-progress {
position: fixed;
inset: 0 0 auto;
z-index: 40;
height: 4px;
overflow: hidden;
background: rgba(15, 118, 110, 0.12);
pointer-events: none;
}
.reading-progress span {
display: block;
width: 100%;
height: 100%;
transform: scaleX(0);
transform-origin: left center;
background: linear-gradient(90deg, #3eb8be, #0f766e);
box-shadow: 0 0 12px rgba(62, 184, 190, 0.56);
will-change: transform;
}
.reading-resume {
position: fixed;
right: max(18px, var(--page-gutter));
bottom: 24px;
z-index: 32;
display: grid;
grid-template-columns: 42px minmax(0, 1fr) auto;
align-items: center;
gap: 13px;
width: min(520px, calc(100vw - 32px));
border: 1px solid rgba(255, 255, 255, 0.66);
border-radius: 14px;
padding: 14px;
color: #27313a;
background: rgba(255, 253, 248, 0.92);
box-shadow: 0 22px 60px rgba(44, 55, 63, 0.24);
backdrop-filter: blur(20px) saturate(165%);
-webkit-backdrop-filter: blur(20px) saturate(165%);
animation: reading-resume-in 0.3s ease both;
}
.reading-resume[hidden] { display: none; }
.reading-resume-icon {
display: grid;
width: 42px;
height: 42px;
place-items: center;
border-radius: 12px;
color: #fff;
background: #3eb8be;
}
.reading-resume strong,
.reading-resume p { margin: 0; }
.reading-resume p { color: var(--muted); font-size: 0.88rem; }
.reading-resume-actions { display: flex; gap: 7px; }
.reading-resume button {
border: 1px solid rgba(15, 118, 110, 0.18);
border-radius: 999px;
padding: 7px 11px;
color: var(--accent);
font: inherit;
font-size: 0.84rem;
font-weight: 800;
background: rgba(236, 253, 245, 0.72);
cursor: pointer;
}
.reading-resume button:first-child { color: #fff; background: #3eb8be; }
.post-series {
margin: 0 0 30px;
overflow: hidden;
border: 1px solid rgba(15, 118, 110, 0.18);
border-radius: 12px;
background: rgba(236, 253, 245, 0.42);
}
.post-series-head {
display: flex;
align-items: end;
justify-content: space-between;
gap: 18px;
padding: 18px 20px;
border-bottom: 1px solid rgba(15, 118, 110, 0.14);
}
.post-series-head span { color: var(--accent); font-size: 0.72rem; font-weight: 900; letter-spacing: 0.1em; }
.post-series-head h2 { margin: 2px 0 0; font-size: 1.25rem; }
.post-series-head > strong { color: var(--muted); font-size: 0.86rem; white-space: nowrap; }
.post-series-list {
display: grid;
max-height: 310px;
margin: 0;
overflow-y: auto;
padding: 8px;
list-style: none;
}
.post-series-list a {
display: grid;
grid-template-columns: 32px minmax(0, 1fr);
align-items: center;
gap: 10px;
border-radius: 8px;
padding: 8px 10px;
}
.post-series-list a:hover { background: rgba(62, 184, 190, 0.1); }
.post-series-list li.is-current a { color: #fff; background: #3eb8be; }
.post-series-list span { font-variant-numeric: tabular-nums; opacity: 0.7; }
.post-series-list strong { overflow: hidden; font-size: 0.92rem; text-overflow: ellipsis; white-space: nowrap; }
.post-series-nav {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
border-top: 1px solid rgba(15, 118, 110, 0.14);
}
.post-series-nav a { display: grid; gap: 2px; padding: 13px 18px; }
.post-series-nav a:last-child { text-align: right; border-left: 1px solid rgba(15, 118, 110, 0.14); }
.post-series-nav span { color: var(--muted); font-size: 0.76rem; }
.post-series-nav strong { overflow: hidden; color: var(--accent); font-size: 0.88rem; text-overflow: ellipsis; white-space: nowrap; }
:root[data-theme='dark'] .reading-resume,
:root[data-theme='dark'] .post-series {
border-color: rgba(139, 224, 213, 0.22);
color: #edf7f5;
background: rgba(13, 23, 29, 0.92);
}
:root[data-theme='dark'] .post-series-list a:hover { background: rgba(139, 224, 213, 0.1); }
@keyframes reading-resume-in {
from { opacity: 0; transform: translateY(16px); }
to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 720px) {
.reading-resume {
right: 16px;
bottom: 16px;
grid-template-columns: 38px minmax(0, 1fr);
}
.reading-resume-icon { width: 38px; height: 38px; }
.reading-resume-actions { grid-column: 1 / -1; }
.reading-resume button { flex: 1; }
.post-series-head { align-items: start; flex-direction: column; gap: 6px; }
.post-series-nav { grid-template-columns: 1fr; }
.post-series-nav a:last-child { border-top: 1px solid rgba(15, 118, 110, 0.14); border-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
.reading-resume { animation: none; }
}