打开/关闭菜单
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

Template:Main page/shared/styles.css:修订间差异

模板页面
Creating Main Page elements
 
Update to new Style
 
(未显示同一用户的1个中间版本)
第1行: 第1行:
/* 卡车模拟中文维基首页
* 内容模型必须设置为“净化的 CSS / Sanitized CSS”。
*/
:root {
--home-accent: #d89b24;
--home-accent-soft: rgba(216, 155, 36, 0.14);
--home-surface: var(--background-color-base, #fff);
--home-surface-alt: var(--background-color-neutral-subtle, #f8f9fa);
--home-text: var(--color-base, #202122);
--home-muted: var(--color-subtle, #54595d);
--home-border: var(--border-color-base, #a2a9b1);
--home-border-subtle: var(--border-color-subtle, #eaecf0);
--home-radius: 12px;
--home-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}
.home-page,
.home-page * {
box-sizing: border-box;
}
.home-page {
max-width: 1440px;
margin: 0 auto;
color: var(--home-text);
}
.home-page a {
text-decoration: none;
}
.home-page a:hover {
text-decoration: none;
}
.home-grid {
.home-grid {
display: grid;
display: grid;
grid-template-columns: repeat(12, minmax(0, 1fr));
grid: auto-flow dense/repeat( auto-fit, minmax( 9.375rem, 1fr ) );
gap: 16px;
grid-auto-rows: minmax( 3rem, auto );
grid-gap: var( --space-xs );
}
}


.home-header {
.home-grid--col2 {
position: relative;
grid-template-columns: 1fr 1fr;
min-height: 390px;
margin-bottom: 14px;
overflow: hidden;
border-radius: 0 0 18px 18px;
background: #111820;
color: #fff;
}
}


.home-header__backdrop,
.home-grid a.external {
.home-header__backdrop .mw-file-description,
background-image: none;
.home-header__backdrop .mw-file-element {
position: absolute;
inset: 0;
display: block;
width: 100%;
height: 100%;
}
}


.home-header__backdrop .mw-file-element {
.home-badge {
object-fit: cover;
display: flex;
object-position: center 58%;
    gap: var(--space-xxs);
font-size: var(--font-size-x-small);
    padding: var(--space-xxs) var(--space-xs);
    background: var(--color-surface-2);
    color: var(--color-base);
    border-radius: var(--border-radius-base);
    font-weight: var(--font-weight-normal);
    letter-spacing: 0.025em;
    line-height: var(--line-height-xxx-small);
}
}


.home-header__shade {
.home-card {
position: absolute;
inset: 0;
background:
linear-gradient(90deg, rgba(7, 11, 15, 0.94) 0%, rgba(7, 11, 15, 0.75) 43%, rgba(7, 11, 15, 0.2) 76%, rgba(7, 11, 15, 0.35) 100%),
linear-gradient(0deg, rgba(7, 11, 15, 0.75) 0%, transparent 55%);
}
 
.home-header__content {
position: relative;
position: relative;
z-index: 1;
padding: var( --space-md );
display: flex;
border: 1px solid var( --border-color-base );
min-height: 390px;
background: var( --color-surface-1 );
max-width: 760px;
border-radius: var( --border-radius-medium );
padding: 68px 56px 48px;
font-size: var( --font-size-small );
flex-direction: column;
justify-content: center;
}
}


.home-header__eyebrow,
.home-card table.timeline {
.home-section-heading__eyebrow,
margin-top: var( --space-xs );
.home-card__label,
.home-button__eyebrow {
font-size: 0.78rem;
font-weight: 700;
letter-spacing: 0.12em;
text-transform: uppercase;
}
}


.home-header__eyebrow {
.home-card--col2 {
margin-bottom: 8px;
grid-column: span 2;
color: #f1be59;
}
 
.home-header__title {
font-size: clamp(2.25rem, 5vw, 4.25rem);
font-weight: 800;
letter-spacing: -0.045em;
line-height: 1.02;
}
 
.home-header__subtitle {
max-width: 680px;
margin-top: 16px;
color: rgba(255, 255, 255, 0.82);
font-size: 1.05rem;
line-height: 1.75;
}
 
.home-search {
max-width: 620px;
margin-top: 28px;
}
 
.home-search form {
display: flex;
gap: 8px;
}
 
.home-search .mw-inputbox-input {
min-width: 0;
height: 44px;
padding: 0 15px;
flex: 1;
border: 1px solid rgba(255, 255, 255, 0.28);
border-radius: 8px;
background: rgba(255, 255, 255, 0.12);
box-shadow: none;
color: #fff;
backdrop-filter: blur(10px);
}
 
.home-search .mw-inputbox-input::placeholder {
color: rgba(255, 255, 255, 0.68);
}
 
.home-search .mw-ui-button,
.home-search input[type="submit"] {
height: 44px;
padding: 0 20px;
border: 0;
border-radius: 8px;
background: var(--home-accent);
color: #17120a;
font-weight: 700;
}
 
.home-status {
align-items: stretch;
margin-bottom: 30px;
padding: 0 18px;
border: 1px solid var(--home-border-subtle);
border-radius: var(--home-radius);
background: var(--home-surface);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}
}


.home-status__cell {
.home-card--row3 {
display: flex;
grid-row: span 3;
min-height: 64px;
padding: 12px 18px;
grid-column: span 3;
align-items: center;
gap: 12px;
border-left: 1px solid var(--home-border-subtle);
font-size: 1rem;
font-weight: 700;
}
}


.home-status__cell--label {
.home-card--row4 {
grid-column: span 2;
grid-row: span 4;
border-left: 0;
color: var(--home-muted);
font-size: 0.8rem;
letter-spacing: 0.12em;
text-transform: uppercase;
}
}


.home-status__cell--event {
.home-card--row8 {
grid-column: span 4;
grid-row: span 8 / auto;
}
}


.home-status__game {
.home-card__badge,
display: inline-flex;
.home-card__label {
min-width: 46px;
color: var( --color-subtle );
height: 26px;
font-size: var( --font-size-x-small );
padding: 0 8px;
align-items: center;
justify-content: center;
border-radius: 5px;
background: var(--home-accent-soft);
color: #976711;
font-size: 0.72rem;
font-weight: 800;
letter-spacing: 0.05em;
letter-spacing: 0.05em;
}
}


.home-navigation {
.home-card__badge {
margin: 0 0 32px;
padding: var( --space-xxs ) var( --space-xs );
border-radius: var( --border-radius-base );
background: var( --color-surface-2 );
}
}
.home-section-heading {
display: flex;
margin-bottom: 14px;
align-items: flex-end;
justify-content: space-between;
gap: 20px;
}
.home-section-heading__eyebrow,
.home-card__label,
.home-button__eyebrow {
color: #a36e13;
}
.home-section-heading__title {
margin-top: 2px;
font-size: 1.55rem;
font-weight: 800;
letter-spacing: -0.02em;
}
.home-section-heading__more {
font-size: 0.9rem;
}
.home-nav-grid {
display: grid;
grid-template-columns: repeat(6, minmax(0, 1fr));
gap: 10px;
}
.home-nav__item > a {
display: flex;
min-height: 78px;
padding: 14px;
align-items: center;
gap: 12px;
border: 1px solid var(--home-border-subtle);
border-radius: 10px;
background: var(--home-surface);
color: var(--home-text);
transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.home-nav__item > a:hover {
transform: translateY(-2px);
border-color: var(--home-accent);
box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}
.home-nav__code {
display: inline-flex;
width: 42px;
height: 42px;
flex: 0 0 42px;
align-items: center;
justify-content: center;
border-radius: 8px;
background: var(--home-accent-soft);
color: #986711;
font-size: 0.7rem;
font-weight: 800;
letter-spacing: 0.06em;
}
.home-nav__text {
display: flex;
min-width: 0;
flex-direction: column;
}
.home-nav__text strong {
font-size: 0.98rem;
}
.home-nav__text small,
.home-project__content small,
.home-topic-list__item small,
.home-patch small {
margin-top: 2px;
color: var(--home-muted);
font-size: 0.78rem;
font-weight: 400;
line-height: 1.35;
}
.home-card {
position: relative;
min-width: 0;
overflow: hidden;
padding: 22px;
border: 1px solid var(--home-border-subtle);
border-radius: var(--home-radius);
background: var(--home-surface);
box-shadow: 0 4px 18px rgba(0, 0, 0, 0.045);
}
.home-card--col3 { grid-column: span 3; }
.home-card--col4 { grid-column: span 4; }
.home-card--col5 { grid-column: span 5; }
.home-card--col8 { grid-column: span 8; }
.home-card--row3 { min-height: 280px; }
.home-card--row4 { min-height: 370px; }


.home-card__header {
.home-card__header {
margin-top: 7px;
color: var( --color-emphasized );
font-size: 1.35rem;
font-size: 1rem;
font-weight: 800;
    font-weight: var( --font-weight-semi-bold );
letter-spacing: -0.02em;
    line-height: var( --line-height-xxx-small );
line-height: 1.25;
}
 
.home-card__description {
margin-top: 10px;
color: var(--home-muted);
line-height: 1.65;
}
}


.home-card__actions {
.home-card__header a {
display: flex;
display: flex;
margin-top: 18px;
flex-wrap: wrap;
gap: 8px;
}
.home-action > a,
.home-action--quiet > a {
display: inline-flex;
min-height: 36px;
padding: 7px 13px;
align-items: center;
align-items: center;
border-radius: 7px;
justify-content: space-between;
font-size: 0.88rem;
font-weight: 700;
}
}


.home-action > a {
.home-card__header a:after {
background: var(--home-accent);
content: '▶';
color: #17120a;
font-size: var( --font-size-x-small );
}
}


.home-action--quiet > a {
.home-card__background {
border: 1px solid var(--home-border-subtle);
position: absolute;
background: var(--home-surface-alt);
inset: 0;
color: var(--home-text);
}
}


.home-card--featured {
.home-card__background:after {
padding: 0;
position: absolute;
background: #111820;
    pointer-events: none;
color: #fff;
inset: 0;
    display: block;
    background: linear-gradient(to right,#000,transparent);
    content: "";
    transition: transform 250ms ease;
}
}


.home-featured__media,
.home-card__background picture,
.home-featured__media .mw-file-description,
.home-card__background img {
.home-featured__media .mw-file-element {
position: absolute;
inset: 0;
display: block;
width: 100%;
width: 100%;
height: 100%;
height: 100%;
}
}


.home-featured__media .mw-file-element {
.home-card__background img {
object-fit: cover;
object-fit: cover;
object-position: center;
}
}


.home-featured__shade {
.home-card__foreground {
position: absolute;
position: absolute;
inset: 0;
top: 0;
background: linear-gradient(0deg, rgba(5, 8, 11, 0.96) 0%, rgba(5, 8, 11, 0.55) 48%, rgba(5, 8, 11, 0.08) 100%);
bottom: 0;
}
 
.home-featured__content {
position: absolute;
z-index: 1;
left: 0;
left: 0;
right: 0;
right: 0;
bottom: 0;
padding: var( --space-md );
padding: 30px;
}
 
.home-featured__content .home-card__label {
color: #f1be59;
}
 
.home-featured__title {
margin-top: 6px;
font-size: clamp(1.8rem, 3vw, 2.7rem);
font-weight: 800;
letter-spacing: -0.035em;
}
 
.home-featured__title a,
.home-featured__link a {
color: #fff;
}
 
.home-featured__description {
max-width: 760px;
margin-top: 9px;
color: rgba(255, 255, 255, 0.8);
line-height: 1.6;
}
 
.home-featured__link {
margin-top: 16px;
font-weight: 700;
}
 
.home-topic-list,
.home-link,
.home-project-list,
.home-patch-list {
display: flex;
display: flex;
margin-top: 16px;
flex-direction: column;
flex-direction: column;
gap: 8px;
justify-content: center;
gap: var( --space-xxs );
color: #fff;
line-height: var( --line-height-xxx-small );
pointer-events: none;
}
}


.home-topic-list__item {
.home-card__foreground .home-card__badge {
display: flex;
position: absolute;
padding: 9px 0;
    top: 0;
flex-direction: column;
    right: 0;
border-top: 1px solid var(--home-border-subtle);
    border-top-left-radius: 0;
    border-bottom-right-radius: 0;
}
}


.home-topic-list__item:first-child {
.home-card__foreground .home-card__header {
border-top: 0;
color: #fff;
}
}


.home-topic-list__item > a {
.home-card__foreground .home-card__label {
font-weight: 700;
color: #bababa;
}
}


.home-stat-grid {
.home-card p {
display: grid;
margin-top: var( --space-xs );
margin-top: 22px;
font-size: var( --font-size-small );
grid-template-columns: repeat(3, 1fr);
gap: 8px;
}
}


.home-stat {
.home-card.home-card--button {
display: flex;
overflow: hidden;
padding: 13px 10px;
padding: 0;
flex-direction: column;
border: 0;
border-radius: 8px;
background: var(--home-surface-alt);
}
 
.home-stat strong {
font-size: 1.3rem;
}
 
.home-stat span {
margin-top: 2px;
color: var(--home-muted);
font-size: 0.75rem;
}
}


.home-link__button > a {
.home-card--button a {
display: flex;
display: flex;
min-height: 38px;
height: 100%;
padding: 8px 11px;
justify-content: center;
align-items: center;
align-items: center;
justify-content: space-between;
padding: 0 var( --space-md );
border: 1px solid var(--home-border-subtle);
background: transparent;
border-radius: 7px;
background: var(--home-surface-alt);
color: var(--home-text);
font-size: 0.88rem;
font-weight: 650;
}
 
.home-link__button > a::after {
content: "→";
color: var(--home-muted);
}
 
.home-patch {
display: grid;
padding: 12px 0;
grid-template-columns: 48px minmax(0, 1fr);
gap: 12px;
border-top: 1px solid var(--home-border-subtle);
}
 
.home-patch:first-child {
border-top: 0;
}
 
.home-patch__game,
.home-project__code {
display: inline-flex;
height: 34px;
align-items: center;
justify-content: center;
border-radius: 6px;
background: #202932;
color: #fff;
color: #fff;
font-size: 0.7rem;
font-weight: var( --font-weight-medium );
font-weight: 800;
letter-spacing: 0.05em;
}
 
.home-patch > div,
.home-project__content {
display: flex;
min-width: 0;
flex-direction: column;
}
}


.home-card--button {
.home-card--button .home-card__background a {
min-height: 108px;
padding: 0;
padding: 0;
background: #171d23;
}
.home-card--button > a {
display: flex;
min-height: 108px;
padding: 20px;
flex-direction: column;
justify-content: center;
color: #fff;
transition: background 140ms ease, transform 140ms ease;
}
.home-card--button > a:hover {
background: rgba(216, 155, 36, 0.16);
}
.home-button__eyebrow {
color: #f1be59;
}
}


.home-button__title {
.home-card--button img {
margin-top: 5px;
transition: transform 250ms ease;
font-size: 1.05rem;
font-weight: 750;
}
}


.home-card--highlight {
.home-card--button:hover img {
background:
transform: scale( 1.1 );
linear-gradient(135deg, var(--home-accent-soft), transparent 65%),
var(--home-surface);
}
}


.home-project {
.home-link {
display: grid;
display: grid;
padding: 12px 0;
margin-top: var( --space-xs );
grid-template-columns: 52px minmax(0, 1fr);
font-size: var( --font-size-small );
gap: 12px;
font-weight: var( --font-weight-medium );
border-top: 1px solid var(--home-border-subtle);
grid-gap: var( --space-xs );
text-align: center;
}
}


.home-project:first-child {
.home-link__button {
border-top: 0;
display: flex;
}
}


.home-footer {
.home-link__button a {
display: flex;
flex-grow: 1;
padding: 24px 4px 8px;
padding: var( --space-xs );
justify-content: flex-end;
border: 1px solid var( --border-color-base );
gap: 8px;
background: var( --color-surface-2 );
color: var(--home-muted);
border-radius: var( --border-radius-medium );
font-size: 0.78rem;
color: var( --color-emphasized ) !important;
    line-height: var( --line-height-xxx-small );
    text-decoration: none !important;
}
}


/* Vector 等皮肤通常会给首页附加默认标题;若首页仍出现重复 H1,可在
.home-link__button a:hover {
* MediaWiki:Common.css 中按首页 body class 单独隐藏,而不要全站隐藏。
background: var( --color-surface-2--hover );
*/
 
@media (max-width: 1100px) {
.home-nav-grid {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
 
.home-card--col3,
.home-card--col4,
.home-card--col5,
.home-card--col8 {
grid-column: span 6;
}
 
.home-status__cell--label {
grid-column: span 3;
}
 
.home-status__cell,
.home-status__cell--event {
grid-column: span 3;
}
}
}


@media (max-width: 720px) {
.home-link__button a:active {
.home-header,
background: var( --color-surface-2--active );
.home-header__content {
min-height: 430px;
}
 
.home-header {
border-radius: 0 0 14px 14px;
}
 
.home-header__content {
padding: 54px 24px 36px;
justify-content: flex-end;
}
 
.home-header__shade {
background: linear-gradient(0deg, rgba(7, 11, 15, 0.97) 0%, rgba(7, 11, 15, 0.68) 62%, rgba(7, 11, 15, 0.3) 100%);
}
 
.home-search form {
flex-direction: column;
}
 
.home-search .mw-ui-button,
.home-search input[type="submit"] {
width: 100%;
}
 
.home-status {
padding: 0;
}
 
.home-status__cell,
.home-status__cell--label,
.home-status__cell--event {
min-height: 54px;
grid-column: 1 / -1;
border-top: 1px solid var(--home-border-subtle);
border-left: 0;
}
 
.home-status__cell--label {
border-top: 0;
}
 
.home-section-heading {
align-items: flex-start;
flex-direction: column;
gap: 6px;
}
 
.home-nav-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
 
.home-nav__item > a {
min-height: 104px;
align-items: flex-start;
flex-direction: column;
}
 
.home-card--col3,
.home-card--col4,
.home-card--col5,
.home-card--col8 {
grid-column: 1 / -1;
}
 
.home-card--row3,
.home-card--row4 {
min-height: auto;
}
 
.home-card--featured {
min-height: 390px;
}
 
.home-featured__content {
padding: 24px;
}
 
.home-stat-grid {
grid-template-columns: 1fr;
}
 
.home-footer {
justify-content: flex-start;
flex-wrap: wrap;
}
}
}


@media (max-width: 430px) {
#home-content {
.home-nav-grid {
margin-top: var( --space-lg );
grid-template-columns: 1fr;
}
 
.home-nav__item > a {
min-height: 74px;
align-items: center;
flex-direction: row;
}
}
}


/* MediaWiki 1.41+ 夜间模式 */
.home-card .template-statsbar {
html.skin-theme-clientpref-night {
margin: 0;
--home-surface: #202122;
--home-surface-alt: #27292d;
--home-text: #eaecf0;
--home-muted: #c8ccd1;
--home-border: #54595d;
--home-border-subtle: #3b3d42;
--home-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}
}


@media (prefers-color-scheme: dark) {
.home-footer {
html.skin-theme-clientpref-os {
font-size: var( --font-size-small );
--home-surface: #202122;
font-family: var( --font-family-monospace );
--home-surface-alt: #27292d;
text-align: center;
--home-text: #eaecf0;
--home-muted: #c8ccd1;
--home-border: #54595d;
--home-border-subtle: #3b3d42;
--home-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}
}
}

2026年7月15日 (三) 04:52的最新版本

.home-grid {
	display: grid;
	grid: auto-flow dense/repeat( auto-fit, minmax( 9.375rem, 1fr ) );
	grid-auto-rows: minmax( 3rem, auto );
	grid-gap: var( --space-xs );
}

.home-grid--col2 {
	grid-template-columns: 1fr 1fr;
}

.home-grid a.external {
	background-image: none;
}

.home-badge {
	display: flex;
    gap: var(--space-xxs);
	font-size: var(--font-size-x-small);
    padding: var(--space-xxs) var(--space-xs);
    background: var(--color-surface-2);
    color: var(--color-base);
    border-radius: var(--border-radius-base);
    font-weight: var(--font-weight-normal);
    letter-spacing: 0.025em;
    line-height: var(--line-height-xxx-small);
}

.home-card {
	position: relative;
	padding: var( --space-md );
	border: 1px solid var( --border-color-base );
	background: var( --color-surface-1 );
	border-radius: var( --border-radius-medium );
	font-size: var( --font-size-small );
}

.home-card table.timeline {
	margin-top: var( --space-xs );
}

.home-card--col2 {
	grid-column: span 2;
}

.home-card--row3 {
	grid-row: span 3;
}

.home-card--row4 {
	grid-row: span 4;
}

.home-card--row8 {
	grid-row: span 8 / auto;
}

.home-card__badge,
.home-card__label {
	color: var( --color-subtle );
	font-size: var( --font-size-x-small );
	letter-spacing: 0.05em;
}

.home-card__badge {
	padding: var( --space-xxs ) var( --space-xs );
	border-radius: var( --border-radius-base );
	background: var( --color-surface-2 );
}

.home-card__header {
	color: var( --color-emphasized );
	font-size: 1rem;
    font-weight: var( --font-weight-semi-bold );
    line-height: var( --line-height-xxx-small );
}

.home-card__header a {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.home-card__header a:after {
	content: '▶';
	font-size: var( --font-size-x-small );
}

.home-card__background {
	position: absolute;
	inset: 0;
}

.home-card__background:after {
	position: absolute;
    pointer-events: none;
	inset: 0;
    display: block;
    background: linear-gradient(to right,#000,transparent);
    content: "";
    transition: transform 250ms ease;
}

.home-card__background picture,
.home-card__background img {
	width: 100%;
	height: 100%;
}

.home-card__background img {
	object-fit: cover;
	object-position: center;
}

.home-card__foreground {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	padding: var( --space-md );
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: var( --space-xxs );
	color: #fff;
	line-height: var( --line-height-xxx-small );
	pointer-events: none;
}

.home-card__foreground .home-card__badge {
	position: absolute;
    top: 0;
    right: 0;
    border-top-left-radius: 0;
    border-bottom-right-radius: 0;
}

.home-card__foreground .home-card__header {
	color: #fff;
}

.home-card__foreground .home-card__label {
	color: #bababa;
}

.home-card p {
	margin-top: var( --space-xs );
	font-size: var( --font-size-small );
}

.home-card.home-card--button {
	overflow: hidden;
	padding: 0;
	border: 0;
}

.home-card--button a {
	display: flex;
	height: 100%;
	justify-content: center;
	align-items: center;
	padding: 0 var( --space-md );
	background: transparent;
	color: #fff;
	font-weight: var( --font-weight-medium );
}

.home-card--button .home-card__background a {
	padding: 0;
}

.home-card--button img {
	transition: transform 250ms ease;
}

.home-card--button:hover img {
	transform: scale( 1.1 );
}

.home-link {
	display: grid;
	margin-top: var( --space-xs );
	font-size: var( --font-size-small );
	font-weight: var( --font-weight-medium );
	grid-gap: var( --space-xs );
	text-align: center;
}

.home-link__button {
	display: flex;
}

.home-link__button a {
	flex-grow: 1;
	padding: var( --space-xs );
	border: 1px solid var( --border-color-base );
	background: var( --color-surface-2 );
	border-radius: var( --border-radius-medium );
	color: var( --color-emphasized ) !important;
    line-height: var( --line-height-xxx-small );
    text-decoration: none !important;
}

.home-link__button a:hover {
	background: var( --color-surface-2--hover );
}

.home-link__button a:active {
	background: var( --color-surface-2--active );
}

#home-content {
	margin-top: var( --space-lg );
}

.home-card .template-statsbar {
	margin: 0;
}

.home-footer {
	font-size: var( --font-size-small );
	font-family: var( --font-family-monospace );
	text-align: center;
}