跳转到内容

MediaWiki:Common.css

来自电棍ottowiki
棍牧典留言 | 贡献2025年5月11日 (日) 12:53的版本

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

  • 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.woff2") format("woff2"),
       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: #1a1a1a;
  word-break: break-word;
  overflow-wrap: break-word;      /* 旧 Safari / Edge */
  text-rendering: optimizeLegibility;
}

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

.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: white;
	padding-right:10px;
	padding-left:10px;
	border-radius: 0 0 5px 5px;
}
.vector-page-toolbar{
	background-color: white;
	padding-right:10px;
	padding-left:10px;
	border-radius: 5px 5px 0 0;
}
.vector-pinned-container {
	border-radius: 5px;
	background-color: white;
}
.skin-vector .mw-logo {
  background-color: rgba(255, 255, 255, 0.40);
  border-radius: 2px;
  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;
}

/* =========================================================
 * 搜索框(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: #1f1f1f;
  background-color: #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: #f5f5f5;
  color: #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; }
}