Files

1116 lines
22 KiB
CSS

/* =========================================
内容与页面样式 (Content & Pages) - 通用与首页
========================================= */
.site-main {
flex: 1 0 auto;
width: 100%;
padding-top: 0;
}
/* --- 404 Page --- */
.error-404 {
display: flex;
align-items: center;
justify-content: center;
text-align: center;
padding: 80px 0;
}
.error-404 .container {
display: flex;
justify-content: center;
width: 100%;
}
.error404 {
overflow-y: scroll;
}
.error-content {
max-width: 520px;
}
.error-title {
font-size: 4rem;
}
/* --- 首页内容区块容器 --- */
.content-section {
padding: 80px 0;
background-color: var(--bg-body);
}
.content-grid {
display: grid;
grid-template-columns: repeat(2, 1fr); /* 默认两列 (公告 + 博客) */
gap: 60px;
}
/* 首页栏目标题 */
.announcements-column h2,
.blog-column h2 {
font-size: 1.8rem; /* 增大栏目标题 (原1.5rem) */
margin-bottom: 1.5rem;
padding-bottom: 1rem;
border-bottom: 2px solid var(--border-default);
color: var(--text-primary);
display: flex;
align-items: center;
}
/* 终端风格前缀 */
.announcements-column h2::before,
.blog-column h2::before {
content: ">";
margin-right: 10px;
color: var(--color-primary);
font-weight: 800;
font-family: var(--font-mono);
}
/* --- 首页文章列表 (卡片式) --- */
.post-list {
display: flex;
flex-direction: column;
gap: 20px; /* 增大间距 (原16px) */
}
.post-item {
display: flex;
flex-direction: column;
padding: 24px; /* 增大内边距 (原20px) */
border: 1px solid var(--border-default);
border-radius: var(--radius-md);
background-color: var(--bg-card);
transition: all var(--duration-fast);
position: relative;
overflow: hidden;
}
.post-content-wrapper {
display: flex;
flex-direction: column;
height: 100%;
}
.post-item:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-sm);
border-color: var(--color-primary);
}
.post-title {
margin: 0 0 12px 0;
font-size: 1.35rem; /* 增大文章标题 (原1.15rem) */
font-weight: 600;
line-height: 1.4;
}
.post-title a {
color: var(--text-primary);
text-decoration: none;
}
.post-item:hover .post-title a {
color: var(--color-primary);
}
.post-meta {
display: flex;
align-items: center;
gap: 16px;
font-family: var(--font-mono);
font-size: 0.95rem; /* 增大元信息 (原0.85rem) */
color: var(--text-secondary);
margin-top: auto; /* Push meta to bottom */
padding-top: 16px;
border-top: 1px solid var(--border-muted);
}
.post-author {
color: var(--text-primary);
font-weight: 500;
}
.post-author::before {
content: "@";
color: var(--color-purple);
margin-right: 2px;
}
.post-excerpt {
font-size: 1.05rem; /* 增大摘要 (原0.95rem) */
color: var(--text-secondary);
line-height: 1.6;
opacity: 0.9;
margin-bottom: 16px;
/* 限制行数 */
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
/* --- 响应式适配 (首页) --- */
@media (max-width: 768px) {
.content-grid {
grid-template-columns: 1fr; /* 单列显示 */
gap: 40px;
}
}
/* =========================================
文章页(简洁大气)
========================================= */
.single-article-page {
padding: 46px 0 72px;
}
.single-article-shell {
max-width: 1320px;
}
.single-article {
width: 100%;
max-width: 1280px;
margin: 0 auto;
}
.single-article-header {
text-align: center;
}
.single-article-kicker {
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
gap: 24px;
margin-bottom: 24px;
}
.single-article-kicker-link {
color: var(--text-primary);
text-decoration: none;
font-size: 1.08rem;
font-weight: 600;
letter-spacing: 0.01em;
}
.single-article-kicker-link:hover {
color: var(--color-primary);
}
.single-article-title {
margin: 0;
font-size: clamp(2.3rem, 4.7vw, 5rem);
line-height: 1.1;
letter-spacing: -0.02em;
color: var(--text-primary);
text-wrap: balance;
}
.single-article-meta {
margin-top: 28px;
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
align-items: baseline;
column-gap: 16px;
color: var(--text-secondary);
font-family: var(--font-sans);
font-size: 0.94rem;
max-width: 980px;
margin-left: auto;
margin-right: auto;
}
.single-article-meta-item {
display: inline-flex;
align-items: baseline;
justify-content: center;
gap: 6px;
white-space: nowrap;
}
.single-article-meta-label {
color: var(--text-secondary);
font-weight: 500;
}
.single-article-meta-value {
color: var(--text-primary);
font-family: var(--font-mono);
font-weight: 600;
font-variant-numeric: tabular-nums;
}
.single-article-body {
width: 100%;
max-width: 1080px;
margin: 52px auto 0;
color: var(--text-primary);
font-size: clamp(1.14rem, 1.2vw, 1.28rem);
line-height: 1.82;
font-family: "Times New Roman", Times, "Nimbus Roman No9 L", "Noto Sans SC", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", var(--font-sans);
overflow-wrap: break-word;
word-wrap: break-word;
}
.single-article-body > * {
margin: 0 0 1.25em;
}
.single-article-body h2,
.single-article-body h3,
.single-article-body h4 {
margin-top: 1.7em;
line-height: 1.35;
font-family: inherit;
}
.single-article-body h2 {
font-size: clamp(1.45rem, 1.6vw, 2rem);
}
.single-article-body h3 {
font-size: clamp(1.2rem, 1.2vw, 1.55rem);
}
.single-article-body a {
color: var(--text-primary);
text-decoration-thickness: 1.5px;
text-decoration-color: color-mix(in srgb, var(--color-primary) 70%, transparent);
}
.single-article-body a:hover {
color: var(--color-primary);
}
.single-article-body blockquote {
margin: 1.5em 0;
padding: 0.2em 0 0.2em 1.1em;
border-left: 3px solid var(--border-default);
color: var(--text-secondary);
}
.single-article-body img {
max-width: 100%;
height: auto;
border-radius: var(--radius-sm);
}
.single-article-body pre {
padding: 16px;
border: 1px solid var(--border-default);
border-radius: var(--radius-sm);
background: color-mix(in srgb, var(--bg-surface) 92%, transparent);
overflow: auto;
line-height: 1.45;
font-size: 0.92rem;
}
.single-article-body code {
font-family: var(--font-mono);
font-size: 0.9em;
background: color-mix(in srgb, var(--bg-surface) 92%, transparent);
border-radius: 4px;
padding: 0.12em 0.35em;
}
.single-article-tags {
width: 100%;
max-width: 1080px;
margin: 30px auto 0;
padding-top: 16px;
border-top: 1px solid var(--border-default);
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.single-article-tag {
display: inline-flex;
align-items: center;
min-height: 24px;
padding: 0 10px;
border: 1px solid var(--border-default);
border-radius: 999px;
text-decoration: none;
color: var(--text-secondary);
font-size: 0.78rem;
background: color-mix(in srgb, var(--bg-card) 88%, transparent);
}
.single-article-tag:hover {
color: var(--color-primary);
border-color: var(--color-primary);
}
.single-related {
max-width: 1180px;
margin: 62px auto 0;
}
.single-divider {
border-top: 1px solid var(--border-default);
}
.single-related-title {
margin: 44px 0 24px;
color: var(--text-primary);
font-size: clamp(1.8rem, 2vw, 2.5rem);
letter-spacing: -0.01em;
}
.single-related-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 24px;
}
.single-related-card {
min-width: 0;
}
.single-related-card-title {
margin: 0;
font-size: clamp(1.2rem, 1.2vw, 1.75rem);
line-height: 1.3;
}
.single-related-card-title a {
color: var(--text-primary);
text-decoration: none;
}
.single-related-card-title a:hover {
color: var(--color-primary);
}
.single-related-card-excerpt {
margin: 12px 0 0;
color: var(--text-secondary);
line-height: 1.66;
font-size: 1rem;
font-family: "Times New Roman", Times, "Nimbus Roman No9 L", "Noto Sans SC", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", var(--font-sans);
}
.single-related-card-link {
margin-top: 16px;
display: inline-block;
color: var(--text-secondary);
text-decoration: none;
font-size: 1.02rem;
}
.single-related-card-link:hover {
color: var(--color-primary);
}
.single-related-empty {
color: var(--text-secondary);
}
@media (max-width: 980px) {
.single-article-page {
padding: 34px 0 56px;
}
.single-article-body {
margin-top: 42px;
font-size: 1.1rem;
line-height: 1.75;
}
.single-related-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (max-width: 760px) {
.single-article-kicker {
gap: 14px;
margin-bottom: 16px;
}
.single-article-meta {
display: flex;
justify-content: center;
flex-wrap: wrap;
gap: 8px 14px;
margin-top: 18px;
font-size: 0.8rem;
}
.single-article-body {
margin-top: 30px;
font-size: 1.02rem;
line-height: 1.72;
}
.single-related {
margin-top: 44px;
}
.single-related-title {
margin-top: 34px;
margin-bottom: 18px;
}
.single-related-grid {
grid-template-columns: 1fr;
gap: 20px;
}
}
/* =========================================
GitHub 风格博客
========================================= */
.single-post-gh-pro {
padding-bottom: 4rem;
}
/* --- Pro Header (Clean Geek Style) --- */
.gh-pro-header {
padding-bottom: 24px;
margin-bottom: 24px;
text-align: center; /* Center alignment looks more like a blog title */
}
.gh-pro-meta-top {
margin-bottom: 16px;
}
.gh-label-category {
display: inline-block;
font-size: 14px; /* 增大标签 (原13px) */
font-weight: 600;
color: var(--color-primary);
text-transform: uppercase;
letter-spacing: 0.5px;
}
.gh-pro-header .entry-title {
font-size: 3rem; /* 增大文章主标题 (原2.5rem) */
font-weight: 700;
margin-bottom: 16px;
line-height: 1.25;
}
.gh-pro-meta-bar {
display: flex;
justify-content: center;
align-items: center;
gap: 24px;
font-size: 16px; /* 增大元信息栏 (原14px) */
color: var(--text-secondary);
font-family: var(--font-mono);
}
.gh-author-lockup {
display: flex;
align-items: center;
gap: 8px;
}
.gh-author-lockup img {
width: 24px;
height: 24px;
border-radius: 50%;
border: 1px solid var(--border-muted);
}
.gh-author-lockup .author-name {
font-weight: 600;
color: var(--text-primary);
}
.meta-divider {
color: var(--border-default);
}
/* --- File Box Body (The Article) --- */
.gh-pro-body-container {
max-width: 900px; /* Slightly wider read area */
margin: 0 auto 48px;
}
.gh-file-box {
border: 1px solid var(--border-default);
border-radius: 6px;
background-color: var(--bg-card);
overflow: hidden;
}
.gh-file-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 16px;
background-color: var(--bg-surface);
border-bottom: 1px solid var(--border-default);
font-family: var(--font-mono);
font-size: 13px;
color: var(--text-secondary);
}
.gh-file-header .file-info {
display: flex;
align-items: center;
gap: 8px;
}
.gh-file-header .octicon {
fill: currentColor;
}
.gh-file-header strong {
color: var(--text-primary);
font-weight: 600;
}
.gh-file-content {
padding: 32px 40px;
background-color: var(--bg-card);
}
/* Entry Content Typography (Markdown Style) */
.gh-file-content {
font-size: 18px; /* 增大正文基础字号 (原16px) */
line-height: 1.8; /* 优化行高 */
color: var(--text-primary);
overflow-wrap: break-word; /* 自动换行 */
word-wrap: break-word;
}
.gh-file-content p { margin-bottom: 1.5em; }
.gh-file-content h2 { border-bottom: 1px solid var(--border-muted); padding-bottom: 0.3em; margin-top: 1.5em; margin-bottom: 1em; }
.gh-file-content code { background-color: rgba(175, 184, 193, 0.2); padding: 0.2em 0.4em; border-radius: 6px; font-size: 85%; font-family: var(--font-mono); }
.gh-file-content pre { padding: 16px; overflow: auto; line-height: 1.45; background-color: var(--bg-surface); border-radius: 6px; }
.gh-file-footer {
margin-top: 32px;
padding-top: 16px;
border-top: 1px solid var(--border-muted);
}
/* Buttons */
.btn-sm {
font-size: 12px;
padding: 3px 8px;
border: 1px solid var(--border-default);
border-radius: 6px;
color: var(--text-secondary);
background-color: var(--bg-body);
font-weight: 500;
}
.btn-sm:hover {
background-color: var(--bg-surface);
color: var(--color-primary);
text-decoration: none;
}
/* Responsive adjustments */
@media (max-width: 768px) {
.gh-file-content { padding: 20px; }
.gh-pro-header .entry-title { font-size: 1.75rem; }
}
/* News & Announcements Archive */
.news-archive-page {
padding: 36px 0 60px;
}
.news-archive-head {
margin-bottom: 0;
}
.news-archive-title {
margin: 0;
font-size: clamp(2.05rem, 1.2vw + 1.6rem, 2.9rem);
line-height: 1.2;
color: var(--color-primary);
}
.news-archive-tools {
margin-top: 14px;
display: block;
}
.news-archive-search {
display: grid;
grid-template-columns: minmax(280px, 560px) auto;
gap: 8px;
align-items: end;
justify-content: end;
}
.news-archive-search-controls {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(116px, 170px);
gap: 8px;
}
.news-archive-search input[type="search"] {
appearance: none;
-webkit-appearance: none;
width: 100%;
height: 36px;
border: 1px solid var(--border-default);
border-radius: var(--radius-sm);
background: color-mix(in srgb, var(--bg-card) 90%, transparent);
color: var(--text-primary);
padding: 0 11px;
font-size: 0.88rem;
}
.news-archive-search input[type="search"]::-webkit-search-decoration,
.news-archive-search input[type="search"]::-webkit-search-cancel-button,
.news-archive-search input[type="search"]::-webkit-search-results-button,
.news-archive-search input[type="search"]::-webkit-search-results-decoration {
-webkit-appearance: none;
appearance: none;
}
.news-archive-search input[type="search"]:focus {
outline: none;
border-color: var(--color-primary);
}
.news-archive-search select {
width: 100%;
height: 36px;
border: 1px solid var(--border-default);
border-radius: var(--radius-sm);
background: transparent;
color: var(--text-primary);
padding: 0 11px;
font-size: 0.85rem;
}
.news-archive-search select:focus {
outline: none;
border-color: var(--color-primary);
}
.news-archive-search button {
height: 36px;
padding: 0 12px;
border: 1px solid var(--border-default);
border-radius: var(--radius-sm);
background: transparent;
color: var(--text-primary);
font-size: 0.86rem;
font-weight: 600;
cursor: pointer;
}
.news-archive-search button:hover {
border-color: var(--color-primary);
color: var(--color-primary);
}
html:not([data-theme="dark"]) .news-archive-search select {
color-scheme: light;
}
html:not([data-theme="dark"]) .news-archive-search input[type="search"] {
color-scheme: light;
}
[data-theme="dark"] .news-archive-search input[type="search"] {
background: color-mix(in srgb, var(--bg-card) 92%, #000 8%) !important;
color: var(--text-primary) !important;
-webkit-text-fill-color: var(--text-primary) !important;
color-scheme: dark;
}
[data-theme="dark"] .news-archive-search input[type="search"]:-webkit-autofill,
[data-theme="dark"] .news-archive-search input[type="search"]:-webkit-autofill:hover,
[data-theme="dark"] .news-archive-search input[type="search"]:-webkit-autofill:focus,
[data-theme="dark"] .news-archive-search input[type="search"]:autofill {
-webkit-text-fill-color: var(--text-primary) !important;
-webkit-box-shadow: 0 0 0 1000px color-mix(in srgb, var(--bg-card) 92%, #000 8%) inset !important;
box-shadow: 0 0 0 1000px color-mix(in srgb, var(--bg-card) 92%, #000 8%) inset !important;
background: color-mix(in srgb, var(--bg-card) 92%, #000 8%) !important;
border-color: var(--border-default) !important;
caret-color: var(--text-primary) !important;
transition: background-color 9999s ease-out 0s !important;
}
[data-theme="dark"] .news-archive-search select {
background: color-mix(in srgb, var(--bg-card) 92%, #000 8%);
color: var(--text-primary);
color-scheme: dark;
}
[data-theme="dark"] .news-archive-search select option,
[data-theme="dark"] .news-archive-search select optgroup {
background-color: #0f1724;
color: var(--text-primary);
}
.news-archive-layout {
margin-top: 22px;
display: grid;
grid-template-columns: minmax(0, 1fr) 320px;
gap: 28px;
align-items: start;
}
.news-main-column {
min-width: 0;
}
.news-stream {
display: flex;
flex-direction: column;
}
.news-story {
display: grid;
grid-template-columns: minmax(0, 1fr) 232px;
align-items: start;
gap: 16px;
padding: 16px 0;
border-bottom: 1px solid var(--border-default);
}
.news-story-cover {
display: flex;
align-items: center;
justify-content: center;
height: 144px;
border: 1px solid var(--border-default);
border-radius: var(--radius-sm);
overflow: hidden;
background: color-mix(in srgb, var(--bg-surface) 88%, transparent);
}
.news-story-cover img {
width: 100%;
height: 100%;
object-fit: cover;
}
.news-story-cover img.news-story-cover-fallback {
width: 33.333%;
height: auto;
max-height: 33.333%;
object-fit: contain;
}
.news-story-body {
min-width: 0;
}
.news-story-title {
margin: 0;
font-size: clamp(1.32rem, 0.2vw + 1.24rem, 1.62rem);
line-height: 1.35;
}
.news-story-title a {
color: var(--text-primary);
text-decoration: none;
}
.news-story-title a:hover {
color: var(--color-primary);
}
.news-story-meta {
margin-top: 8px;
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 6px;
color: var(--text-secondary);
font-size: 0.8rem;
font-family: var(--font-mono);
}
.news-story-meta-item {
display: inline-flex;
align-items: center;
gap: 4px;
}
.news-story-meta-item strong {
color: var(--text-primary);
}
.news-story-meta-dot {
color: var(--border-default);
}
.news-story-excerpt {
margin: 10px 0 0;
color: var(--text-secondary);
line-height: 1.66;
font-size: 0.95rem;
}
.news-story-tags {
margin-top: 10px;
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 6px;
}
.news-story-tag-label {
font-size: 0.78rem;
color: var(--text-secondary);
font-family: var(--font-mono);
}
.news-story-tag,
.news-story-tag-empty {
display: inline-flex;
align-items: center;
min-height: 22px;
padding: 0 8px;
border: 1px solid var(--border-default);
border-radius: 999px;
font-size: 0.75rem;
color: var(--text-secondary);
background: color-mix(in srgb, var(--bg-card) 88%, transparent);
}
.news-story-tag {
text-decoration: none;
}
.news-story-tag:hover {
color: var(--color-primary);
border-color: var(--color-primary);
}
.news-side-column {
min-width: 0;
}
.news-side-block {
margin-top: 16px;
border: 1px solid var(--border-default);
border-radius: var(--radius-md);
padding: 14px;
background: color-mix(in srgb, var(--bg-card) 84%, transparent);
}
.news-side-title {
margin: 0;
font-size: 1.06rem;
color: var(--text-primary);
line-height: 1.3;
}
.news-side-list {
list-style: none;
margin: 12px 0 0;
padding: 0;
display: grid;
gap: 12px;
}
.news-side-item {
display: grid;
grid-template-columns: 88px minmax(0, 1fr);
gap: 10px;
padding-bottom: 12px;
border-bottom: 1px solid var(--border-default);
}
.news-side-item:last-child {
padding-bottom: 0;
border-bottom: 0;
}
.news-side-cover {
width: 88px;
height: 64px;
border: 1px solid var(--border-default);
border-radius: var(--radius-sm);
overflow: hidden;
background: var(--bg-surface);
display: flex;
align-items: center;
justify-content: center;
}
.news-side-cover img {
width: 100%;
height: 100%;
object-fit: cover;
}
.news-side-cover img.news-side-cover-fallback {
width: 33.333%;
height: auto;
max-height: 33.333%;
object-fit: contain;
}
.news-side-body {
min-width: 0;
}
.news-side-item-title {
margin: 0;
font-size: 0.9rem;
line-height: 1.4;
}
.news-side-item-title a {
color: var(--text-primary);
text-decoration: none;
}
.news-side-item-title a:hover {
color: var(--color-primary);
}
.news-side-meta {
margin-top: 6px;
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 5px;
color: var(--text-secondary);
font-size: 0.73rem;
font-family: var(--font-mono);
}
.news-side-meta-dot {
color: var(--border-default);
}
.news-side-empty {
color: var(--text-secondary);
font-size: 0.86rem;
}
.news-archive-pagination {
margin-top: 18px;
display: flex;
justify-content: center;
}
.news-archive-pagination .page-numbers {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 34px;
min-height: 34px;
padding: 0 10px;
margin: 0 4px;
border: 1px solid var(--border-default);
border-radius: var(--radius-sm);
background: var(--bg-card);
color: var(--text-secondary);
font-size: 0.88rem;
}
.news-archive-pagination .page-numbers.current {
color: var(--color-primary);
border-color: var(--color-primary);
}
.news-archive-empty {
margin: 14px 0 0;
color: var(--text-secondary);
}
@media (max-width: 1180px) {
.news-archive-layout {
grid-template-columns: minmax(0, 1fr) 292px;
gap: 22px;
}
.news-story {
grid-template-columns: minmax(0, 1fr) 204px;
}
.news-story-cover {
height: 132px;
}
}
@media (max-width: 980px) {
.news-archive-layout {
grid-template-columns: 1fr;
}
.news-side-block {
margin-top: 0;
}
.news-side-column {
order: -1;
}
.news-main-column {
order: 1;
}
}
@media (max-width: 760px) {
.news-archive-page {
padding: 28px 0 50px;
}
.news-archive-tools {
margin-top: 14px;
}
.news-archive-search {
grid-template-columns: minmax(0, 1fr) auto;
align-items: stretch;
}
.news-archive-search-controls {
grid-template-columns: minmax(0, 1fr) minmax(106px, 132px);
}
.news-archive-search button {
min-width: 62px;
padding: 0 10px;
}
.news-story {
grid-template-columns: 1fr;
gap: 12px;
}
.news-story-cover {
order: -1;
height: 168px;
}
.news-story-body {
order: 1;
}
.news-story-title {
font-size: 1.08rem;
}
.news-side-item {
grid-template-columns: 82px minmax(0, 1fr);
}
.news-side-cover {
width: 82px;
height: 58px;
}
}
@media (max-width: 560px) {
.news-story-cover {
height: 168px;
}
}