MediaWiki:Common.css:修订间差异
MediaWiki界面页面
更多操作
无编辑摘要 |
无编辑摘要 |
||
| 第577行: | 第577行: | ||
gap: 4px; | gap: 4px; | ||
} | } | ||
} | |||
/* 确保主容器为弹性布局,且不会换行错乱 */ | |||
.home-main { | |||
display: flex; | |||
flex-wrap: wrap; /* 允许换行,但需要配合 flex-basis */ | |||
gap: 30px; | |||
margin-bottom: 30px; | |||
} | |||
.home-left { | |||
flex: 2 1 60%; /* 最小宽度 60%,保证不会压得太小 */ | |||
min-width: 280px; | |||
} | |||
.home-right { | |||
flex: 1 1 30%; | |||
min-width: 240px; | |||
} | |||
/* 新闻条目强制保持独立 */ | |||
.home-news .news-item { | |||
display: flex; | |||
justify-content: space-between; | |||
align-items: center; | |||
padding: 12px 20px; | |||
border-bottom: 1px solid #f1f5f9; | |||
background: #ffffff; /* 确保不透明 */ | |||
} | |||
/* 日期强制右对齐且不折行 */ | |||
.home-news .date { | |||
font-size: 12px; | |||
color: #94a3b8; | |||
white-space: nowrap; | |||
flex-shrink: 0; | |||
margin-left: 12px; | |||
} | |||
/* 侧边栏统计行增加底边框,不会与新闻混 */ | |||
.home-sidebar .stat-row { | |||
display: flex; | |||
justify-content: space-between; | |||
padding: 6px 0; | |||
border-bottom: 1px solid #f1f5f9; | |||
} | |||
.home-sidebar .stat-row:last-child { | |||
border-bottom: none; | |||
} | |||
/* 修复移动端时,两栏堆叠,但各自保持独立块 */ | |||
@media (max-width: 768px) { | |||
.home-main { | |||
flex-direction: column; | |||
} | |||
.home-left, .home-right { | |||
flex: 1 1 100%; | |||
min-width: 0; | |||
} | |||
/* 确保新闻与统计块不会互相影响 */ | |||
.home-news, .home-sidebar .sidebar-widget { | |||
width: 100%; | |||
box-sizing: border-box; | |||
} | |||
} | |||
.home-card .card-count { | |||
font-size: 11px; | |||
font-weight: 600; | |||
color: #1e293b; | |||
background: #f1f5f9; | |||
padding: 2px 14px; | |||
border-radius: 20px; | |||
display: inline-block; | |||
margin-top: 4px; | |||
} | } | ||
2026年7月15日 (三) 03:24的版本
/* ============================================================ */
/* JZY Wiki 完整样式 */
/* ============================================================ */
/* ---------- 1. 全局重置 ---------- */
body {
background: #f0f4f8;
font-family: 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
}
/* ---------- 2. 欢迎横幅 ---------- */
.home-welcome {
background: linear-gradient(135deg, #0a1628 0%, #1a2a4a 50%, #2a1a3e 100%);
border-radius: 16px;
padding: 40px 48px;
margin-bottom: 30px;
box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.welcome-content {
display: flex;
align-items: center;
justify-content: space-between;
gap: 30px;
}
.welcome-text {
flex: 1;
color: #ffffff;
}
.welcome-text h1 {
font-size: 38px;
font-weight: 700;
margin: 0 0 4px 0;
}
.welcome-text h1 .highlight {
color: #facc15;
}
.welcome-text .subtitle {
font-size: 20px;
opacity: 0.9;
margin: 0 0 6px 0;
}
.welcome-text .description {
font-size: 15px;
opacity: 0.75;
margin: 0 0 16px 0;
}
.welcome-text .stats {
display: flex;
gap: 24px;
font-size: 14px;
opacity: 0.7;
margin-bottom: 16px;
}
.welcome-actions {
display: flex;
gap: 12px;
}
.welcome-actions .btn-primary,
.welcome-actions .btn-secondary {
display: inline-block;
padding: 8px 24px;
border-radius: 30px;
font-weight: 600;
font-size: 14px;
text-decoration: none;
transition: all 0.2s;
}
.welcome-actions .btn-primary {
background: #facc15;
color: #0a1628;
}
.welcome-actions .btn-primary:hover {
background: #fbbf24;
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(250, 204, 21, 0.3);
}
.welcome-actions .btn-secondary {
background: rgba(255,255,255,0.15);
color: #ffffff;
border: 1px solid rgba(255,255,255,0.2);
}
.welcome-actions .btn-secondary:hover {
background: rgba(255,255,255,0.25);
transform: translateY(-2px);
}
.welcome-logo {
flex-shrink: 0;
text-align: center;
opacity: 0.3;
}
/* ---------- 3. 分类导航卡片 ---------- */
.home-card-grid {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 16px;
margin-bottom: 30px;
}
.home-card {
background: #ffffff;
border-radius: 12px;
padding: 20px 16px;
box-shadow: 0 2px 8px rgba(0,0,0,0.06);
border: 1px solid #e9edf2;
text-align: center;
transition: all 0.25s ease;
text-decoration: none;
color: #1e293b;
display: block;
cursor: pointer;
}
.home-card:hover {
transform: translateY(-6px);
box-shadow: 0 12px 30px rgba(0,0,0,0.10);
border-color: #facc15;
text-decoration: none;
}
.home-card .icon {
font-size: 32px;
display: block;
margin-bottom: 8px;
}
.home-card h4 {
font-size: 15px;
margin: 0 0 4px 0;
font-weight: 700;
}
.home-card p {
font-size: 12px;
color: #64748b;
margin: 0 0 6px 0;
}
.home-card .card-count {
font-size: 11px;
color: #94a3b8;
background: #f1f5f9;
padding: 2px 12px;
border-radius: 20px;
display: inline-block;
}
/* ---------- 4. 特色入口网格 ---------- */
.featured-grid {
display: grid;
grid-template-columns: 1fr 1fr 1.5fr;
gap: 16px;
margin-bottom: 30px;
}
.featured-section {
background: #ffffff;
border-radius: 12px;
border: 1px solid #e9edf2;
padding: 16px 20px;
}
.featured-title {
font-weight: 700;
font-size: 15px;
color: #0b1a2e;
border-bottom: 2px solid #facc15;
padding-bottom: 6px;
margin-bottom: 10px;
}
.featured-list {
list-style: none;
padding: 0;
margin: 0;
}
.featured-list li {
padding: 5px 0;
font-size: 14px;
border-bottom: 1px solid #f1f5f9;
}
.featured-list li:last-child {
border-bottom: none;
}
.featured-list li a {
color: #1e293b;
text-decoration: none;
}
.featured-list li a:hover {
color: #0b1a2e;
text-decoration: underline;
}
.two-col-list {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0 12px;
}
.two-col-list li {
border-bottom: none;
padding: 4px 0;
}
/* ---------- 5. 主内容两栏布局 ---------- */
.home-main {
display: flex;
gap: 30px;
margin-bottom: 30px;
}
.home-left {
flex: 2;
min-width: 0;
}
.home-right {
flex: 1;
min-width: 0;
}
/* ---------- 6. 新闻与更新 ---------- */
.home-news {
background: #ffffff;
border-radius: 12px;
border: 1px solid #e9edf2;
overflow: hidden;
}
.home-news .section-header {
background: #f8fafc;
padding: 14px 20px;
border-bottom: 1px solid #e9edf2;
display: flex;
justify-content: space-between;
align-items: center;
}
.home-news .section-title {
font-weight: 700;
font-size: 16px;
color: #0b1a2e;
}
.home-news .more-link {
font-size: 13px;
color: #64748b;
}
.home-news .news-item {
padding: 12px 20px;
border-bottom: 1px solid #f1f5f9;
display: flex;
justify-content: space-between;
align-items: center;
transition: background 0.15s;
}
.home-news .news-item:hover {
background: #fafcff;
}
.home-news .news-item:last-child {
border-bottom: none;
}
.home-news .news-content {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 6px;
}
.home-news .news-text {
font-size: 14px;
}
.home-news .date {
font-size: 12px;
color: #94a3b8;
white-space: nowrap;
}
.home-news .tag {
font-size: 10px;
font-weight: 700;
padding: 2px 10px;
border-radius: 20px;
text-transform: uppercase;
letter-spacing: 0.3px;
}
.tag-update { background: #dbeafe; color: #1d4ed8; }
.tag-event { background: #fce7f3; color: #be185d; }
.tag-guide { background: #d1fae5; color: #065f46; }
.tag-major { background: #fef3c7; color: #b45309; }
.tag-hot { background: #fee2e2; color: #dc2626; }
/* ---------- 7. 特色文章 ---------- */
.featured-article {
margin-top: 20px;
background: #ffffff;
border-radius: 12px;
border: 1px solid #e9edf2;
padding: 20px 24px;
position: relative;
}
.featured-article-badge {
position: absolute;
top: -10px;
right: 20px;
background: #facc15;
color: #0a1628;
font-size: 11px;
font-weight: 700;
padding: 2px 16px;
border-radius: 20px;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.featured-article h3 {
margin: 0 0 8px 0;
font-size: 20px;
}
.featured-article h3 a {
color: #0b1a2e;
text-decoration: none;
}
.featured-article h3 a:hover {
text-decoration: underline;
}
.featured-article p {
font-size: 14px;
color: #475569;
margin: 0 0 12px 0;
line-height: 1.7;
}
.featured-article .article-meta {
display: flex;
gap: 20px;
font-size: 13px;
color: #94a3b8;
flex-wrap: wrap;
}
.featured-article .article-meta .read-more {
font-weight: 600;
color: #0b1a2e;
}
.featured-article .article-meta .read-more a {
color: #0b1a2e;
text-decoration: none;
}
.featured-article .article-meta .read-more a:hover {
text-decoration: underline;
}
/* ---------- 8. 参与贡献 ---------- */
.contribute-box {
margin-top: 20px;
background: linear-gradient(135deg, #f8fafc 0%, #eef2f6 100%);
border-radius: 12px;
border: 1px solid #e9edf2;
padding: 20px 24px;
display: flex;
align-items: center;
gap: 20px;
}
.contribute-icon {
font-size: 40px;
flex-shrink: 0;
}
.contribute-content {
flex: 1;
}
.contribute-content h3 {
margin: 0 0 4px 0;
font-size: 17px;
color: #0b1a2e;
}
.contribute-content p {
margin: 0 0 10px 0;
font-size: 14px;
color: #475569;
}
.contribute-links {
list-style: none;
padding: 0;
margin: 0;
display: flex;
flex-wrap: wrap;
gap: 8px 20px;
}
.contribute-links li {
font-size: 14px;
}
.contribute-links li a {
color: #1e293b;
text-decoration: none;
}
.contribute-links li a:hover {
text-decoration: underline;
}
/* ---------- 9. 侧边栏 ---------- */
.home-sidebar .sidebar-widget {
background: #ffffff;
border-radius: 12px;
border: 1px solid #e9edf2;
margin-bottom: 20px;
overflow: hidden;
}
.home-sidebar .sidebar-header {
background: #f8fafc;
padding: 12px 20px;
border-bottom: 1px solid #e9edf2;
font-weight: 700;
font-size: 15px;
color: #0b1a2e;
}
.home-sidebar .sidebar-body {
padding: 14px 20px;
}
.home-sidebar .sidebar-body ul {
list-style: none;
padding: 0;
margin: 0;
}
.home-sidebar .sidebar-body ul li {
padding: 6px 0;
border-bottom: 1px solid #f1f5f9;
font-size: 14px;
}
.home-sidebar .sidebar-body ul li:last-child {
border-bottom: none;
}
.home-sidebar .sidebar-body ul li a {
color: #1e293b;
text-decoration: none;
}
.home-sidebar .sidebar-body ul li a:hover {
color: #0b1a2e;
text-decoration: underline;
}
.home-sidebar .stat-row {
display: flex;
justify-content: space-between;
padding: 5px 0;
font-size: 14px;
border-bottom: 1px solid #f1f5f9;
}
.home-sidebar .stat-row:last-child {
border-bottom: none;
}
.home-sidebar .stat-label {
color: #64748b;
}
.home-sidebar .stat-value {
font-weight: 600;
}
.server-notice {
margin-top: 12px;
background: #f1f5f9;
border-radius: 8px;
padding: 12px;
font-size: 13px;
text-align: center;
line-height: 1.6;
}
.server-notice a {
color: #0b1a2e;
font-weight: 600;
}
.server-notice a:hover {
text-decoration: underline;
}
/* ---------- 10. 页尾 ---------- */
.home-footer {
margin-top: 20px;
padding: 20px 0;
text-align: center;
border-top: 1px solid #e2e8f0;
}
.home-footer .footer-links {
display: flex;
justify-content: center;
gap: 24px;
flex-wrap: wrap;
margin-bottom: 10px;
}
.home-footer .footer-links a {
color: #64748b;
font-size: 13px;
text-decoration: none;
}
.home-footer .footer-links a:hover {
color: #0b1a2e;
text-decoration: underline;
}
.home-footer .footer-copy {
font-size: 12px;
color: #94a3b8;
}
.home-footer .footer-copy a {
color: #64748b;
text-decoration: none;
}
.home-footer .footer-copy a:hover {
text-decoration: underline;
}
/* ---------- 11. 响应式适配 ---------- */
@media (max-width: 1200px) {
.home-card-grid {
grid-template-columns: repeat(3, 1fr);
}
.featured-grid {
grid-template-columns: 1fr 1fr;
}
}
@media (max-width: 992px) {
.welcome-content {
flex-direction: column;
text-align: center;
}
.welcome-text .stats {
justify-content: center;
}
.welcome-actions {
justify-content: center;
}
.home-main {
flex-direction: column;
}
.home-card-grid {
grid-template-columns: repeat(3, 1fr);
}
.featured-grid {
grid-template-columns: 1fr;
}
}
@media (max-width: 768px) {
.home-welcome {
padding: 24px 20px;
}
.welcome-text h1 {
font-size: 28px;
}
.home-card-grid {
grid-template-columns: repeat(2, 1fr);
}
.two-col-list {
grid-template-columns: 1fr;
}
.contribute-box {
flex-direction: column;
text-align: center;
}
.contribute-links {
justify-content: center;
}
.home-news .news-item {
flex-wrap: wrap;
}
.home-news .date {
width: 100%;
text-align: right;
padding-top: 4px;
}
.featured-article-badge {
position: static;
display: inline-block;
margin-bottom: 8px;
}
}
@media (max-width: 480px) {
.home-card-grid {
grid-template-columns: 1fr 1fr;
gap: 10px;
}
.home-card {
padding: 14px 10px;
}
.home-card .icon {
font-size: 24px;
}
.home-card h4 {
font-size: 13px;
}
.welcome-text .stats {
flex-direction: column;
gap: 4px;
align-items: center;
}
.welcome-actions {
flex-direction: column;
align-items: center;
}
.featured-article .article-meta {
flex-direction: column;
gap: 4px;
}
}
/* 确保主容器为弹性布局,且不会换行错乱 */
.home-main {
display: flex;
flex-wrap: wrap; /* 允许换行,但需要配合 flex-basis */
gap: 30px;
margin-bottom: 30px;
}
.home-left {
flex: 2 1 60%; /* 最小宽度 60%,保证不会压得太小 */
min-width: 280px;
}
.home-right {
flex: 1 1 30%;
min-width: 240px;
}
/* 新闻条目强制保持独立 */
.home-news .news-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 20px;
border-bottom: 1px solid #f1f5f9;
background: #ffffff; /* 确保不透明 */
}
/* 日期强制右对齐且不折行 */
.home-news .date {
font-size: 12px;
color: #94a3b8;
white-space: nowrap;
flex-shrink: 0;
margin-left: 12px;
}
/* 侧边栏统计行增加底边框,不会与新闻混 */
.home-sidebar .stat-row {
display: flex;
justify-content: space-between;
padding: 6px 0;
border-bottom: 1px solid #f1f5f9;
}
.home-sidebar .stat-row:last-child {
border-bottom: none;
}
/* 修复移动端时,两栏堆叠,但各自保持独立块 */
@media (max-width: 768px) {
.home-main {
flex-direction: column;
}
.home-left, .home-right {
flex: 1 1 100%;
min-width: 0;
}
/* 确保新闻与统计块不会互相影响 */
.home-news, .home-sidebar .sidebar-widget {
width: 100%;
box-sizing: border-box;
}
}
.home-card .card-count {
font-size: 11px;
font-weight: 600;
color: #1e293b;
background: #f1f5f9;
padding: 2px 14px;
border-radius: 20px;
display: inline-block;
margin-top: 4px;
}