打开/关闭菜单
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

MediaWiki:Common.css

MediaWiki界面页面
Jzyfate留言 | 贡献2026年7月15日 (三) 03:35的版本

注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的更改的影响。

  • Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5Ctrl-R(Mac为⌘-R
  • Google Chrome:Ctrl-Shift-R(Mac为⌘-Shift-R
  • Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5
/* ============================================================ */
/*                     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;
    flex-wrap: wrap;
}
.welcome-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.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;
    font-weight: 600;
    color: #1e293b;
    background: #f1f5f9;
    padding: 2px 14px;
    border-radius: 20px;
    display: inline-block;
    margin-top: 4px;
}

/* ---------- 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;
}

/* ============================================================ */
/* 关键修复:主内容两栏布局 — 强制左右分离 */
/* ============================================================ */
.home-main {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

/* 左栏:占据约 2/3 宽度 */
.home-left {
    flex: 0 0 calc(66.666% - 15px);
    min-width: 280px;
    max-width: 100%;
    box-sizing: border-box;
}

/* 右栏:占据约 1/3 宽度 */
.home-right {
    flex: 0 0 calc(33.333% - 15px);
    min-width: 240px;
    max-width: 100%;
    box-sizing: border-box;
}

/* ---------- 6. 新闻与更新 ---------- */
.home-news {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e9edf2;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}
.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 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
    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;
    flex: 1;
}
.home-news .news-text {
    font-size: 14px;
}
.home-news .date {
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 12px;
}
.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;
    width: 100%;
    box-sizing: border-box;
}
.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;
    width: 100%;
    box-sizing: border-box;
}
.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;
    width: 100%;
    box-sizing: border-box;
}
.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: 6px 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-left {
        flex: 0 0 100%;
        min-width: 0;
    }
    .home-right {
        flex: 0 0 100%;
        min-width: 0;
    }
    .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;
        margin-left: 0;
    }
    .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;
    }
}