MediaWiki:Common.css: Difference between revisions
MediaWiki interface page
More actions
Git release d6198d1100ee |
Git release 3798ad2f6f3b |
||
| Line 173: | Line 173: | ||
margin: 1.75rem 0 2.5rem; | margin: 1.75rem 0 2.5rem; | ||
scroll-margin-top: 5rem; | scroll-margin-top: 5rem; | ||
} | |||
.lcd-module__intro { | |||
max-width: 58rem; | |||
margin: -.25rem 0 1rem; | |||
color: var(--lcd-muted); | |||
font-size: 1rem; | |||
line-height: 1.65; | |||
} | } | ||
Revision as of 23:14, 26 July 2026
:root {
--lcd-blue: #63b7e8;
--lcd-blue-dark: #258ac4;
--lcd-ink: #233245;
--lcd-muted: #66758a;
--lcd-line: #dfe7ef;
--lcd-panel: #f6f9fc;
}
.mw-body-content {
color: var(--lcd-ink);
}
/* Keep the active table-of-contents state aligned with module title bars. */
.citizen-toc .citizen-toc-list-item--active > .citizen-toc-link {
color: #34b0b0;
}
.citizen-toc .citizen-toc-indicator {
background-color: #34b0b0;
}
/* 精简 Citizen 主菜单,仅保留 Sidebar 中的三个核心入口。 */
#citizen-main-menu #p-navigation > .citizen-menu__heading,
#citizen-main-menu #t-specialpages,
#citizen-main-menu #t-upload {
display: none;
}
/* Hide the Citizen main-menu toggle and drawer on every page. */
.citizen-drawer.citizen-header__item {
display: none !important;
}
/* 隐藏所有页面底部的页面信息、操作栏和完整站点页脚。 */
.citizen-page-footer,
.citizen-page-actions,
.mw-footer.citizen-footer {
display: none !important;
}
/* 首页模块标题不显示章节编辑入口,后台和其他页面编辑功能保持不变。 */
body.page-Main_Page .mw-editsection {
display: none !important;
}
/* 产品二级页:隐藏章节编辑入口及滚动后的粘性操作按钮组。 */
body:has(.lcd-product__hero) .mw-editsection,
body:has(.lcd-product__hero) .citizen-sticky-header-end {
display: none !important;
}
/* Product detail pages: remove the site tagline and publication badge without placeholders. */
body:has(.lcd-product__hero) #siteSub,
body:has(.lcd-product__hero) .citizen-sticky-header-page-tagline,
body:has(.lcd-product__hero) .lcd-product__status {
display: none !important;
}
/*
* 首页桌面版式:将 Citizen 的页面信息与目录侧栏放到正文左侧,
* 并限制整体版心宽度,在宽屏上保留对称留白。
*/
@media (min-width: 1200px) {
body.page-Main_Page .citizen-body-container {
width: min(100%, 91.5rem);
margin-inline: auto;
grid-template-columns: minmax(12rem, 15rem) minmax(0, 67.5rem);
column-gap: 5rem;
grid-template-areas:
"sidebar content"
"footer footer";
justify-content: center;
}
body.page-Main_Page
.citizen-page-sidebar
.citizen-toc-link:not(.citizen-toc-top) {
height: auto;
min-height: 2rem;
overflow: hidden;
white-space: normal;
overflow-wrap: anywhere;
text-overflow: clip;
}
}
.lcd-home-carousel {
position: relative;
aspect-ratio: 4 / 1;
margin: 1rem 0 2rem;
overflow: hidden;
border: 1px solid var(--lcd-line);
border-radius: 12px;
background: #fff;
box-shadow: 0 2px 8px rgba(38, 68, 94, .1);
}
.lcd-home-carousel__viewport,
.lcd-home-carousel__slide,
.lcd-home-carousel__slide > p,
.lcd-home-carousel__slide .mw-file-element {
width: 100%;
height: 100%;
}
.lcd-home-carousel__viewport {
position: relative;
}
.lcd-home-carousel__slide {
position: absolute;
inset: 0;
visibility: hidden;
opacity: 0;
transition: visibility 0s linear .4s, opacity .4s ease;
}
.lcd-home-carousel__slide--active {
visibility: visible;
opacity: 1;
transition-delay: 0s;
}
.lcd-home-carousel__slide > p {
margin: 0;
}
.lcd-home-carousel__slide .mw-file-element {
display: block;
object-fit: contain;
}
.lcd-home-carousel__dots {
position: absolute;
z-index: 2;
bottom: clamp(.4rem, 1.1vw, .75rem);
left: 50%;
display: flex;
gap: .55rem;
align-items: center;
padding: .3rem .45rem;
transform: translateX(-50%);
}
.lcd-home-carousel__dot {
width: .68rem;
height: .68rem;
padding: 0;
border: 1px solid rgba(35, 50, 69, .38);
border-radius: 50%;
background: rgba(255, 255, 255, .88);
box-shadow: 0 1px 3px rgba(35, 50, 69, .28);
cursor: pointer;
}
.lcd-home-carousel__dot[aria-current="true"] {
border-color: #237f7f;
background: #34b0b0;
}
.lcd-home-carousel__dot:focus-visible {
outline: 2px solid #fff;
outline-offset: 2px;
}
.lcd-home-carousel__viewport > p,
.lcd-home-carousel > p {
display: none;
}
.lcd-module {
margin: 1.75rem 0 2.5rem;
scroll-margin-top: 5rem;
}
.lcd-module__intro {
max-width: 58rem;
margin: -.25rem 0 1rem;
color: var(--lcd-muted);
font-size: 1rem;
line-height: 1.65;
}
.lcd-module__tab {
margin: 0 0 1rem;
padding: .68rem 1rem;
border-radius: 5px;
background: #34b0b0;
color: #fff;
font-size: 1.05rem;
font-weight: 700;
text-align: center;
letter-spacing: .02em;
}
.lcd-card-grid {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 1.1rem;
}
.lcd-card-grid > p {
display: none;
}
.lcd-card {
min-width: 0;
overflow: hidden;
border: 1px solid var(--lcd-line);
border-radius: 8px;
background: #fff;
box-shadow: 0 2px 7px rgba(38, 68, 94, .11);
transition: transform .16s ease, box-shadow .16s ease;
}
.lcd-card:hover {
transform: translateY(-2px);
box-shadow: 0 7px 18px rgba(38, 68, 94, .16);
}
.lcd-card__media {
display: flex;
aspect-ratio: 4 / 3;
align-items: center;
justify-content: center;
padding: .65rem;
background: #f8fafc;
}
.lcd-card__media a,
.lcd-card__media .mw-file-description {
display: contents;
}
.lcd-card__media img {
width: 100%;
height: 100%;
object-fit: contain;
}
.lcd-card__body {
padding: .85rem .8rem .95rem;
text-align: center;
}
.lcd-card__title {
min-height: 2.7em;
line-height: 1.35;
font-weight: 600;
}
.lcd-card__title a {
color: var(--lcd-ink);
}
.lcd-card__model {
margin-top: .35rem;
color: #27384b;
font-weight: 800;
overflow-wrap: anywhere;
}
.lcd-product__hero {
display: grid;
grid-template-columns: minmax(15rem, .8fr) minmax(0, 1.2fr);
gap: 1.5rem;
margin: 1rem 0 2rem;
padding: 1.25rem;
border: 1px solid var(--lcd-line);
border-radius: 10px;
background: var(--lcd-panel);
}
.lcd-product__summary {
align-self: center;
}
.lcd-product__kicker {
color: #34b0b0;
font-weight: 700;
}
.lcd-product__model {
margin: .35rem 0 .6rem;
color: var(--lcd-ink);
font-size: clamp(1.35rem, 3vw, 2rem);
font-weight: 800;
}
.lcd-product__status {
margin-bottom: .85rem;
}
.lcd-product__gallery {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: .75rem;
}
.lcd-product__gallery > div {
display: flex;
min-width: 0;
aspect-ratio: 4 / 3;
align-items: center;
justify-content: center;
padding: .6rem;
border: 1px solid var(--lcd-line);
border-radius: 7px;
background: #fff;
}
.lcd-product__gallery img {
width: 100%;
height: 100%;
object-fit: contain;
}
.lcd-spec-table {
width: 100%;
table-layout: fixed;
}
.lcd-spec-table th:first-child {
width: 10rem;
}
.lcd-status {
display: inline-block;
padding: .18rem .55rem;
border-radius: 999px;
color: #244158;
background: #dceff9;
font-size: .84rem;
font-weight: 700;
}
.lcd-download-card,
.lcd-empty-resource {
padding: 1rem 1.15rem;
border: 1px solid var(--lcd-line);
border-left: 4px solid var(--lcd-blue);
border-radius: 6px;
background: #fff;
}
.lcd-download-card__name {
font-size: 1.05rem;
font-weight: 700;
}
.lcd-download-card__type {
display: inline-block;
margin-right: .6rem;
color: var(--lcd-blue-dark);
font-weight: 800;
}
.lcd-download-card__body {
display: inline-flex;
flex-wrap: wrap;
gap: .25rem .75rem;
align-items: baseline;
}
.lcd-download-card__action {
margin-top: .65rem;
}
.lcd-download-card__meta,
.lcd-empty-resource {
color: var(--lcd-muted);
}
.lcd-manager-links {
columns: 2 18rem;
}
.formtable {
width: 100%;
margin-bottom: 1rem;
}
.formtable th {
width: 11rem;
text-align: left;
vertical-align: top;
}
.formtable input,
.formtable select,
.formtable textarea {
box-sizing: border-box;
max-width: 100%;
}
@media (max-width: 1000px) {
.lcd-card-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.lcd-product__hero {
grid-template-columns: 1fr;
}
}
@media (max-width: 620px) {
.lcd-card-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: .75rem;
}
.lcd-product__gallery {
grid-template-columns: 1fr;
}
.lcd-card__title {
min-height: 0;
}
.lcd-product__hero {
padding: .85rem;
}
.lcd-spec-table th:first-child {
width: 7.5rem;
}
.formtable,
.formtable tbody,
.formtable tr,
.formtable th,
.formtable td {
display: block;
width: 100%;
}
}