MediaWiki:Timeless.css:修订间差异

来自高堡奇驹Wiki|The Pony in The High Castle Wiki
无编辑摘要
无编辑摘要
第4行: 第4行:
/*
/*
============================================================
============================================================
  HOI4 Theme for MediaWiki Timeless - v3.0 FINAL POLISH
  HOI4 Theme for MediaWiki Timeless - v4.0 POLISHED & REFINED
  精修与统一版本,解决所有不和谐的UI元素
  精装修与工业设计感版本
============================================================
============================================================
*/
*/
第11行: 第11行:
/* --- 1. 核心颜色与字体变量 (无需修改) --- */
/* --- 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:wght@400;700&family=Stalinist+One&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono&display=swap'); /* 引入等宽字体用于代码 */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono&display=swap');


:root {
:root {
第17行: 第17行:
     --hoi4-bg-dark-panel: #3a3d36;
     --hoi4-bg-dark-panel: #3a3d36;
     --hoi4-bg-paper: #e6d8b1;
     --hoi4-bg-paper: #e6d8b1;
     --hoi4-bg-paper-darker: #d8cabd; /* 用于表格、代码框的深一点的纸色 */
     --hoi4-bg-paper-darker: #d8cabd;
     --hoi4-text-light: #dcdcdc;
     --hoi4-text-light: #dcdcdc;
     --hoi4-text-dark: #3c342a;
     --hoi4-text-dark: #3c342a;
     --hoi4-border-color: #555850;
     --hoi4-border-color: #555850;
     --hoi4-border-highlight: #7c7667;
     --hoi4-border-highlight: #7c7667;
    --hoi4-border-shadow: #1e1f1c; /* 更深的边框阴影色 */
     --hoi4-link-gold: #c8b46a;
     --hoi4-link-gold: #c8b46a;
     --hoi4-link-gold-hover: #e8d48a;
     --hoi4-link-gold-hover: #e8d48a;
第29行: 第30行:
     --font-heading: 'Stalinist One', 'Impact', sans-serif;
     --font-heading: 'Stalinist One', 'Impact', sans-serif;
     --font-body: 'Roboto', sans-serif;
     --font-body: 'Roboto', sans-serif;
     --font-mono: 'Roboto Mono', monospace; /* 代码/电报字体 */
     --font-mono: 'Roboto Mono', monospace;
}
}


/* --- 2. 整体布局 (已完善,无需修改) --- */
/* --- 2. 整体布局 --- */
 
body {
body {
     background-color: var(--hoi4-bg-dark-metal) !important;
     background-color: var(--hoi4-bg-dark-metal) !important;
第39行: 第41行:
     font-family: var(--font-body) !important;
     font-family: var(--font-body) !important;
}
}
/* 【重点修正】内容区效果 */
#content {
#content {
     background-color: var(--hoi4-bg-paper) !important;
     background-color: var(--hoi4-bg-paper) !important;
     color: var(--hoi4-text-dark) !important;
     color: var(--hoi4-text-dark) !important;
     border: 2px solid var(--hoi4-border-color) !important;
   
     border-top-color: var(--hoi4-border-highlight) !important;
    /* 【新增】增加舒适的内边距,解决文字贴边问题! */
    padding: 1.5em 2.5em !important;
 
    /* 【修正】使用多层边框和阴影取代模糊效果,营造硬朗的工业感 */
    border-top: 2px solid var(--hoi4-border-highlight) !important;
     border-left: 2px solid var(--hoi4-border-highlight) !important;
     border-right: 2px solid var(--hoi4-border-shadow) !important;
    border-bottom: 2px solid var(--hoi4-border-shadow) !important;
     border-radius: 0 !important;
     border-radius: 0 !important;
     box-shadow: 0 5px 25px rgba(0, 0, 0, 0.7) !important;
     box-shadow: 4px 4px 0px 0px var(--hoi4-bg-dark-metal) !important; /* 硬朗的投影 */
}
}
/* --- 3. 头部与侧边栏 --- */
#mw-head {
#mw-head {
     background: linear-gradient(to bottom, #4a4d46, #3a3d36) !important;
     background: linear-gradient(to bottom, #4a4d46, #3a3d36) !important;
第53行: 第67行:
}
}


/* --- 3. 【重点修正】侧边栏与用户菜单 --- */
/* 【修正】侧边栏也增加立体感 */
 
#mw-site-navigation {
/* 修正侧边栏、用户菜单的整体背景 */
    background-color: var(--hoi4-bg-dark-panel) !important;
