MediaWiki:Citizen.css:修订间差异
MediaWiki界面页面
更多操作
无编辑摘要 |
无编辑摘要 |
||
| 第1行: | 第1行: | ||
/* ============================================= | /* ============================================= | ||
OUTREX 风格首页组件(浅色直角版) | |||
复用自 Minecraft Wiki/styles.css | |||
============================================= */ | ============================================= */ | ||
/* -- | /* ── 全局盒模型 ── */ | ||
.mp-wrapper *, | |||
.mp-wrapper *::before, | |||
: | .mp-wrapper *::after { | ||
box-sizing: border-box; | |||
} | |||
.mp-wrapper { | |||
display: flex; | |||
- | flex-wrap: wrap; | ||
width: 100%; | |||
gap: 6px; | |||
} | |||
/* ── 两栏网格 ── */ | |||
.mp-inline-sections { | |||
-- | display: grid; | ||
-- | grid-template-columns: 1fr; | ||
grid-template-areas: "site" "left" "right"; | |||
gap: 6px; | |||
width: 100%; | |||
} | |||
.mp-section-site { grid-area: site; } | |||
.mp-left { grid-area: left; } | |||
.mp-right { grid-area: right; } | |||
@media screen and (min-width: 990px) { | |||
-- | .mp-inline-sections { | ||
grid-template-columns: 2fr 1fr; | |||
-- | grid-template-rows: auto 1fr; | ||
- | grid-template-areas: "left site" "left right"; | ||
-- | } | ||
} | |||
.mp-left, .mp-right { | |||
display: flex; | |||
flex-direction: column; | |||
gap: 6px; | |||
} | |||
.mp-right > :last-child { flex: 1; } | |||
/* 粘性侧边栏 */ | |||
.mp-sticky { | |||
position: sticky; | |||
top: 20px; | |||
} | |||
.skin-citizen .mp-sticky { | |||
top: calc(var(--citizen-header-height, 56px) + 20px); | |||
} | |||
/* ── 卡片(直角、内阴影浮雕感)── */ | |||
.mp-section { | |||
-- | border: 2px solid #bbb; | ||
-- | background-color: #fcfcfc; | ||
box-shadow: inset -2px -2px #0000000f, inset 2px 2px #ffffff0d; | |||
padding: 12px; | |||
} | |||
.mp-wrapper > .mp-section { width: 100%; } | |||
.mp-section.mp-section-full { width: 100%; } | |||
.mp-section-center { text-align: center; } | |||
/* 标题 */ | |||
.mp-wrapper h2 { | |||
- | font-family: revert; | ||
font-weight: bold; | |||
font-size: 1.2em; | |||
- | } | ||
- | .mp-title { | ||
border: none; | |||
margin: 0; | |||
padding: 0 !important; | |||
} | } | ||
/* | /* ── 高亮卡片(图片背景)── */ | ||
.mp-highlight-wrapper { | |||
display: flex; | |||
flex-wrap: wrap; | |||
gap: 8px; | |||
} | } | ||
.mp-highlight { | |||
flex: 1 1 0; | |||
min-width: 280px; | |||
background-color: # | min-height: calc(150px + 5vh); | ||
max-height: 300px; | |||
position: relative; | |||
padding: 0; | |||
overflow: hidden; | |||
background-size: cover; | |||
background-position: center; | |||
background-repeat: no-repeat; | |||
background-color: #2a5a2a; | |||
box-shadow: inset -4px -4px #0000003d, inset 4px 4px #fff2; | |||
color: #fff !important; | |||
font-size: small; | |||
text-shadow: 1px 1px 4px #000; | |||
} | } | ||
.mp-highlight *:not(a) { color: #fff !important; } | |||
.mp-highlight a { color: #bed9ff !important; } | |||
a { | .mp-highlight-image { | ||
position: absolute; | |||
inset: 0; | |||
overflow: hidden; | |||
} | } | ||
.mp-highlight-image img { | |||
object-fit: cover; | |||
width: 100%; | |||
height: 100%; | |||
max-height: 300px; | |||
} | } | ||
.mp-highlight-top-description { | |||
background: linear-gradient(180deg, #0008 24px, transparent); | |||
padding: 12px; | |||
position: absolute; | |||
top: 0; | |||
width: 100%; | |||
} | } | ||
.mp-highlight-bottom-description { | |||
background: linear-gradient(to top, #0008 50%, transparent); | |||
. | padding: 0 12px 10px; | ||
background- | position: absolute; | ||
bottom: 0; | |||
width: 100%; | |||
} | } | ||
/* | /* ── 按钮(3D 按压效果)── */ | ||
. | .mp-wrapper { | ||
color: | --button-color: #ebebeb; | ||
--button-color-progressive: #3a971e; | |||
--button-text-color: #202122; | |||
--button-border-color: rgba(0,0,0,0.4); | |||
} | } | ||
. | .mp-button { | ||
background-color: var(-- | width: 100%; | ||
border | gap: 6px; | ||
cursor: pointer; | |||
position: relative; | |||
text-align: center; | |||
background-color: var(--button-color); | |||
color: var(--button-text-color); | |||
border: 2px solid var(--button-border-color); | |||
font-size: 1em; | |||
font-weight: bold; | |||
transition: all 0.1s; | |||
} | } | ||
.mp-button.mp-button-progressive { | |||
background-color: var(--button-color-progressive); | |||
. | --button-text-color: #fff; | ||
background-color: var(-- | |||
} | } | ||
. | body.mediawiki .mp-button > * { | ||
color: var(--color- | width: calc(100% + 4px); | ||
height: calc(100% + 4px); | |||
margin: -2px; | |||
color: var(--button-text-color) !important; | |||
text-decoration: none; | |||
display: flex; | |||
gap: 6px; | |||
padding: 8px 10px 14px !important; | |||
align-items: center; | |||
justify-content: center; | |||
} | } | ||
.mp-button::after { | |||
display: block; | |||
. | content: ""; | ||
position: absolute; | |||
top: 0; | |||
left: 0; | |||
width: 100%; | |||
height: 100%; | |||
z-index: 1; | |||
box-shadow: 0 -6px 0 0 #686868 inset, | |||
2px 2px 0 0 rgba(178,178,178,0.5) inset, | |||
-2px -8px 0 0 rgba(153,153,153,0.5) inset; | |||
mix-blend-mode: hard-light; | |||
transition: 0.1s; | |||
pointer-events: none; | |||
} | } | ||
.mp-button:active::after { | |||
box-shadow: 2px 2px 0 0 rgba(178,178,178,0.5) inset, | |||
-2px -2px 0 0 rgba(153,153,153,0.5) inset; | |||
background-color: #0000001a; | |||
} | } | ||
.mp-button:hover:not(:active)::after { | |||
background-color: #ffffff1a; | |||
. | |||
} | } | ||
body.mediawiki .mp-button:active > * { | |||
padding: 14px 10px 8px !important; | |||
. | margin-top: -8px; | ||
height: calc(100% + 10px); | |||
} | } | ||
.mp-button:active { | |||
margin-top: 6px; | |||
} | } | ||
/* | /* 按钮组 */ | ||
.mp-button-wrapper { | |||
display: flex; | |||
flex-wrap: wrap; | |||
gap: 4px; | |||
} | } | ||
. | .mp-button-wrapper .mp-button { | ||
flex: 1 0 0; | |||
white-space: nowrap; | |||
} | } | ||
. | |||
/* 折叠按钮(不需要折叠功能可省略) */ | |||
/* ... 保留原样会很长,如需请告知,我先不贴 */ | |||
/* 社交图标栏 */ | |||
.mp-social-wrapper { | |||
display: grid; | |||
grid-auto-columns: minmax(0, 1fr); | |||
grid-auto-flow: column; | |||
gap: 4px; | |||
} | } | ||
.mp-button.mp-social-qq { background-color: #1ebafc; --button-text-color: #fff; } | |||
.mp-button.mp-social-kook { background-color: #5865f2; --button-text-color: #fff; } | |||
.mp-button.mp-social-web { background-color: #3a971e; --button-text-color: #fff; } | |||
/* | /* 图标网格 */ | ||
.mp-icon-wrapper { | |||
display: flex; | |||
. | flex-wrap: wrap; | ||
display: | justify-content: center; | ||
gap: 8px; | |||
--icon-base-width: 90px; | |||
--icon-max-width: 200px; | |||
} | } | ||
. | .mp-icon { | ||
flex: 1 auto; | |||
width: var(--icon-base-width); | |||
max-width: var(--icon-max-width); | |||
display: flex; | |||
flex-direction: column; | |||
} | } | ||
. | .mp-icon-link { | ||
flex: 1; | |||
margin: -2px 0 0; | |||
font-size: 14px; | |||
} | } | ||
. | .mp-icon-img { | ||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
background-color: #00000030; | |||
box-shadow: inset 0 4px #00000030, inset 0 -4px #ffffff40; | |||
border: 2px solid rgba(0,0,0,0.4); | |||
} | } | ||
.mp-icon-img a { padding: 12px; display: block; } | |||
.mp-icon-img img { | |||
width: 60px !important; | |||
height: 60px !important; | |||
filter: drop-shadow(2px 2px 1px #00000030); | |||
object-fit: contain; | |||
} | } | ||
.mp-icon:active .mp-icon-img { padding-bottom: 6px; } | |||
/* | /* 响应式缩小 */ | ||
. | @media screen and (max-width: 950px) { | ||
padding: | .mp-icon-link { font-size: 12px; } | ||
.mp-icon-img a { padding: 6px; } | |||
.mp-icon-img img { width: 40px !important; height: 40px !important; } | |||
} | } | ||
/* | /* 时间线 */ | ||
. | .mp-timeline { | ||
display: flex; | |||
flex-direction: column; | |||
margin-left: 10px; | |||
margin: | |||
} | } | ||
.mp-timeline dl { | |||
padding-left: 15px; | |||
border-left: 2px solid #bbb; | |||
display: flex; | |||
gap: 0 0.5em; | |||
flex-wrap: wrap; | |||
align-content: center; | |||
max-height: 60px; | |||
} | } | ||
. | .mp-timeline dl:not(:last-child) { padding-bottom: 8px; } | ||
background-color: var(-- | .mp-timeline dt { position: relative; } | ||
.mp-timeline dl > dt::before { | |||
content: ""; | |||
position: absolute; | |||
left: -23px; | |||
top: 4px; | |||
width: 14px; | |||
height: 14px; | |||
background-color: var(--button-color-progressive); | |||
border: 2px solid #202122; | |||
} | } | ||
. | .mp-timeline dl, .mp-timeline dt, .mp-timeline dd { margin: 0; } | ||
.mp-timeline dd { opacity: 0.8; } | |||
.mp-timeline dd:before { content: "– "; } | |||
/* 平台版本行 */ | |||
.mp-platform-wrapper { | |||
display: flex; | |||
flex-wrap: wrap; | |||
justify-content: center; | |||
gap: 6px; | |||
} | } | ||
. | .mp-platform { | ||
min-width: 300px; | |||
display: flex; | |||
gap: 5px; | |||
align-items: center; | |||
} | } | ||
2026年5月9日 (六) 17:53的版本
/* =============================================
OUTREX 风格首页组件(浅色直角版)
复用自 Minecraft Wiki/styles.css
============================================= */
/* ── 全局盒模型 ── */
.mp-wrapper *,
.mp-wrapper *::before,
.mp-wrapper *::after {
box-sizing: border-box;
}
.mp-wrapper {
display: flex;
flex-wrap: wrap;
width: 100%;
gap: 6px;
}
/* ── 两栏网格 ── */
.mp-inline-sections {
display: grid;
grid-template-columns: 1fr;
grid-template-areas: "site" "left" "right";
gap: 6px;
width: 100%;
}
.mp-section-site { grid-area: site; }
.mp-left { grid-area: left; }
.mp-right { grid-area: right; }
@media screen and (min-width: 990px) {
.mp-inline-sections {
grid-template-columns: 2fr 1fr;
grid-template-rows: auto 1fr;
grid-template-areas: "left site" "left right";
}
}
.mp-left, .mp-right {
display: flex;
flex-direction: column;
gap: 6px;
}
.mp-right > :last-child { flex: 1; }
/* 粘性侧边栏 */
.mp-sticky {
position: sticky;
top: 20px;
}
.skin-citizen .mp-sticky {
top: calc(var(--citizen-header-height, 56px) + 20px);
}
/* ── 卡片(直角、内阴影浮雕感)── */
.mp-section {
border: 2px solid #bbb;
background-color: #fcfcfc;
box-shadow: inset -2px -2px #0000000f, inset 2px 2px #ffffff0d;
padding: 12px;
}
.mp-wrapper > .mp-section { width: 100%; }
.mp-section.mp-section-full { width: 100%; }
.mp-section-center { text-align: center; }
/* 标题 */
.mp-wrapper h2 {
font-family: revert;
font-weight: bold;
font-size: 1.2em;
}
.mp-title {
border: none;
margin: 0;
padding: 0 !important;
}
/* ── 高亮卡片(图片背景)── */
.mp-highlight-wrapper {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.mp-highlight {
flex: 1 1 0;
min-width: 280px;
min-height: calc(150px + 5vh);
max-height: 300px;
position: relative;
padding: 0;
overflow: hidden;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
background-color: #2a5a2a;
box-shadow: inset -4px -4px #0000003d, inset 4px 4px #fff2;
color: #fff !important;
font-size: small;
text-shadow: 1px 1px 4px #000;
}
.mp-highlight *:not(a) { color: #fff !important; }
.mp-highlight a { color: #bed9ff !important; }
.mp-highlight-image {
position: absolute;
inset: 0;
overflow: hidden;
}
.mp-highlight-image img {
object-fit: cover;
width: 100%;
height: 100%;
max-height: 300px;
}
.mp-highlight-top-description {
background: linear-gradient(180deg, #0008 24px, transparent);
padding: 12px;
position: absolute;
top: 0;
width: 100%;
}
.mp-highlight-bottom-description {
background: linear-gradient(to top, #0008 50%, transparent);
padding: 0 12px 10px;
position: absolute;
bottom: 0;
width: 100%;
}
/* ── 按钮(3D 按压效果)── */
.mp-wrapper {
--button-color: #ebebeb;
--button-color-progressive: #3a971e;
--button-text-color: #202122;
--button-border-color: rgba(0,0,0,0.4);
}
.mp-button {
width: 100%;
gap: 6px;
cursor: pointer;
position: relative;
text-align: center;
background-color: var(--button-color);
color: var(--button-text-color);
border: 2px solid var(--button-border-color);
font-size: 1em;
font-weight: bold;
transition: all 0.1s;
}
.mp-button.mp-button-progressive {
background-color: var(--button-color-progressive);
--button-text-color: #fff;
}
body.mediawiki .mp-button > * {
width: calc(100% + 4px);
height: calc(100% + 4px);
margin: -2px;
color: var(--button-text-color) !important;
text-decoration: none;
display: flex;
gap: 6px;
padding: 8px 10px 14px !important;
align-items: center;
justify-content: center;
}
.mp-button::after {
display: block;
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
box-shadow: 0 -6px 0 0 #686868 inset,
2px 2px 0 0 rgba(178,178,178,0.5) inset,
-2px -8px 0 0 rgba(153,153,153,0.5) inset;
mix-blend-mode: hard-light;
transition: 0.1s;
pointer-events: none;
}
.mp-button:active::after {
box-shadow: 2px 2px 0 0 rgba(178,178,178,0.5) inset,
-2px -2px 0 0 rgba(153,153,153,0.5) inset;
background-color: #0000001a;
}
.mp-button:hover:not(:active)::after {
background-color: #ffffff1a;
}
body.mediawiki .mp-button:active > * {
padding: 14px 10px 8px !important;
margin-top: -8px;
height: calc(100% + 10px);
}
.mp-button:active {
margin-top: 6px;
}
/* 按钮组 */
.mp-button-wrapper {
display: flex;
flex-wrap: wrap;
gap: 4px;
}
.mp-button-wrapper .mp-button {
flex: 1 0 0;
white-space: nowrap;
}
/* 折叠按钮(不需要折叠功能可省略) */
/* ... 保留原样会很长,如需请告知,我先不贴 */
/* 社交图标栏 */
.mp-social-wrapper {
display: grid;
grid-auto-columns: minmax(0, 1fr);
grid-auto-flow: column;
gap: 4px;
}
.mp-button.mp-social-qq { background-color: #1ebafc; --button-text-color: #fff; }
.mp-button.mp-social-kook { background-color: #5865f2; --button-text-color: #fff; }
.mp-button.mp-social-web { background-color: #3a971e; --button-text-color: #fff; }
/* 图标网格 */
.mp-icon-wrapper {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 8px;
--icon-base-width: 90px;
--icon-max-width: 200px;
}
.mp-icon {
flex: 1 auto;
width: var(--icon-base-width);
max-width: var(--icon-max-width);
display: flex;
flex-direction: column;
}
.mp-icon-link {
flex: 1;
margin: -2px 0 0;
font-size: 14px;
}
.mp-icon-img {
display: flex;
align-items: center;
justify-content: center;
background-color: #00000030;
box-shadow: inset 0 4px #00000030, inset 0 -4px #ffffff40;
border: 2px solid rgba(0,0,0,0.4);
}
.mp-icon-img a { padding: 12px; display: block; }
.mp-icon-img img {
width: 60px !important;
height: 60px !important;
filter: drop-shadow(2px 2px 1px #00000030);
object-fit: contain;
}
.mp-icon:active .mp-icon-img { padding-bottom: 6px; }
/* 响应式缩小 */
@media screen and (max-width: 950px) {
.mp-icon-link { font-size: 12px; }
.mp-icon-img a { padding: 6px; }
.mp-icon-img img { width: 40px !important; height: 40px !important; }
}
/* 时间线 */
.mp-timeline {
display: flex;
flex-direction: column;
margin-left: 10px;
}
.mp-timeline dl {
padding-left: 15px;
border-left: 2px solid #bbb;
display: flex;
gap: 0 0.5em;
flex-wrap: wrap;
align-content: center;
max-height: 60px;
}
.mp-timeline dl:not(:last-child) { padding-bottom: 8px; }
.mp-timeline dt { position: relative; }
.mp-timeline dl > dt::before {
content: "";
position: absolute;
left: -23px;
top: 4px;
width: 14px;
height: 14px;
background-color: var(--button-color-progressive);
border: 2px solid #202122;
}
.mp-timeline dl, .mp-timeline dt, .mp-timeline dd { margin: 0; }
.mp-timeline dd { opacity: 0.8; }
.mp-timeline dd:before { content: "– "; }
/* 平台版本行 */
.mp-platform-wrapper {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 6px;
}
.mp-platform {
min-width: 300px;
display: flex;
gap: 5px;
align-items: center;
}