跳转到内容

MediaWiki:Common.css

来自电棍ottowiki
OctoberSama留言 | 贡献2025年5月31日 (六) 14:13的版本

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

  • Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5Ctrl-R(Mac为⌘-R
  • Google Chrome:Ctrl-Shift-R(Mac为⌘-Shift-R
  • Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5
/* =========================================================
 * @font-face – 字体声明
 * ======================================================= */

/* FOT-Rodin Pro(站点 Logo / 标题)*/
@font-face {
  font-family: "FOT-Rodin Pro";
  src: url("/resources/assets/FOT-Rodin Pro DB.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* 霞鹜文楷 – 正文字体(中文)*/
@font-face {
  font-family: "WenKai";
  src: url("/resources/assets/LXGWWenKai-Regular.ttf")   format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Merriweather – 英文衬线 */
@font-face {
  font-family: "Merriweather";
  src: url("/resources/assets/Merriweather-Regular.ttf")   format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* JetBrains Mono – 等宽英文 */
@font-face {
  font-family: "JetBrains Mono";
  src: url("/resources/assets/JetBrainsMono-Regular.woff2") format("woff2"),
       url("/resources/assets/JetBrainsMono-Regular.ttf")   format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* 霞鹜文楷 Mono – 等宽中文 */
@font-face {
  font-family: "WenKai Mono";
  src: url("/resources/assets/LXGWWenKaiMono-Regular.woff2") format("woff2"),
       url("/resources/assets/LXGWWenKaiMono-Regular.ttf")   format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* =========================================================
 * 正文阅读排版
 * ======================================================= */

body,
#mw-content-text,
.mw-body-content {
  font-family: "WenKai", "Merriweather", serif,
               "Songti SC", "Noto Serif CJK SC";
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-base);
  word-break: break-word;
  overflow-wrap: break-word;      /* 旧 Safari / Edge */
  text-rendering: optimizeLegibility;
}

/* =========================================================
 * 站点页眉 / LOGO(Vector 皮肤)
 * ======================================================= */


.vector-page-titlebar {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    background-color: rgba(var(--background-color-rgb),0.9);
    border-radius: 4px 4px 0 0;
    padding-top: 12px;
    padding-left: 14px;
    padding-right:14px;
    padding-bottom: 12px;
}
.vector-sticky-pinned-container {
    overflow: hidden auto;
    position: sticky;
    margin-top: 24px;
    margin-left: 12px;
    box-sizing: border-box;
    max-height: calc(100vh - (24px * 2));
    padding-top: 16px;
    background-color: var(--background-color-base);
    border-radius: 5px;
}
.vector-pinned-container {
    background-color: var(--background-color-base,#fff);
    padding: 0 16px;
    margin-bottom: 0em;
}
.skin-vector .mw-header {
  background-image: url("https://wiki.ottohub.cn/images/a/a9/Th20_Front00.png");
  background-repeat: no-repeat;
  background-size: cover;
}
.mw-page-container {
  background-image: url("https://wiki.ottohub.cn/images/b/b8/Th20_eff_switchbg.png");
}
#bodyContent{
	background-color: rgba(var(--background-color-rgb),0.9);
	padding-right:16px;
	padding-left:16px;
        padding-top:16px;
        padding-bottom:2px;
	border-radius: 0 0 4px 4px;
}
.vector-page-toolbar{
	min-height: 5px;
	background-color: rgba(var(--background-color-rgb),0.9);
	padding-right:12px;
	padding-left:12px;
}
.vector-pinned-container,.vector-column-end{
	border-radius: 5px;
}
#vector-main-menu-pinned-container {
    right: 12px;
    padding-top: 16px;
    padding-bottom: 8px;
    background-color:var(--background-color-base);
}
.skin-vector .mw-logo {
  background-color: rgba(255, 255, 255, 0.60);
  border-radius: 4px;
  padding: 0 20px 0 10px;
}

.skin-vector .mw-body-header,
#p-logo-text,
.vector-header {
  font-family: "FOT-Rodin Pro", "WenKai", serif;
  font-weight: bold;
}

.cn-notice {
  background-color: rgba(var(--background-color-rgb), 0.80);
  border-radius: 4px;
}

.cn-contents {
  background-color: rgba(var(--background-color-rgb), 0.80);
  border-radius: 4px;
}

/* =========================================================
 * 搜索框(Vector & Monobook)
 * ======================================================= */

input[type="search"],
input[type="text"],
.vector-search-box-input,
#searchInput {
  font-family: "WenKai", serif;   /* 只用一种字体避免中英割裂 */
  font-size: 14px;                /* 不要太大,防止高度被裁 */
  line-height: 1;                 /* 光标垂直居中 */
}

/* 占位符样式 */
#searchInput::placeholder,
.vector-search-box-input::placeholder {
  font-family: "WenKai", serif;
  color: #999;
}

/* =========================================================
 * 编辑器(WikiEditor / CodeMirror)
 * ======================================================= */

.wikiEditor-ui {
  font-family: "WenKai Mono", "JetBrains Mono", monospace !important;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-base,#1f1f1f);
  background-color: var(--background-color-neutral-subtle,#f9f9f9);
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 6px;
  overflow: auto;
  tab-size: 4;
  white-space: pre;
  font-variant-ligatures: none;
}

/* =========================================================
 * <pre> / <code> / .mw-code
 * ======================================================= */

pre,
code,
.mw-code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.95em;
  background-color: var(--background-color-neutral-subtle,#f9f9f9);
  color: var(--color-emphasized,#222);
  padding: 4px 6px;
  border-radius: 4px;
  overflow-x: auto;
}

/* =========================================================
 * 分类栏、注释脚注
 * ======================================================= */

.catlinks,
.mw-references {
  font-size: 0.9em;
  opacity: 0.85;
}

/* =========================================================
 * 加载动画
 * ======================================================= */

#loadingIndicator img {
  animation: fadePulse 1s ease-in-out infinite;
  will-change: opacity;
}

@keyframes fadePulse {
  0%   { opacity: 1; }
  50%  { opacity: 0.5; }
  100% { opacity: 1; }
}
/* 全局细线滚动条样式 */
::-webkit-scrollbar {
  width: 6px;      /* 纵向滚动条宽度 */
  height: 6px;     /* 横向滚动条高度 */
}

::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2); /* 滚动条滑块颜色 */
  border-radius: 3px;          /* 滚动条滑块圆角 */
}

::-webkit-scrollbar-track {
  background: transparent;      /* 滚动条轨道背景 */
}

/* Firefox 支持 */
* {
  scrollbar-width: thin;              /* 滚动条宽度 */
  scrollbar-color: rgba(0,0,0,0.2) transparent; /* 滚动条颜色 */
}

/* 设置非本站的跨 Wiki 链接颜色 */
a.extiw:not([href*="wiki.ottohub.cn"]),
a.extiw:not([href*="wiki.ottohub.cn"]):visited {
    color: #00AF89;
}

/* 设置非本站的跨 Wiki 链接在悬停时的颜色 */
a.extiw:not([href*="wiki.ottohub.cn"]):hover,
a.extiw:not([href*="wiki.ottohub.cn"]):hover:visited {
    color: #00D7A8;
}

/* 黑幕相关 */
.heimu,
.heimu rt{
    background-color:#252525;
}

.heimu,
.heimu a,
a .heimu,
a.new .heimu,
span.heimu a.new,
span.heimu a.external,
span.heimu a.external:visited,
span.heimu a.extiw,
span.heimu a.extiw:visited,
span.heimu a.mw-disambig,
span.heimu a.mw-redirect{
    transition:color 0.13s linear;
    color:#252525;
    text-shadow:none;
}

span.heimu:hover,
span.heimu:active{
    color:white;
}

span.heimu:hover a,
a:hover span.heimu{
    color:lightblue;
}

span.heimu:hover a:visited,
a:visited:hover span.heimu{
    color:#C5CAE9;
}

span.heimu:hover a.new,
a.new:hover span.heimu{
    color:#FCC;
}

span.heimu a.new:hover:visited,
a.new:hover:visited span.heimu{
    color:#EF9A9A;
}

span.heimu:hover a.extiw:visited,
a.extiw:visited:hover span.heimu{
    color:#D1C4E9;
}
/* navbox */
table.navbox{
    border:1px solid #aaa;
    clear:both;
    margin:auto;
    padding:1px;
    text-align:center;
    width:100%;
}

table.navbox + table.navbox{
    margin-top:-1px;
}

.navbox-title,
.navbox-abovebelow,
table.navbox th{
    padding-left:1em;
    padding-right:1em;
    text-align:center;
}

.navbox-group{
    font-weight:700;
    white-space:nowrap;
}

.navbox,
.navbox-subgroup{
    background:none repeat scroll 0 0 var(--theme-card-background-color, #fdfdfd);
}

.navbox-list{
    border-color:#fdfdfd;
}

.navbox-title,
table.navbox th{
    background:none repeat scroll 0 0 #a5e4a5;
}

.navbox-abovebelow,
.navbox-group,
.navbox-subgroup .navbox-title{
    background:none repeat scroll 0 0 #c0ecc0;
}

.navbox-subgroup .navbox-group,
.navbox-subgroup .navbox-abovebelow{
    background:none repeat scroll 0 0 #e6f6e6;
}

.navbox-even{
    background:none repeat scroll 0 0 #f5fcf5;
}

.navbox-odd{
    background:none repeat scroll 0 0 #fdfdfd;
}
/* infobox */
.infoBox{
    margin:0 auto;
    width:80%;
    box-sizing:border-box;
}

.infoBoxTitle{
    margin:3px auto;
    padding:0;
    text-align:center;
    font-weight:700;
}

.infoBoxIcon{
    display:table-cell;
    padding:2px 0 2px 0.5em;
    vertical-align:middle;
}

.infoBoxText{
    display:table-cell;
    padding:0.25em 0.5em 0.25em 1.3em;
    width:100%;
    vertical-align:middle;
}

.infoBoxContent{
    border:1px solid #ddd;
    border-left-width:0;
    background:#fbfbfb;
}

.infoBoxBelow{
    margin:0 auto;
    padding:0;
    text-align:center;
}
.audio-trigger { cursor: pointer; }

/* 清除浮动元素 */
.ns-0 .firstHeading::before {
    content: "测试";
    display: table;
    clear: both;
}