MediaWiki:Common.css:修订间差异

来自尘月维基
跳转到导航 跳转到搜索
Maintenance script​(留言 | 贡献)
尘月维基紫主题框架
Admin​(留言 | 贡献)
排版:放开源码编辑标签 + 工具条样式
 
(未显示2个用户的30个中间版本)
第1行: 第1行:
/* ===== 尘月维基 紫主题框架样式 ===== */
/* ===== 尘月维基 · Vector 经典皮肤(对齐参考站) =====
:root {
  参考站本身几乎没有自定义 CSS,外观全部由首页内联样式表格实现。
--wiki-purple: #4b2e83;
  这里只做三件事:中文字体、站标尺寸、去点击虚线框。
--wiki-purple-light: #faf8ff;
*/
--wiki-purple-border: #e7e0f5;
 
body {
font-family: -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}
}


/* 侧边栏分组标题 */
/* 站标:左侧栏顶部,10em 宽、等比不拉伸 */
.vector-menu-heading {
#p-logo a.mw-wiki-logo {
color: var(--wiki-purple);
display: block;
font-weight: 700;
width: 10em;
height: 8em;
background-image: url(/logo.jpg);
background-repeat: no-repeat;
background-position: center center;
background-size: contain;
}
 
/* 内容区最小高度,避免空页面太短 */
#content {
min-height: 60vh;
}
 
/* 首页板块表格里的图片不被撑破 */
.mw-parser-output table img {
max-width: 100%;
height: auto;
}
 
/* 去掉链接点击后的虚线框 */
a:focus {
outline: none;
}
}


/* 顶部导航条紫主题 */
/* ===== 板块右上角「编辑内容」按钮 =====
.mw-header,
  默认 display:none —— 匿名访客从首屏渲染起就看不到,不会闪一下。
.vector-header-container {
  body.mw-editable 由 MediaWiki 核心仅在有编辑权限的登录用户身上输出。 */
background-color: var(--wiki-purple) !important;
.card-edit {
display: none;
float: right;
margin: 0 14px 0 0;
font-size: 12px;
font-weight: 400;
letter-spacing: 0;
line-height: 1.9;
}
body.mw-editable .card-edit {
display: block;
}
.card-edit a {
display: inline-block;
padding: 0 9px;
color: #ffffff !important;
text-decoration: none;
border: 1px solid rgba(255, 255, 255, 0.55);
border-radius: 11px;
background: rgba(255, 255, 255, 0.14);
}
}
.vector-header-container a,
.card-edit a.external {
.mw-header a,
background-image: none !important;
.vector-header-container .vector-menu-heading,
padding-right: 9px !important;
.vector-search-box .cdx-text-input__input {
color: #fff !important;
}
}
.vector-header-container a:hover {
.card-edit a:hover {
color: #e7e0f5 !important;
background: #ffffff;
border-color: #ffffff;
color: #510DAB !important;
}
}


/* 顶部欢迎横幅(复刻截图紫色渐变横幅,右侧熊猫头吉祥物) */
/* 板块正文最小高度:内容为空时框不塌 */
.site-banner {
.cb { min-height: 300px; }
display: flex;
.cb-tall { min-height: 380px; }
align-items: center;
 
justify-content: space-between;
/* 两个编辑入口并存:「编辑」=可视化;「排版编辑」=源码+排版工具条 */
gap: 18px;
#ca-ve-edit ~ #ca-edit {
background: linear-gradient(135deg, #4b2e83, #6b4ea8);
display: inline-block !important;
color: #fff;
border-radius: 10px;
padding: 20px 26px;
margin-bottom: 20px;
}
}
.banner-text { flex: 1 1 auto; }
 
