MediaWiki:Common.css

Riguz留言 | 贡献2026年7月25日 (六) 12:41的版本
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

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

  • Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5Ctrl-R(Mac为⌘-R
  • Google Chrome:Ctrl-Shift-R(Mac为⌘-Shift-R
  • Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5
/* MediaWiki:Common.css */

html, body {
    font-family: "Times New Roman", "SimSun", "STSong", 
                 "Source Han Serif CN", "Noto Serif CJK SC", serif;
    font-size: 17px;
    line-height: 1.75;
}

/* 标题用稍粗的衬线,更有分量感 */
h1, h2, h3, h4, h5, h6 {
    font-family: "Cambria", "Georgia", "Times New Roman", 
                 "Source Han Serif CN", "Noto Serif CJK SC", 
                 "SimSun", serif;
    font-weight: 600;
    line-height: 1.3;
}

/* 代码块保持等宽,形成衬线/等宽的古典技术文档对比 */
code, pre, .mw-code, .mw-highlight pre {
    font-family: "JetBrains Mono", "Fira Code", "Consolas", 
                 "Monaco", "Menlo", "Liberation Mono", monospace;
    font-size: 0.9em;
}

/* 侧边栏、导航等 UI 元素用无衬线,区分内容区 */
#mw-panel, #p-personal, #left-navigation, #right-navigation,
.vector-menu, .mw-ui-button, .mw-ui-input {
    font-family: "Inter", "Segoe UI", "Noto Sans SC", 
                 "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 14px;
}

/* 引用块:更复古的视觉 */
blockquote {
    font-family: "Georgia", "Cambria", "Source Han Serif CN", serif;
    font-style: italic;
    border-left: 3px solid #8b7355;  /* 铜褐色,有年代感 */
    background: #faf8f3;
    padding: 0.5em 1em;
    margin: 1em 0;
}

/* 数学公式周围的文字字号微调,让公式和正文更协调 */
.mwe-math-element {
    font-size: 1.05em;
}


/* -------- for main page -- */

/* ============================================
   首页样式 - Main Page
   ============================================ */

/* 首页容器 */
.main-page-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Hero 区 */
.hero-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 2.5rem 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
}
.hero-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}
.hero-subtitle {
    font-size: 1rem;
    opacity: 0.85;
    margin-bottom: 1.5rem;
}
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.95rem;
}
.hero-stat {
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* 板块标题 */
.section-heading {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

/* 三大支柱网格 */
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* 支柱卡片 */
.pillar-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.75rem 1.5rem;
    background: #fff;
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
}
.pillar-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.pillar-icon {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
}
.pillar-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.pillar-title a {
    text-decoration: none;
    color: inherit;
}
.pillar-desc {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.5;
    flex-grow: 1;
    margin-bottom: 1.25rem;
}
.pillar-meta {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-bottom: 1rem;
}
.pillar-link {
    align-self: flex-start;
    background: #2563eb;
    color: #fff !important;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s;
}
.pillar-link:hover {
    background: #1d4ed8;
}

/* 随机翻翻按钮 */
.random-section {
    text-align: center;
    margin: 2.5rem 0;
}
.random-btn {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: #fff !important;
    padding: 0.875rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.random-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

/* 双栏区域 */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
@media (max-width: 768px) {
    .two-column {
        grid-template-columns: 1fr;
    }
}

/* 栏目盒子 */
.column-box {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    background: #fff;
}
.column-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 精选文章 */
.featured-article {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid #0ea5e9;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}
.featured-article:last-of-type {
    margin-bottom: 0;
}
.featured-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.featured-title a {
    color: #0369a1;
    text-decoration: none;
}
.featured-title a:hover {
    text-decoration: underline;
}
.featured-desc {
    font-size: 0.85rem;
    color: #64748b;
}

/* 数据面板 */
.stats-panel {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}
.stat-item {
    text-align: center;
    padding: 1rem 0.5rem;
    background: #fff;
    border-radius: 8px;
}
.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}
.stat-label {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.25rem;
}

/* 此刻在折腾 */
.status-section {
    background: #fefce8;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-left: 4px solid #eab308;
}
.status-section .section-heading {
    border: none;
    margin: 0 0 0.75rem 0;
}
.status-item {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}
.status-item:last-child {
    margin-bottom: 0;
}
.status-icon {
    margin-right: 0.5rem;
}
.status-item a {
    color: #854d0e;
}

/* 诗词角落 */
.poetry-section {
    border: 1px dashed #d1d5db;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    background: #fafafa;
}
.poetry-section .mw-collapsible-toggle {
    font-weight: 600;
    color: #6b7280;
}
.poetry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}
.poetry-item {
    font-size: 0.85rem;
    padding: 0.5rem;
    background: #fff;
    border-radius: 6px;
    text-align: center;
}
.poetry-item a {
    color: #7c3aed;
    text-decoration: none;
}
.poetry-item a:hover {
    text-decoration: underline;
}

/* 页脚 */
.main-footer {
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
    font-size: 0.85rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 2rem;
}
.main-footer a {
    color: #9ca3af;
}