|
|
(未显示同一用户的5个中间版本) |
第1行: |
第1行: |
| /* 这里放置的CSS将应用于Timeless皮肤 */
| |
| /* 更改Timeless皮肤的默认背景图片 */
| |
| /*
| |
| ============================================================
| |
| HOI4 Theme for MediaWiki Timeless - REINFORCED VERSION
| |
| 使用 !important 强制覆盖默认样式
| |
| ============================================================
| |
| */
| |
| /*
| |
| ============================================================
| |
| HOI4 Theme for MediaWiki Timeless - FINAL CORRECTED VERSION
| |
| 修正了选择器并增加了对内联样式的覆盖
| |
| ============================================================
| |
| */
| |
|
| |
|
| /* --- 1. 核心颜色与字体变量 --- */
| |
| @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&family=Stalinist+One&display=swap');
| |
|
| |
| :root {
| |
| --hoi4-bg-dark-metal: #2d302b; /* 深色金属背景 */
| |
| --hoi4-bg-dark-panel: #3a3d36; /* 侧边栏和面板背景 */
| |
| --hoi4-bg-paper: #e6d8b1; /* 纸张/内容背景 */
| |
| --hoi4-text-light: #dcdcdc; /* 亮色文字 (用于深色背景) */
| |
| --hoi4-text-dark: #3c342a; /* 暗色文字 (用于纸张背景) */
| |
| --hoi4-border-color: #555850; /* 边框颜色 */
| |
| --hoi4-border-highlight: #7c7667; /* 边框高光 */
| |
| --hoi4-link-gold: #c8b46a; /* 链接 - 金色 */
| |
| --hoi4-link-gold-hover: #e8d48a; /* 链接悬停 - 亮金色 */
| |
| --hoi4-accent-red: #9f3a3a; /* 警示/未创建页面链接 */
| |
|
| |
| --font-heading: 'Stalinist One', 'Impact', sans-serif; /* 标题字体 */
| |
| --font-body: 'Roboto', sans-serif; /* 正文字体 */
| |
| }
| |
|
| |
| /* --- 2. 整体布局:深色外壳 + 浅色内容 (强制执行) --- */
| |
|
| |
| /* 全局背景 */
| |
| body {
| |
| background-color: var(--hoi4-bg-dark-metal) !important;
| |
| background-image: url('https://www.transparenttextures.com/patterns/dark-metal.png'); /* 可选:添加金属纹理 */
| |
| color: var(--hoi4-text-light) !important;
| |
| font-family: var(--font-body) !important;
| |
| }
| |
|
| |
| /* 主要内容区域(文章) */
| |
| #content {
| |
| background-color: var(--hoi4-bg-paper) !important;
| |
| color: var(--hoi4-text-dark) !important;
| |
| border: 2px solid var(--hoi4-border-color) !important;
| |
| border-top-color: var(--hoi4-border-highlight) !important;
| |
| border-radius: 0 !important;
| |
| box-shadow: 0 5px 25px rgba(0, 0, 0, 0.7) !important;
| |
| }
| |
|
| |
| /* --- 3. 头部、侧边栏和搜索框 (强制执行) --- */
| |
|
| |
| /* 顶部横幅 */
| |
| #mw-head {
| |
| background: linear-gradient(to bottom, #4a4d46, #3a3d36) !important;
| |
| border-bottom: 2px solid #1a1a1a !important;
| |
| box-shadow: 0 2px 5px rgba(0,0,0,0.5) !important;
| |
| }
| |
|
| |
| /* 【修正】使用了正确的侧边栏选择器! */
| |
| #mw-site-navigation, #mw-related-navigation, #personal {
| |
| background-color: var(--hoi4-bg-dark-panel) !important;
| |
| border: none !important;
| |
| }
| |
|
| |
| /* 左侧Logo */
| |
| #p-logo-text {
| |
| background: none !important;
| |
| }
| |
| #p-logo a img {
| |
| /* 你的左上角那个六边形徽章 */
| |
| background-color: transparent !important;
| |
| }
| |
| #p-logo a:not(.mw-wiki-logo) {
| |
| filter: drop-shadow(0 0 8px rgba(255, 255, 220, 0.3));
| |
| }
| |
|
| |
| /* 搜索框 */
| |
| #searchInput {
| |
| background-color: #ddd3bc !important;
| |
| border: 1px solid var(--hoi4-border-color) !important;
| |
| border-radius: 0 !important;
| |
| color: var(--hoi4-text-dark) !important;
| |
| }
| |
| #searchButton, #mw-searchButton {
| |
| background-color: var(--hoi4-border-color) !important;
| |
| border: 1px solid var(--hoi4-border-highlight) !important;
| |
| border-radius: 0 !important;
| |
| color: var(--hoi4-text-light) !important;
| |
| font-family: var(--font-heading) !important;
| |
| }
| |
|
| |
| /* --- 4. 字体与排版 (强制执行) --- */
| |
|
| |
| /* 所有标题 */
| |
| h1, h2, h3, h4, h5, h6, #firstHeading, .mw-first-heading {
| |
| font-family: var(--font-heading) !important;
| |
| color: var(--hoi4-text-dark) !important;
| |
| border-bottom: 1px solid #c9be9f !important;
| |
| letter-spacing: 1.5px !important;
| |
| text-transform: uppercase !important;
| |
| padding-bottom: 0.3em !important;
| |
| text-shadow: 1px 1px 0px #fff !important;
| |
| }
| |
| #firstHeading, .mw-first-heading {
| |
| font-size: 2.5em !important;
| |
| border-bottom-width: 2px !important;
| |
| }
| |
|
| |
| /* 【修正】侧边栏标题的选择器 */
| |
| #mw-site-navigation h3, #mw-related-navigation h3 {
| |
| font-family: var(--font-heading) !important;
| |
| color: var(--hoi4-link-gold) !important;
| |
| letter-spacing: 1px !important;
| |
| border-bottom: 1px solid var(--hoi4-border-color) !important;
| |
| text-transform: uppercase !important;
| |
| }
| |
|
| |
| /* --- 5. 链接和UI细节 (强制执行) --- */
| |
|
| |
| /* 内容区链接 */
| |
| #content a {
| |
| color: #5a7a9a !important;
| |
| font-weight: bold !important;
| |
| text-decoration: none !important;
| |
| }
| |
| #content a:hover {
| |
| color: #8ab3d6 !important;
| |
| text-decoration: underline !important;
| |
| }
| |
| #content a.new {
| |
| color: var(--hoi4-accent-red) !important;
| |
| }
| |
|
| |
| /* 【修正】侧边栏链接选择器 */
| |
| #mw-site-navigation .mw-portlet-body ul > li a,
| |
| #mw-related-navigation .mw-portlet-body ul > li a,
| |
| #p-personal ul > li a {
| |
| color: var(--hoi4-text-light) !important;
| |
| }
| |
| #mw-site-navigation .mw-portlet-body ul > li a:hover,
| |
| #mw-related-navigation .mw-portlet-body ul > li a:hover,
| |
| #p-personal ul > li a:hover {
| |
| background-color: rgba(200, 180, 106, 0.1) !important;
| |
| color: var(--hoi4-link-gold-hover) !important;
| |
| }
| |
|
| |
|
| |
| /* --- 锦上添花:修复导航框(Navbox)样式 --- */
| |
| /* 这个部分专门用来覆盖模板里写死的内联样式 */
| |
|
| |
| .navbox, .navbox.wikitable {
| |
| border: 1px solid var(--hoi4-border-color) !important;
| |
| background-color: #e0d2a8 !important; /* 稍暗的纸张颜色 */
| |
| }
| |
|
| |
| /* 导航框标题栏 (覆盖内联style) */
| |
| .navbox > tbody > tr > td[style*="background:#66CCFF"] {
| |
| background-color: var(--hoi4-border-color) !important;
| |
| color: var(--hoi4-text-light) !important;
| |
| font-family: var(--font-heading) !important;
| |
| }
| |
|
| |
| /* 导航框内容行 (覆盖内联style) */
| |
| .navbox > tbody > tr > th[style*="background:#B0E0E6"],
| |
| .navbox > tbody > tr > td[style*="background:#B0E0E6"] {
| |
| background-color: transparent !important; /* 让它使用父级背景色 */
| |
| color: var(--hoi4-text-dark) !important;
| |
| }
| |
|
| |
| /* 导航框标题栏里的链接 */
| |
| .navbox > tbody > tr > td[style*="background:#66CCFF"] a {
| |
| color: var(--hoi4-link-gold) !important;
| |
| }
| |
| .navbox > tbody > tr > td[style*="background:#66CCFF"] a:hover {
| |
| color: var(--hoi4-link-gold-hover) !important;
| |
| }
| |