.banner-title { font-size: 28px; font-weight: 800; letter-spacing: 2px; }
/* 板块正文里的标题:去掉「[编辑]」小链接,字号收敛成清晰的三级层次 */
.banner-sub { font-size: 14px; opacity: .92; margin-top: 8px; line-height: 1.7; }
.cb .mw-editsection,
.banner-logo {
.cb-tall .mw-editsection { display: none !important; }
flex: 0 0 auto;
 
width: 96px; height: 96px;
.cb .mw-heading,
background-image: url(/logo.jpg);
.cb-tall .mw-heading { margin: 0.5em 0; }
background-size: contain;
 
background-repeat: no-repeat;
.cb h1, .cb-tall h1 { font-size: 165%; }
background-position: center;
.cb h2, .cb-tall h2 { font-size: 135%; }
border-radius: 50%;
.cb h3, .cb-tall h3 { font-size: 118%; }
.cb h4, .cb-tall h4 { font-size: 105%; }
.cb h1, .cb h2, .cb h3, .cb h4, .cb h5, .cb h6,
.cb-tall h1, .cb-tall h2, .cb-tall h3, .cb-tall h4, .cb-tall h5, .cb-tall h6 {
border-bottom: none !important;
margin: 0.35em 0;
line-height: 1.45;
color: #222222;
font-weight: 700;
}
}


/* 板块(公告 / 万恶之源 / 各栏目)—— 标题居中 */
/* 新建页面入口:仅登录且有编辑权的管理员可见 */
.block {
body:not(.mw-editable) #n-创建新页面{display:none}
background: #fff;
#n-创建新页面 a{font-weight:700}
border: 1px solid var(--wiki-purple-border);
 
border-radius: 10px;
/* ===== 排版工具条(源代码编辑器) =====
overflow: hidden;
  工具条按钮由 MediaWiki:Common.js 注入,这里只管外观:
margin-bottom: 20px;
  让「颜色 / 字号 / 对齐 / 插图 / 调图」在灰色工具条里显眼一点。 */
#wikiEditor-ui-toolbar .group-layout .tool-select > .label {
background: #6b3fa0;
color: #ffffff !important;
border-radius: 4px;
padding: 2px 10px;
margin: 2px 1px;
font-weight: 700;
}
#wikiEditor-ui-toolbar .group-layout .tool-select > .label:hover {
background: #8552c2;
}
}
.block-title {
#wikiEditor-ui-toolbar .group-layout .tool-button {
background: var(--wiki-purple);
color: #fff;
text-align: center;
font-size: 18px;
font-weight: 700;
font-weight: 700;
letter-spacing: 2px;
color: #6b3fa0;
padding: 11px 0;
}
}
.block-body {
#wikiEditor-ui-toolbar .group-layout .tool-select .menu .option {
padding: 18px 20px;
padding: 4px 12px;
line-height: 1.85;
white-space: nowrap;
color: #333;
}
}


/* 两列并排卡片 */
/* 图片对话框里的「去上传」提示 */
.card-row {
.chenyue-img-hint {
display: grid;
margin: 14px 0 0;
grid-template-columns: 1fr 1fr;
font-size: 92%;
gap: 20px;
margin-bottom: 20px;
}
}
.card-row .block { margin-bottom: 0; }
.chenyue-img-hint a {
@media (max-width: 700px) {
color: #6b3fa0;
.card-row { grid-template-columns: 1fr; }
font-weight: 700;
}
}
/* 隐藏页脚 MediaWiki 默认品牌文字 */
#footer-poweredby,
.mw-footer__content .footer-poweredby,
#f-poweredbyimg { display: none; }

2026年10月31日 (六) 17:48的最新版本

/* ===== 尘月维基 · Vector 经典皮肤(对齐参考站) =====
   参考站本身几乎没有自定义 CSS,外观全部由首页内联样式表格实现。
   这里只做三件事:中文字体、站标尺寸、去点击虚线框。
*/

body {
	font-family: -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

/* 站标:左侧栏顶部,10em 宽、等比不拉伸 */
#p-logo a.mw-wiki-logo {
	display: block;
	width: 10em;
	height: 8em;
	background-image: url(/logo.jpg);
	background-repeat: no-repeat;
	background-position: center center;
	background-size: contain;
}