#mw-site-navigation, #mw-related-navigation, #personal {
    border: none !important;
    border-right: 2px solid var(--hoi4-border-shadow) !important;
}
#mw-related-navigation {
     background-color: var(--hoi4-bg-dark-panel) !important;
     background-color: var(--hoi4-bg-dark-panel) !important;
     border: none !important;
     border: none !important;
    border-left: 2px solid var(--hoi4-border-shadow) !important;
}
}


/* 【修正】让侧边栏内部的模块背景透明,并添加分割线 */
/* 侧边栏内部模块 */
#mw-site-navigation .sidebar-chunk, #mw-related-navigation .sidebar-chunk {
#mw-site-navigation .sidebar-chunk, #mw-related-navigation .sidebar-chunk {
     background: transparent !important;
     background: transparent !important;
第67行: 第85行:
     border-top: 1px solid var(--hoi4-border-color) !important;
     border-top: 1px solid var(--hoi4-border-color) !important;
     margin: 0 !important;
     margin: 0 !important;
     padding: 1.5em 1.5em 0 !important;
     padding: 1.5em !important;
     box-shadow: none !important;
     box-shadow: none !important;
}
}
#mw-site-navigation .sidebar-chunk:first-child {
#mw-site-navigation .sidebar-chunk:first-of-type { border-top: none !important; }
    border-top: none !important;
 
/* 用户菜单 */
#personal {
    background-color: var(--hoi4-bg-dark-panel) !important;
}
}
/* 【修正】用户菜单下拉框的背景 */
#personal .dropdown {
#personal .dropdown {
     background: var(--hoi4-bg-dark-panel) !important;
     background: var(--hoi4-bg-dark-panel) !important;
     border: 1px solid var(--hoi4-border-highlight) !important;
     border: 1px solid var(--hoi4-border-highlight) !important;
}
}
#personal .dropdown::after {
#personal .dropdown::after { border-bottom-color: var(--hoi4-bg-dark-panel) !important; }
    border-bottom-color: var(--hoi4-bg-dark-panel) !important;
#personal .dropdown::before { border-bottom-color: var(--hoi4-border-highlight) !important; }
}
#personal .dropdown::before {
    border-bottom-color: var(--hoi4-border-highlight) !important;
}


/* 侧边栏和用户菜单的标题与链接颜色 */
/* 侧边栏和用户菜单的标题与链接颜色 */
第90行: 第105行:
     font-family: var(--font-heading) !important;
     font-family: var(--font-heading) !important;
     color: var(--hoi4-link-gold) !important;
     color: var(--hoi4-link-gold) !important;
     letter-spacing: 1px !important;
     border-bottom-color: var(--hoi4-border-color) !important;
     text-transform: uppercase !important;
     text-transform: uppercase !important;
    border-bottom-color: var(--hoi4-border-color) !important;
}
}
#mw-site-navigation a, #mw-related-navigation a, #personal a {
#mw-site-navigation a, #mw-related-navigation a, #personal a {
第102行: 第116行:
}
}


/* --- 4. 【重点修正】内容区UI元素精修 --- */
/* --- 4. 内容区UI元素精修 --- */


/* 标题 */
/* 标题 */
h1, h2, h3, h4, h5, h6, #firstHeading, .mw-first-heading, .mw-first-heading {
h1, h2, h3, h4, h5, h6, #firstHeading, .mw-first-heading {
     font-family: var(--font-heading) !important;
     font-family: var(--font-heading) !important;
     color: var(--hoi4-text-dark) !important;
     color: var(--hoi4-text-dark) !important;
第118行: 第132行:
#mw-content-text a.new { color: var(--hoi4-accent-red) !important; }
#mw-content-text a.new { color: var(--hoi4-accent-red) !important; }


/* 【新增】代码/预格式化文本框,模拟电报 */
/* 代码/预格式化文本框 */
pre, .mw-code {
pre, .mw-code {
     font-family: var(--font-mono) !important;
     font-family: var(--font-mono) !important;
     background-color: var(--hoi4-bg-paper-darker) !important;
     background-color: var(--hoi4-bg-paper-darker) !important;
     border: 1px dashed var(--hoi4-border-color) !important;
     border: 1px dashed var(--hoi4-border-color) !important;
    color: var(--hoi4-text-dark) !important;
     padding: 1em !important;
     padding: 1em !important;
    white-space: pre-wrap !important;
}
}


