MediaWiki:Common.css
MediaWiki界面页面
更多操作
注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的更改的影响。
- Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5或Ctrl-R(Mac为⌘-R)
- Google Chrome:按Ctrl-Shift-R(Mac为⌘-Shift-R)
- Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5。
/* =========================
OUTREX 首页 - Citizen 皮肤适配
建议放到 MediaWiki:Citizen.css
========================= */
/* 让首页内容更接近整站宽度 */
.page-Main_Page .mw-body,
.page-主页 .mw-body,
.page-首页 .mw-body {
max-width: 1600px;
}
/* 首页主容器 */
.outrex-home {
display: grid;
grid-template-columns: minmax(0, 1fr) 320px;
gap: 20px;
align-items: start;
margin: 20px 0 32px;
}
/* 左主区 */
.outrex-main {
min-width: 0;
}
/* 右侧栏 */
.outrex-side {
min-width: 0;
}
/* 通用卡片 */
.outrex-card {
background: var(--background-color-base, #fff);
border: 1px solid var(--border-color-subtle, #dadde3);
border-radius: 16px;
box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
overflow: hidden;
}
/* 卡片标题 */
.outrex-card-head {
padding: 14px 18px;
font-size: 15px;
font-weight: 700;
border-bottom: 1px solid var(--border-color-muted, #eaecf0);
background: var(--background-color-neutral-subtle, #f8f9fa);
}
/* 卡片内容 */
.outrex-card-body {
padding: 18px;
}
/* 顶部双卡片 */
.outrex-topcards {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16px;
margin-bottom: 16px;
}
.outrex-hero-card {
position: relative;
min-height: 220px;
background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
color: #fff;
border-radius: 18px;
overflow: hidden;
text-decoration: none;
display: block;
}
.outrex-hero-card:hover {
text-decoration: none;
transform: translateY(-2px);
box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
transition: all 0.2s ease;
}
.outrex-hero-inner {
position: relative;
z-index: 2;
padding: 22px;
}
.outrex-hero-title {
font-size: 24px;
font-weight: 800;
line-height: 1.2;
margin-bottom: 8px;
color: #fff;
}
.outrex-hero-desc {
font-size: 14px;
line-height: 1.6;
color: rgba(255,255,255,0.82);
max-width: 90%;
}
.outrex-hero-meta {
margin-top: 14px;
font-size: 12px;
color: rgba(255,255,255,0.72);
}
/* 公告条 */
.outrex-banner {
margin: 0 0 16px;
padding: 14px 18px;
border-radius: 14px;
background: linear-gradient(90deg, #2f9e44 0%, #37b24d 100%);
color: #fff;
font-weight: 700;
font-size: 14px;
box-shadow: 0 8px 24px rgba(55, 178, 77, 0.2);
}
.outrex-banner a {
color: #fff;
text-decoration: none;
}
/* 8格入口 */
.outrex-grid {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 14px;
margin-bottom: 16px;
}
.outrex-grid .grid-item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 108px;
padding: 14px 10px;
border-radius: 16px;
background: var(--background-color-base, #fff);
border: 1px solid var(--border-color-subtle, #dadde3);
text-decoration: none;
color: var(--color-base, #202122);
transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
box-sizing: border-box;
}
.outrex-grid .grid-item:hover {
transform: translateY(-3px);
text-decoration: none;
border-color: var(--border-color-progressive, #6485d1);
box-shadow: 0 12px 28px rgba(0,0,0,0.08);
background: var(--background-color-interactive-subtle--hover, #eaecf0);
}
.outrex-grid .grid-item img {
width: 38px;
height: 38px;
margin-bottom: 8px;
object-fit: contain;
}
.outrex-grid .grid-item span {
font-size: 14px;
font-weight: 600;
line-height: 1.4;
text-align: center;
color: inherit;
}
/* 文章模块 */
.outrex-columns {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16px;
margin-bottom: 16px;
}
.outrex-article {
background: var(--background-color-base, #fff);
border: 1px solid var(--border-color-subtle, #dadde3);
border-radius: 16px;
overflow: hidden;
}
.outrex-article-head {
padding: 14px 18px;
font-size: 15px;
font-weight: 700;
border-bottom: 1px solid var(--border-color-muted, #eaecf0);
background: var(--background-color-neutral-subtle, #f8f9fa);
}
.outrex-article-body {
padding: 18px;
font-size: 14px;
line-height: 1.8;
color: var(--color-base, #202122);
}
/* 底部小入口 */
.outrex-smallgrid {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 12px;
}
.outrex-smallgrid a {
display: flex;
align-items: center;
justify-content: center;
min-height: 78px;
padding: 12px;
border-radius: 14px;
background: var(--background-color-base, #fff);
border: 1px solid var(--border-color-subtle, #dadde3);
text-decoration: none;
color: var(--color-base, #202122);
font-weight: 600;
transition: all 0.2s ease;
}
.outrex-smallgrid a:hover {
text-decoration: none;
transform: translateY(-2px);
box-shadow: 0 10px 24px rgba(0,0,0,0.06);
}
/* 右侧栏卡片 */
.outrex-side .outrex-card {
margin-bottom: 14px;
}
.outrex-logo-wrap {
text-align: center;
padding: 22px 18px 12px;
}
.outrex-logo-wrap img {
max-width: 180px;
height: auto;
}
.outrex-site-desc {
margin-top: 12px;
font-size: 13px;
line-height: 1.7;
color: var(--color-subtle, #54595d);
text-align: left;
}
.outrex-join-btn {
display: block;
width: 100%;
padding: 14px 16px;
border-radius: 12px;
background: linear-gradient(90deg, #2f9e44 0%, #37b24d 100%);
color: #fff;
text-align: center;
font-weight: 800;
text-decoration: none;
box-sizing: border-box;
}
.outrex-join-btn:hover {
text-decoration: none;
filter: brightness(1.03);
}
/* 右侧社交按钮 */
.outrex-socials {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px;
}
.outrex-socials a {
display: flex;
align-items: center;
justify-content: center;
min-height: 44px;
border-radius: 12px;
background: var(--background-color-interactive, #eaecf0);
color: var(--color-base, #202122);
text-decoration: none;
font-weight: 700;
}
.outrex-socials a:hover {
background: var(--background-color-interactive--hover, #dadde3);
text-decoration: none;
}
/* 列表区 */
.outrex-list {
margin: 0;
padding: 0;
list-style: none;
}
.outrex-list li {
padding: 10px 0;
border-bottom: 1px solid var(--border-color-muted, #eaecf0);
font-size: 14px;
line-height: 1.6;
}
.outrex-list li:last-child {
border-bottom: 0;
}
/* 数据块 */
.outrex-stats {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
}
.outrex-stat {
padding: 12px;
border-radius: 12px;
background: var(--background-color-neutral-subtle, #f8f9fa);
border: 1px solid var(--border-color-muted, #eaecf0);
text-align: center;
}
.outrex-stat-num {
display: block;
font-size: 18px;
font-weight: 800;
line-height: 1.2;
}
.outrex-stat-label {
display: block;
margin-top: 4px;
font-size: 12px;
color: var(--color-subtle, #54595d);
}
/* 暗色模式 */
body.wgl-theme-dark .outrex-hero-card {
background: linear-gradient(135deg, #1c2430 0%, #11161f 100%);
}
body.wgl-theme-dark .outrex-card,
body.wgl-theme-dark .outrex-article,
body.wgl-theme-dark .outrex-grid .grid-item,
body.wgl-theme-dark .outrex-smallgrid a {
box-shadow: none;
}
body.wgl-theme-dark .outrex-grid .grid-item:hover,
body.wgl-theme-dark .outrex-smallgrid a:hover {
box-shadow: 0 12px 28px rgba(0,0,0,0.22);
}
/* Citizen 下首页正文通常有默认间距,压一压 */
.page-Main_Page #mw-content-text > .mw-parser-output > *:first-child,
.page-主页 #mw-content-text > .mw-parser-output > *:first-child,
.page-首页 #mw-content-text > .mw-parser-output > *:first-child {
margin-top: 0;
}
/* 平板 */
@media screen and (max-width: 1100px) {
.outrex-home {
grid-template-columns: 1fr;
}
.outrex-side {
order: 2;
}
.outrex-main {
order: 1;
}
}
/* 小屏 */
@media screen and (max-width: 720px) {
.outrex-topcards,
.outrex-columns,
.outrex-grid,
.outrex-smallgrid,
.outrex-stats,
.outrex-socials {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.outrex-hero-card {
min-height: 180px;
}
.outrex-hero-title {
font-size: 20px;
}
}
/* 手机 */
@media screen and (max-width: 520px) {
.outrex-topcards,
.outrex-columns {
grid-template-columns: 1fr;
}
.outrex-grid,
.outrex-smallgrid {
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 10px;
}
.outrex-grid .grid-item {
min-height: 94px;
padding: 10px 8px;
}
.outrex-grid .grid-item img {
width: 30px;
height: 30px;
}
.outrex-grid .grid-item span {
font-size: 13px;
}
}