/* 内容区最小高度,避免空页面太短 */
#content {
	min-height: 60vh;
}

/* 首页板块表格里的图片不被撑破 */
.mw-parser-output table img {
	max-width: 100%;
	height: auto;
}

/* 去掉链接点击后的虚线框 */
a:focus {
	outline: none;
}

/* ===== 板块右上角「编辑内容」按钮 =====
   默认 display:none —— 匿名访客从首屏渲染起就看不到,不会闪一下。
   body.mw-editable 由 MediaWiki 核心仅在有编辑权限的登录用户身上输出。 */
.card-edit {
	display: none;
	float: right;
	margin: 0 14px 0 0;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.9;
}
body.mw-editable .card-edit {
	display: block;
}
.card-edit a {
	display: inline-block;
	padding: 0 9px;
	color: #ffffff !important;
	text-decoration: none;
	border: 1px solid rgba(255, 255, 255, 0.55);
	border-radius: 11px;
	background: rgba(255, 255, 255, 0.14);
}
.card-edit a.external {
	background-image: none !important;
	padding-right: 9px !important;
}
.card-edit a:hover {
	background: #ffffff;
	border-color: #ffffff;
	color: #510DAB !important;
}

/* 板块正文最小高度:内容为空时框不塌 */
.cb { min-height: 300px; }
.cb-tall { min-height: 380px; }

/* 两个编辑入口并存:「编辑」=可视化;「排版编辑」=源码+排版工具条 */
#ca-ve-edit ~ #ca-edit {
	display: inline-block !important;
}

/* 板块正文里的标题:去掉「[编辑]」小链接,字号收敛成清晰的三级层次 */
.cb .mw-editsection,
.cb-tall .mw-editsection { display: none !important; }

.cb .mw-heading,
.cb-tall .mw-heading { margin: 0.5em 0; }

.cb h1, .cb-tall h1 { font-size: 165%; }
.cb h2, .cb-tall h2 { font-size: 135%; }
.cb h3, .cb-tall h3 { font-size: 118%; }
.cb h4, .cb-tall h4 { font-size: 105%; }
.cb h1, .cb h2, .cb h3, .cb h4, .cb h5, .cb h6,
.cb-tall h1, .cb-tall h2, .cb-tall h3, .cb-tall h4, .cb-tall h5, .cb-tall h6 {
	border-bottom: none !important;
	margin: 0.35em 0;
	line-height: 1.45;
	color: #222222;
	font-weight: 700;
}

/* 新建页面入口:仅登录且有编辑权的管理员可见 */
body:not(.mw-editable) #n-创建新页面{display:none}
#n-创建新页面 a{font-weight:700}

/* ===== 排版工具条(源代码编辑器) =====
   工具条按钮由 MediaWiki:Common.js 注入,这里只管外观:
   让「颜色 / 字号 / 对齐 / 插图 / 调图」在灰色工具条里显眼一点。 */
#wikiEditor-ui-toolbar .group-layout .tool-select > .label {
	background: #6b3fa0;
	color: #ffffff !important;
	border-radius: 4px;
	padding: 2px 10px;
	margin: 2px 1px;
	font-weight: 700;
}
#wikiEditor-ui-toolbar .group-layout .tool-select > .label:hover {
	background: #8552c2;
}
#wikiEditor-ui-toolbar .group-layout .tool-button {
	font-weight: 700;
	color: #6b3fa0;
}
#wikiEditor-ui-toolbar .group-layout .tool-select .menu .option {
	padding: 4px 12px;
	white-space: nowrap;
}

/* 图片对话框里的「去上传」提示 */
.chenyue-img-hint {
	margin: 14px 0 0;
	font-size: 92%;
}
.chenyue-img-hint a {
	color: #6b3fa0;
	font-weight: 700;
}