/* 【新增】统一表格样式 */
/* 表格样式 */
.wikitable {
.wikitable {
     background-color: var(--hoi4-bg-paper-darker) !important;
     background-color: var(--hoi4-bg-paper-darker) !important;
第138行: 第150行:
     color: var(--hoi4-text-light) !important;
     color: var(--hoi4-text-light) !important;
     font-family: var(--font-heading) !important;
     font-family: var(--font-heading) !important;
    text-align: center !important;
}
}
.wikitable > tr > td, .wikitable > * > tr > td {
.wikitable > tr > td, .wikitable > * > tr > td {
     border-color: var(--hoi4-border-color) !important;
     border-color: var(--hoi4-border-color) !important;
    padding: 0.4em 0.5em !important;
}
}


/* --- 5. 【重点修正】模板和特殊区块样式 --- */
/* --- 5. 模板和特殊区块样式 --- */


/* 【修正】覆盖模板里的内联样式 (Navbox, Card1等) */
/* 覆盖模板里的内联样式 (Navbox, Card1等) */
.navbox, .navbox.wikitable, div[style*="background: #66CCFF"], div[style*="background: #B0E0E6"] {
.navbox, .navbox.wikitable, div[style*="background: #66CCFF"], div[style*="background: #B0E0E6"] {
     border: 1px solid var(--hoi4-border-color) !important;
     border: 1px solid var(--hoi4-border-color) !important;
第161行: 第171行:
     color: var(--hoi4-text-dark) !important;
     color: var(--hoi4-text-dark) !important;
}
}
.navbox a, div[style*="background: #B0E0E6"] a {
.navbox a, div[style*="background: #B0E0E6"] a { color: var(--hoi4-accent-blue) !important; }
    color: var(--hoi4-accent-blue) !important;
.navbox > tbody > tr > td[style*="background:#66CCFF"] a { color: var(--hoi4-link-gold) !important; }
}
.navbox > tbody > tr > td[style*="background:#66CCFF"] a {
    color: var(--hoi4-link-gold) !important;
}


/* 【新增】美化 "Steam创意工坊" 按钮 */
/* "Steam创意工坊" 按钮 */
div[style*="background-color: rgb(248, 218, 216)"] {
div[style*="background-color: rgb(248, 218, 216)"] {
     background-color: var(--hoi4-border-color) !important;
     background-color: var(--hoi4-border-color) !important;
第175行: 第181行:
     transition: all 0.2s ease;
     transition: all 0.2s ease;
}
}
div[style*="background-color: rgb(248, 218, 216)"]:hover {
div[style*="background-color: rgb(248, 218, 216)"]:hover { background-color: #666960 !important; }
    background-color: #666960 !important;
}
div[style*="background-color: rgb(248, 218, 216)"] a,
div[style*="background-color: rgb(248, 218, 216)"] a,
div[style*="background-color: rgb(248, 218, 216)"] b {
div[style*="background-color: rgb(248, 218, 216)"] b {

2025年7月15日 (二) 19:00的版本

/* 这里放置的CSS将应用于Timeless皮肤 */
/* 更改Timeless皮肤的默认背景图片 */
/*
/*
============================================================
 HOI4 Theme for MediaWiki Timeless - v4.0 POLISHED & REFINED
 精装修与工业设计感版本
============================================================
*/

/* --- 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-border-shadow: #1e1f1c; /* 更深的边框阴影色 */
    --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;
    
    /* 【新增】增加舒适的内边距,解决文字贴边问题! */
    padding: 1.5em 2.5em !important;

    /* 【修正】使用多层边框和阴影取代模糊效果,营造硬朗的工业感 */
    border-top: 2px solid var(--hoi4-border-highlight) !important;
    border-left: 2px solid var(--hoi4-border-highlight) !important;
    border-right: 2px solid var(--hoi4-border-shadow) !important;
    border-bottom: 2px solid var(--hoi4-border-shadow) !important;
    border-radius: 0 !important;
    box-shadow: 4px 4px 0px 0px var(--hoi4-bg-dark-metal) !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 {
    background-color: var(--hoi4-bg-dark-panel) !important;
    border: none !important;
    border-right: 2px solid var(--hoi4-border-shadow) !important;
}
#mw-related-navigation {
    background-color: var(--hoi4-bg-dark-panel) !important;
    border: none !important;
    border-left: 2px solid var(--hoi4-border-shadow) !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 !important;
    box-shadow: none !important;
}
#mw-site-navigation .sidebar-chunk:first-of-type { border-top: none !important; }

/* 用户菜单 */
#personal {
    background-color: var(--hoi4-bg-dark-panel) !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;
    border-bottom-color: var(--hoi4-border-color) !important;
    text-transform: uppercase !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 {
    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;
    padding: 1em !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;
}
.wikitable > tr > td, .wikitable > * > tr > td {
    border-color: var(--hoi4-border-color) !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;
}