|
|
(未显示同一用户的4个中间版本) |
第1行: |
第1行: |
| /* 这里放置的CSS将应用于Timeless皮肤 */
| |
| /* 更改Timeless皮肤的默认背景图片 */
| |
| /*
| |
| /*
| |
| ============================================================
| |
| HOI4 Theme for MediaWiki Timeless - v3.0 FINAL POLISH
| |
| 精修与统一版本,解决所有不和谐的UI元素
| |
| ============================================================
| |
| */
| |
|
| |
|
| /* --- 1. 核心颜色与字体变量 (无需修改) --- */
| |
| @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&family=Stalinist+One&display=swap');
| |
| @import url('https://fonts.googleapis.com/css2?family=Roboto+Mono&display=swap'); /* 引入等宽字体用于代码 */
| |
|
| |
| :root {
| |
| --hoi4-bg-dark-metal: #2d302b;
| |
| --hoi4-bg-dark-panel: #3a3d36;
| |
| --hoi4-bg-paper: #e6d8b1;
| |
| --hoi4-bg-paper-darker: #d8cabd; /* 用于表格、代码框的深一点的纸色 */
| |
| --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;
| |
| --hoi4-accent-blue: #5a7a9a;
| |
|
| |
| --font-heading: 'Stalinist One', 'Impact', sans-serif;
| |
| --font-body: 'Roboto', sans-serif;
| |
| --font-mono: 'Roboto Mono', monospace; /* 代码/电报字体 */
| |
| }
| |
|
| |
| /* --- 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;
| |
| }
| |
| #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;
| |
| }
| |
|
| |
| /* --- 3. 【重点修正】侧边栏与用户菜单 --- */
| |
|
| |
| /* 修正侧边栏、用户菜单的整体背景 */
| |
| #mw-site-navigation, #mw-related-navigation, #personal {
| |
| background-color: var(--hoi4-bg-dark-panel) !important;
| |
| border: none !important;
| |
| }
| |
|
| |
| /* 【修正】让侧边栏内部的模块背景透明,并添加分割线 */
| |
| #mw-site-navigation .sidebar-chunk, #mw-related-navigation .sidebar-chunk {
| |
| background: transparent !important;
| |
| border: none !important;
| |
| border-top: 1px solid var(--hoi4-border-color) !important;
| |
| margin: 0 !important;
| |
| padding: 1.5em 1.5em 0 !important;
| |
| box-shadow: none !important;
| |
| }
| |
| #mw-site-navigation .sidebar-chunk:first-child {
| |
| border-top: none !important;
| |
| }
| |
|
| |
| /* 【修正】用户菜单下拉框的背景 */
| |
| #personal .dropdown {
| |
| background: var(--hoi4-bg-dark-panel) !important;
| |
| border: 1px solid var(--hoi4-border-highlight) !important;
| |
| }
| |
| #personal .dropdown::after {
| |
| border-bottom-color: var(--hoi4-bg-dark-panel) !important;
| |
| }
| |
| #personal .dropdown::before {
| |
| border-bottom-color: var(--hoi4-border-highlight) !important;
| |
| }
| |
|
| |
| /* 侧边栏和用户菜单的标题与链接颜色 */
| |
| #mw-site-navigation h3, #mw-related-navigation h3, #personal .dropdown h3 {
| |
| font-family: var(--font-heading) !important;
| |
| color: var(--hoi4-link-gold) !important;
| |
| letter-spacing: 1px !important;
| |
| text-transform: uppercase !important;
| |
| border-bottom-color: var(--hoi4-border-color) !important;
| |
| }
| |
| #mw-site-navigation a, #mw-related-navigation a, #personal a {
| |
| color: var(--hoi4-text-light) !important;
| |
| }
| |
| #mw-site-navigation a:hover, #mw-related-navigation a:hover, #personal a:hover {
| |
| background-color: rgba(200, 180, 106, 0.1) !important;
| |
| color: var(--hoi4-link-gold-hover) !important;
| |
| }
| |
|
| |
| /* --- 4. 【重点修正】内容区UI元素精修 --- */
| |
|
| |
| /* 标题 */
| |
| h1, h2, h3, h4, h5, h6, #firstHeading, .mw-first-heading, .mw-first-heading {
| |
| font-family: var(--font-heading) !important;
| |
| color: var(--hoi4-text-dark) !important;
| |
| border-bottom: 1px solid #c9be9f !important;
| |
| text-shadow: 1px 1px 0px #fff !important;
| |
| }
| |
| #firstHeading, .mw-first-heading { font-size: 2.5em !important; border-bottom-width: 2px !important; }
| |
|
| |
| /* 链接 */
| |
| #mw-content-text a:not(.image) { color: var(--hoi4-accent-blue) !important; font-weight: bold !important; text-decoration: none !important; }
| |
| #mw-content-text a:hover { color: #8ab3d6 !important; text-decoration: underline !important; }
| |
| #mw-content-text a.new { color: var(--hoi4-accent-red) !important; }
| |
|
| |
| /* 【新增】代码/预格式化文本框,模拟电报 */
| |
| pre, .mw-code {
| |
| font-family: var(--font-mono) !important;
| |
| background-color: var(--hoi4-bg-paper-darker) !important;
| |
| border: 1px dashed var(--hoi4-border-color) !important;
| |
| color: var(--hoi4-text-dark) !important;
| |
| padding: 1em !important;
| |
| white-space: pre-wrap !important;
| |
| }
| |
|
| |
| /* 【新增】统一表格样式 */
| |
| .wikitable {
| |
| background-color: var(--hoi4-bg-paper-darker) !important;
| |
| border: 1px solid var(--hoi4-border-color) !important;
| |
| border-collapse: collapse !important;
| |
| }
| |
| .wikitable > tr > th, .wikitable > * > tr > th {
| |
| background-color: var(--hoi4-border-color) !important;
| |
| color: var(--hoi4-text-light) !important;
| |
| font-family: var(--font-heading) !important;
| |
| text-align: center !important;
| |
| }
| |
| .wikitable > tr > td, .wikitable > * > tr > td {
| |
| border-color: var(--hoi4-border-color) !important;
| |
| padding: 0.4em 0.5em !important;
| |
| }
| |
|
| |
| /* --- 5. 【重点修正】模板和特殊区块样式 --- */
| |
|
| |
| /* 【修正】覆盖模板里的内联样式 (Navbox, Card1等) */
| |
| .navbox, .navbox.wikitable, div[style*="background: #66CCFF"], div[style*="background: #B0E0E6"] {
| |
| border: 1px solid var(--hoi4-border-color) !important;
| |
| background-color: var(--hoi4-bg-paper-darker) !important;
| |
| }
| |
| .navbox > tbody > tr > td[style*="background:#66CCFF"], div[style*="background: #66CCFF"] {
| |
| background-color: var(--hoi4-border-color) !important;
| |
| color: var(--hoi4-text-light) !important;
| |
| font-family: var(--font-heading) !important;
| |
| }
| |
| .navbox > tbody > tr > th, .navbox > tbody > tr > td, div[style*="background: #B0E0E6"] {
| |
| background-color: transparent !important;
| |
| color: var(--hoi4-text-dark) !important;
| |
| }
| |
| .navbox a, div[style*="background: #B0E0E6"] a {
| |
| color: var(--hoi4-accent-blue) !important;
| |
| }
| |
| .navbox > tbody > tr > td[style*="background:#66CCFF"] a {
| |
| color: var(--hoi4-link-gold) !important;
| |
| }
| |
|
| |
| /* 【新增】美化 "Steam创意工坊" 按钮 */
| |
| div[style*="background-color: rgb(248, 218, 216)"] {
| |
| background-color: var(--hoi4-border-color) !important;
| |
| border-color: var(--hoi4-border-highlight) !important;
| |
| border-radius: 2px !important;
| |
| transition: all 0.2s ease;
| |
| }
| |
| div[style*="background-color: rgb(248, 218, 216)"]:hover {
| |
| background-color: #666960 !important;
| |
| }
| |
| div[style*="background-color: rgb(248, 218, 216)"] a,
| |
| div[style*="background-color: rgb(248, 218, 216)"] b {
| |
| color: var(--hoi4-text-light) !important;
| |
| text-decoration: none !important;
| |
| }
| |