文章页优化

This commit is contained in:
2026-06-18 14:40:31 +08:00 Unverified
parent 9d6de3158e
commit 39b15b4be9
12 changed files with 1015 additions and 9 deletions
+521 -4
View File
@@ -144,6 +144,10 @@ a {
align-items: center;
}
.compact-hero {
min-height: 260px;
}
.hero h1 {
margin: 0;
font-size: clamp(3rem, 8vw, 6.5rem);
@@ -756,6 +760,69 @@ time {
text-underline-offset: 3px;
}
.prose .hexo-link-card {
display: grid;
grid-template-columns: 46px minmax(0, 1fr);
gap: 14px;
align-items: center;
margin: 1.2em 0;
border: 1px solid rgba(15, 118, 110, 0.2);
border-radius: 8px;
padding: 14px 16px;
color: #27313a;
text-decoration: none;
background:
linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(236, 253, 245, 0.62)),
rgba(255, 253, 248, 0.88);
box-shadow: 0 12px 28px rgba(44, 55, 63, 0.1);
transition:
border-color 0.2s ease,
box-shadow 0.2s ease,
transform 0.2s ease;
}
.prose .hexo-link-card:hover {
color: #27313a;
border-color: rgba(15, 118, 110, 0.38);
box-shadow: 0 16px 34px rgba(15, 118, 110, 0.14);
transform: translateY(-1px);
}
.hexo-link-card__icon {
display: grid;
place-items: center;
width: 46px;
height: 46px;
border-radius: 8px;
color: #fff;
font-size: 1.05rem;
font-weight: 800;
background: #3eb8be;
}
.hexo-link-card__body {
display: grid;
min-width: 0;
gap: 2px;
}
.hexo-link-card__body strong,
.hexo-link-card__body span {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.hexo-link-card__body strong {
font-size: 1rem;
line-height: 1.35;
}
.hexo-link-card__body span {
color: var(--muted);
font-size: 0.88rem;
}
.prose img {
max-width: 100%;
border-radius: 8px;
@@ -771,6 +838,216 @@ time {
font-family: "JetBrains Mono", Consolas, monospace;
}
.post-copyright-card {
position: relative;
overflow: hidden;
margin-top: 42px;
border: 1px solid rgba(255, 255, 255, 0.64);
border-radius: 8px;
padding: 24px 28px 20px;
color: #33433f;
background:
radial-gradient(circle at 14% 0%, rgba(255, 255, 255, 0.82), transparent 32%),
linear-gradient(135deg, rgba(255, 253, 248, 0.76), rgba(236, 253, 245, 0.58)),
rgba(255, 253, 248, 0.72);
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.88),
0 16px 42px rgba(58, 51, 38, 0.12);
backdrop-filter: blur(18px) saturate(165%);
-webkit-backdrop-filter: blur(18px) saturate(165%);
}
.post-copyright-card::before {
content: "";
position: absolute;
inset: 0;
background: linear-gradient(135deg, rgba(255, 255, 255, 0.44), transparent 44%, rgba(255, 255, 255, 0.22));
pointer-events: none;
}
.post-copyright-card::after {
content: "";
position: absolute;
top: 8px;
right: 16px;
left: 16px;
height: 1px;
border-radius: 999px;
background: rgba(255, 255, 255, 0.82);
pointer-events: none;
}
.post-copyright-main,
.post-copyright-footer {
position: relative;
z-index: 2;
}
.post-copyright-mark {
position: absolute;
top: 14px;
right: 22px;
z-index: 1;
display: grid;
place-items: center;
width: clamp(74px, 12vw, 118px);
aspect-ratio: 1;
border: 1px solid rgba(15, 118, 110, 0.12);
border-radius: 999px;
color: rgba(15, 118, 110, 0.16);
font-family: Georgia, "Times New Roman", serif;
font-size: clamp(1.85rem, 5vw, 3.4rem);
font-weight: 900;
line-height: 1;
background:
linear-gradient(145deg, rgba(255, 255, 255, 0.46), rgba(236, 253, 245, 0.2)),
rgba(255, 255, 255, 0.16);
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.72),
0 12px 30px rgba(15, 118, 110, 0.06);
pointer-events: none;
}
.post-copyright-mark span {
transform: translateY(-1px);
}
.post-copyright-card h2 {
margin: 0;
color: #27313a;
font-size: clamp(1.08rem, 2.2vw, 1.35rem);
line-height: 1.35;
}
.post-copyright-link {
display: inline-block;
margin-top: 12px;
color: var(--muted);
font-size: 0.94rem;
font-weight: 600;
}
.post-copyright-link:hover,
.post-copyright-meta a:hover {
color: var(--accent);
}
.post-copyright-meta {
display: grid;
grid-template-columns: 1fr 1.25fr 2fr;
gap: 18px 28px;
margin: 20px 0 0;
border-top: 1px solid rgba(15, 118, 110, 0.18);
border-bottom: 1px solid rgba(15, 118, 110, 0.12);
padding: 16px 0;
}
.post-copyright-meta div {
min-width: 0;
}
.post-copyright-meta dt {
margin-bottom: 5px;
color: #58645f;
font-size: 0.8rem;
font-weight: 800;
}
.post-copyright-meta dd {
margin: 0;
color: #2f4a43;
font-size: 0.95rem;
font-weight: 600;
}
.post-copyright-meta time {
color: inherit;
font-size: inherit;
}
.post-copyright-footer {
display: flex;
align-items: center;
justify-content: space-between;
gap: 18px;
margin-top: 14px;
}
.post-copyright-tags,
.post-copyright-actions {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 10px;
}
.post-copyright-tags a,
.post-copyright-action,
.post-copyright-icon {
min-height: 38px;
border: 1px solid rgba(15, 118, 110, 0.2);
border-radius: 999px;
color: var(--accent);
background: rgba(236, 253, 245, 0.72);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.54);
transition:
color 0.2s ease,
background-color 0.2s ease,
transform 0.2s ease;
}
.post-copyright-tags a {
display: inline-flex;
align-items: center;
padding: 7px 13px;
font-size: 0.88rem;
}
.post-copyright-action {
appearance: none;
-webkit-appearance: none;
display: inline-flex;
align-items: center;
gap: 7px;
padding: 7px 15px;
font: inherit;
font-weight: 800;
cursor: pointer;
}
.post-copyright-action.is-primary {
color: #fff;
border-color: rgba(15, 118, 110, 0.3);
background: #3eb8be;
}
.post-copyright-action svg {
width: 17px;
height: 17px;
fill: none;
stroke: currentColor;
stroke-linecap: round;
stroke-linejoin: round;
stroke-width: 2.4;
}
.post-copyright-icon {
display: grid;
place-items: center;
width: 38px;
font-size: 0.94rem;
font-weight: 900;
line-height: 1;
}
.post-copyright-tags a:hover,
.post-copyright-action:hover,
.post-copyright-icon:hover {
color: #fff;
background: #3eb8be;
transform: translateY(-1px);
}
.archive-list {
margin-top: 24px;
display: grid;
@@ -785,6 +1062,64 @@ time {
padding: 10px 0;
}
.pagination {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
gap: 10px;
margin-top: 30px;
}
.pagination-pages {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 8px;
}
.pagination-link,
.pagination-number {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 40px;
min-height: 40px;
border: 1px solid rgba(222, 216, 204, 0.78);
border-radius: 8px;
padding: 8px 12px;
color: #50637a;
font-weight: 700;
line-height: 1;
background: rgba(255, 253, 248, 0.82);
box-shadow: 0 10px 28px rgba(58, 51, 38, 0.08);
transition:
color 0.2s ease,
border-color 0.2s ease,
background-color 0.2s ease,
transform 0.2s ease;
}
.pagination-link {
min-width: 76px;
}
.pagination-link:hover,
.pagination-number:hover,
.pagination-number.is-current {
color: #fff;
border-color: rgba(15, 118, 110, 0.34);
background: #3eb8be;
transform: translateY(-1px);
}
.pagination-link.is-disabled {
color: rgba(104, 111, 120, 0.5);
background: rgba(255, 253, 248, 0.46);
box-shadow: none;
cursor: not-allowed;
}
.term-grid {
margin-top: 24px;
display: grid;
@@ -804,13 +1139,159 @@ time {
}
.site-footer {
width: min(var(--wide-width), calc(100% - (var(--page-gutter) * 2)));
position: relative;
margin-top: 64px;
color: rgba(83, 91, 96, 0.72);
background:
linear-gradient(180deg, rgba(242, 248, 236, 0.56), rgba(246, 250, 239, 0.72)),
rgba(246, 250, 239, 0.72);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
backdrop-filter: blur(18px) saturate(150%);
-webkit-backdrop-filter: blur(18px) saturate(150%);
}
.footer-inner {
width: min(1180px, calc(100% - (var(--page-gutter) * 2)));
margin: 0 auto;
padding: 32px 0 44px;
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
gap: 34px 64px;
padding: 42px 0 38px;
}
.footer-top {
display: grid;
align-content: start;
gap: 10px;
}
.footer-brand {
display: inline-flex;
align-items: center;
gap: 10px;
width: fit-content;
color: #3f4143;
font-size: 1.22rem;
font-weight: 800;
line-height: 1;
}
.footer-brand img {
width: 34px;
height: 34px;
border-radius: 999px;
object-fit: cover;
box-shadow: 0 8px 22px rgba(15, 118, 110, 0.18);
}
.footer-slogan,
.footer-contact p,
.footer-bottom p {
margin: 0;
}
.footer-slogan {
font-size: 0.92rem;
}
.footer-contact {
display: grid;
justify-items: center;
align-content: start;
gap: 10px;
text-align: center;
}
.footer-contact p {
color: rgba(83, 91, 96, 0.64);
font-size: 0.94rem;
}
.footer-socials {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
}
.footer-socials a {
display: grid;
place-items: center;
width: 36px;
height: 36px;
border: 1px solid rgba(178, 194, 170, 0.48);
border-radius: 10px;
color: rgba(76, 84, 88, 0.78);
background:
linear-gradient(145deg, rgba(255, 255, 255, 0.48), rgba(218, 231, 203, 0.42)),
rgba(236, 244, 226, 0.72);
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.7),
0 10px 24px rgba(91, 107, 74, 0.1);
transition:
color 0.2s ease,
border-color 0.2s ease,
background-color 0.2s ease,
transform 0.2s ease;
}
.footer-socials a:hover {
color: var(--accent);
border-color: rgba(15, 118, 110, 0.28);
background-color: rgba(255, 255, 255, 0.84);
transform: translateY(-2px);
}
.footer-socials svg {
width: 18px;
height: 18px;
fill: none;
stroke: currentColor;
stroke-linecap: round;
stroke-linejoin: round;
stroke-width: 2;
}
.footer-socials a:last-child svg {
fill: currentColor;
stroke: none;
}
.footer-contact-links,
.footer-meta p:last-child {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
}
.footer-contact-links {
font-size: 0.92rem;
}
.footer-contact-links span,
.footer-meta span {
color: rgba(83, 91, 96, 0.35);
}
.footer-bottom {
grid-column: 1 / -1;
display: flex;
justify-content: space-between;
gap: 18px;
color: var(--muted);
gap: 24px;
border-top: 1px solid rgba(182, 197, 174, 0.34);
padding-top: 22px;
font-size: 0.92rem;
}
.footer-bottom > div {
display: grid;
gap: 8px;
}
.footer-meta {
justify-items: end;
text-align: right;
}
@media (min-width: 960px) {
@@ -895,4 +1376,40 @@ time {
.article {
margin-top: 32px;
}
.post-copyright-card {
padding: 22px 18px 18px;
}
.post-copyright-meta {
grid-template-columns: 1fr;
gap: 12px;
}
.post-copyright-footer {
align-items: flex-start;
flex-direction: column;
}
.footer-inner {
grid-template-columns: 1fr;
gap: 28px;
padding: 36px 0 34px;
text-align: center;
}
.footer-top {
justify-items: center;
}
.footer-bottom {
flex-direction: column;
align-items: center;
text-align: center;
}
.footer-meta {
justify-items: center;
text-align: center;
}
}