MediaWiki:Timeless.css:修订间差异
来自Mindustry中文wiki
无编辑摘要 |
无编辑摘要 |
||
| 第1行: | 第1行: | ||
/* MediaWiki:Timeless.css - Mindustry green header + MkDocs-ish | |||
body.skin-timeless{ | sidebars */ | ||
-- | |||
-- | body.skin-timeless { | ||
-- | --mdtBrand: #00af89; | ||
-- | --mdtBrand2: #00cfa0; | ||
--mdtHeaderFg: #ffffff; | |||
--mdtText: rgba(0, 0, 0, 0.87); | |||
--mdtTextMut: rgba(0, 0, 0, 0.55); | |||
--mdtHover: rgba(0, 0, 0, 0.06); | |||
--mdtSidebarW: 16rem; | |||
--mdtShadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.08), | |||
0 0 0.05rem rgba(0, 0, 0, 0.12); | |||
} | } | ||
/* ===== | /* ===== Header (Mindustry green) ===== */ | ||
body.skin-timeless #mw-header-container{ | body.skin-timeless #mw-header-container { | ||
background:var(-- | background: var(--mdtBrand) !important; | ||
color:var(-- | color: var(--mdtHeaderFg); | ||
box-shadow:var(-- | box-shadow: var(--mdtShadow); | ||
border-bottom:1px solid rgba(0,0,0,.12); | border-bottom: 1px solid rgba(0, 0, 0, 0.12); | ||
} | } | ||
body.skin-timeless #mw-header{ | body.skin-timeless #mw-header { | ||
display:flex; | display: flex; | ||
align-items:center; | align-items: center; | ||
gap:.75rem; | gap: 0.75rem; | ||
flex-wrap: nowrap; | |||
} | } | ||
body.skin-timeless #mw-header .visualClear { | |||
body.skin-timeless # | display: none; | ||
} | } | ||
body.skin-timeless #p-logo-text | |||
/* Site title (left) */ | |||
body.skin-timeless #p-logo-text { | |||
order: 1; | |||
flex: 0 0 auto; | |||
min-width: 0; | |||
max-width: none; | |||
position: static !important; | |||
text-align: left !important; | |||
} | } | ||
body.skin-timeless #p-logo-text #p-banner { | |||
body.skin-timeless # | display: flex; | ||
align-items: center; | |||
gap: 0.5rem; | |||
color: inherit; | |||
text-decoration: none; | |||
font-weight: 700; | |||
letter-spacing: 0.02em; | |||
line-height: 1.1; | |||
} | } | ||
/* | /* Hide sidebar logo; show a small icon next to title */ | ||
body.skin-timeless # | body.skin-timeless #mw-site-navigation #p-logo { | ||
display: none !important; | |||
display | |||
} | } | ||
body.skin-timeless #p-logo-text #p-banner::before { | |||
body.skin-timeless # | content: ''; | ||
width: 32px; | |||
height: 32px; | |||
background: url(/resources/assets/logo.jpg) center / cover no- | |||
repeat; | |||
border-radius: 8px; | |||
box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22); | |||
} | } | ||
/* | /* Search (right, smaller, dark like external wiki) */ | ||
body.skin-timeless # | body.skin-timeless #p-search { | ||
order: 2; | |||
margin-left: auto; | |||
flex: 0 1 13rem; | |||
min-width: 11rem; | |||
max-width: 22vw; | |||
} | } | ||
body.skin-timeless # | body.skin-timeless #p-search h3 { | ||
display: none; | |||
} | } | ||
body.skin-timeless # | body.skin-timeless #p-search form { | ||
margin: 0; | |||
margin: | |||
} | } | ||
body.skin-timeless #mw- | body.skin-timeless #mw-header-container #simpleSearch { | ||
display: flex; | |||
align-items: stretch; | |||
height: 2.2rem; | |||
width: 100%; | |||
background: rgba(0, 0, 0, 0.28) !important; | |||
border: 1px solid rgba(255, 255, 255, 0.14) !important; | |||
border-radius: 0.35rem !important; | |||
box-shadow: none !important; | |||
overflow: hidden; | |||
} | } | ||
body.skin-timeless #mw- | body.skin-timeless #mw-header-container #simpleSearch:focus-within { | ||
background: rgba(0, 0, 0, 0.36) !important; | |||
border-color: rgba(255, 255, 255, 0.25) !important; | |||
} | } | ||
body.skin-timeless #mw- | body.skin-timeless #mw-header-container #searchInput-container { | ||
flex: 1 1 auto; | |||
} | } | ||
body.skin-timeless #mw-header-container #searchInput { | |||
height: 100% !important; | |||
width: 100% !important; | |||
background: transparent !important; | |||
border: 0 !important; | |||
box-shadow: none !important; | |||
color: var(--mdtHeaderFg) !important; | |||
padding: 0.25rem 0.55rem !important; | |||
} | } | ||
body.skin-timeless #mw-header-container #searchInput::placeholder { | |||
body.skin-timeless | color: rgba(255, 255, 255, 0.75) !important; | ||
} | } | ||
/* | /* Hide both submit buttons (press Enter to search) */ | ||
body.skin-timeless #mw-header-container #mw-searchButton, | |||
body.skin-timeless #mw-header-container #searchButton { | |||
display: none !important; | |||
} | } | ||
body.skin-timeless # | /* Account area on far right */ | ||
body.skin-timeless #user-tools { | |||
order: 3; | |||
flex: 0 0 auto; | |||
white-space: nowrap; | |||
} | } | ||
body.skin-timeless #mw-header- | body.skin-timeless #mw-header a, | ||
body.skin-timeless #mw-header a:visited { | |||
color: var(--mdtHeaderFg); | |||
} | } | ||
body.skin-timeless #mw-header | body.skin-timeless #mw-header .dropdown { | ||
color: rgba(0, 0, 0, 0.87); | |||
color: | |||
} | } | ||
body.skin-timeless #mw-header- | body.skin-timeless #mw-header .dropdown a, | ||
color: | body.skin-timeless #mw-header .dropdown a:visited { | ||
color: #0645ad; | |||
} | } | ||
/* | /* Header color bar -> solid Mindustry green */ | ||
body.skin-timeless #mw-header- | body.skin-timeless #mw-header-hack { | ||
background: var(--mdtBrand) !important; | |||
} | } | ||
body.skin-timeless #mw-header-hack .color-left, | |||
body.skin-timeless #mw-header-hack .color-middle, | |||
body.skin-timeless #mw-header-hack .color-right { | |||
background: var(--mdtBrand) !important; | |||
} | } | ||
body.skin-timeless #mw- | /* ===== Sidebars (left + right consistent) ===== */ | ||
body.skin-timeless #mw-site-navigation, | |||
body.skin-timeless #mw-related-navigation { | |||
width: var(--mdtSidebarW) !important; | |||
flex: 0 0 var(--mdtSidebarW) !important; | |||
} | } | ||
body.skin-timeless #mw- | body.skin-timeless #mw-site-navigation .sidebar-chunk, | ||
body.skin-timeless #mw-related-navigation .sidebar-chunk { | |||
background: transparent; | |||
border: 0; | |||
body.skin-timeless | box-shadow: none; | ||
padding: 0.25rem 0; | |||
margin: 0 0 1rem; | |||
padding:0; | |||
} | } | ||
body.skin-timeless | body.skin-timeless #mw-site-navigation .sidebar-chunk > h2, | ||
body.skin-timeless #mw-related-navigation .sidebar-chunk > h2 { | |||
# | margin: 0.25rem 0.75rem 0.5rem; | ||
font-size: 0.8rem; | |||
letter-spacing: 0.06em; | |||
color: var(--mdtTextMut); | |||
} | } | ||
body.skin-timeless | body.skin-timeless #mw-site-navigation .mw-portlet-body ul, | ||
body.skin-timeless #mw-related-navigation .mw-portlet-body ul { | |||
# | list-style: none; | ||
margin: 0; | |||
padding: 0; | |||
margin | |||
} | } | ||
body.skin-timeless | body.skin-timeless #mw-site-navigation .mw-portlet-body a, | ||
body.skin-timeless #mw-related-navigation .mw-portlet-body a { | |||
# | display: block; | ||
padding: 0.38rem 0.85rem; | |||
border-radius: 10px; | |||
text-decoration: none; | |||
color: var(--mdtText); | |||
box-shadow: inset 3px 0 0 transparent; | |||
} | } | ||
body.skin-timeless | body.skin-timeless #mw-site-navigation .mw-portlet-body a:hover, | ||
body.skin-timeless #mw-related-navigation .mw-portlet-body a:hover { | |||
# | background: var(--mdtHover); | ||
box-shadow: inset 3px 0 0 var(--mdtBrand2); | |||
} | } | ||
body.skin-timeless | /* Desktop: sticky and scrollable sidebars */ | ||
@media (min-width: 1000px) { | |||
body.skin-timeless #mw-site-navigation, | |||
body.skin-timeless #mw-related-navigation { | |||
position: sticky; | |||
top: 4rem; | |||
align-self: flex-start; | |||
max-height: calc(100vh - 4rem); | |||
overflow-y: auto; | |||
} | |||
} | } | ||
body.skin-timeless | /* Thin scrollbar like MkDocs */ | ||
body.skin-timeless #mw-site-navigation, | |||
# | body.skin-timeless #mw-related-navigation { | ||
scrollbar-width: thin; | |||
scrollbar-color: rgba(0, 207, 160, 0.85) transparent; | |||
} | } | ||
body.skin-timeless | body.skin-timeless #mw-site-navigation::-webkit-scrollbar, | ||
body.skin-timeless #mw-related-navigation::-webkit-scrollbar { | |||
width: 6px; | |||
} | } | ||
body.skin-timeless | body.skin-timeless #mw-site-navigation::-webkit-scrollbar-track, | ||
body.skin-timeless #mw-related-navigation::-webkit-scrollbar-track { | |||
background: transparent; | |||
background: | |||
} | } | ||
body.skin-timeless #mw-site-navigation::-webkit-scrollbar-thumb, | |||
body.skin-timeless | body.skin-timeless #mw-related-navigation::-webkit-scrollbar-thumb { | ||
background: rgba(0, 207, 160, 0.85); | |||
border-radius: 999px; | |||
body.skin-timeless | |||
background:rgba(0,207,160,.85); | |||
border-radius:999px; | |||
} | } | ||
/* ===== Collapsible navigation (left) ===== */ | |||
body.skin-timeless #mw-site-navigation #p-navigation li.mdtNavGroup { | |||
display: grid; | |||
grid-template-columns: 1fr 2rem; | |||
body.skin-timeless #mw-site-navigation | align-items: center; | ||
min-width: 0; | |||
} | } | ||
body.skin-timeless #mw-site-navigation #p-navigation li.mdtNavGroup{ | body.skin-timeless #mw-site-navigation #p-navigation li.mdtNavGroup > | ||
a { | |||
min-width: 0; | |||
min-width:0; | |||
} | } | ||
body.skin-timeless #mw-site-navigation #p-navigation | body.skin-timeless #mw-site-navigation #p-navigation .mdtNavToggle { | ||
width: 2rem; | |||
height: 2rem; | |||
border: 0; | |||
background: transparent; | |||
cursor: pointer; | |||
color: var(--mdtTextMut); | |||
border-radius: 10px; | |||
} | } | ||
body.skin-timeless #mw-site-navigation #p- | body.skin-timeless #mw-site-navigation #p- | ||
navigation .mdtNavToggle:hover{ | navigation .mdtNavToggle:hover { | ||
background: | background: var(--mdtHover); | ||
} | } | ||
body.skin-timeless #mw-site-navigation #p- | body.skin-timeless #mw-site-navigation #p- | ||
navigation .mdtNavToggle::before{ | navigation .mdtNavToggle::before { | ||
content:' | content: '\25B8'; | ||
display:block; | display: block; | ||
font-size: | font-size: 18px; | ||
line-height:1; | line-height: 1; | ||
transition:transform .15s ease; | transition: transform 0.15s ease; | ||
} | } | ||
body.skin-timeless #mw-site-navigation #p-navigation li.mdtNavOpen | body.skin-timeless #mw-site-navigation #p-navigation li.mdtNavOpen | ||
> .mdtNavToggle::before{ | > .mdtNavToggle::before { | ||
transform:rotate(90deg); | transform: rotate(90deg); | ||
} | } | ||
body.skin-timeless #mw-site-navigation #p-navigation .mdtNavSublist{ | body.skin-timeless #mw-site-navigation #p-navigation .mdtNavSublist { | ||
grid-column:1 / -1; | grid-column: 1 / -1; | ||
list-style:none; | list-style: none; | ||
margin:.15rem 0 .4rem; | margin: 0.15rem 0 0.4rem; | ||
padding:0 0 0 . | padding: 0 0 0 0.85rem; | ||
border-left:1px solid rgba(0,0,0,.08); | border-left: 1px solid rgba(0, 0, 0, 0.08); | ||
display:none; | display: none; | ||
} | } | ||
body.skin-timeless #mw-site-navigation #p-navigation li.mdtNavOpen | body.skin-timeless #mw-site-navigation #p-navigation li.mdtNavOpen | ||
> .mdtNavSublist{ | > .mdtNavSublist { | ||
display:block; | display: block; | ||
} | } | ||
body.skin-timeless #mw-site-navigation #p-navigation .mdtNavSublist a{ | |||
font-size:.92em; | body.skin-timeless #mw-site-navigation #p-navigation .mdtNavSublist | ||
a { | |||
font-size: 0.92em; | |||
padding: 0.32rem 0.85rem; | |||
} | } | ||
body.skin-timeless #mw-site-navigation #p-navigation a.mdtNavActive{ | body.skin-timeless #mw-site-navigation #p-navigation a.mdtNavActive { | ||
color:var(-- | color: var(--mdtBrand) !important; | ||
background:rgba(0,175,137,.12) !important; | background: rgba(0, 175, 137, 0.12) !important; | ||
box-shadow:inset 3px 0 0 var(-- | box-shadow: inset 3px 0 0 var(--mdtBrand) !important; | ||
} | |||
/* Page title underline -> green */ | |||
body.skin-timeless .mw-body h1.firstHeading { | |||
border-bottom-color: var(--mdtBrand) !important; | |||
} | |||
/* Small screens: search wraps */ | |||
@media (max-width: 720px) { | |||
body.skin-timeless #mw-header { | |||
flex-wrap: wrap; | |||
} | |||
body.skin-timeless #p-search { | |||
flex: 1 1 100%; | |||
max-width: none; | |||
margin-left: 0; | |||
} | |||
} | } | ||
2026年1月8日 (四) 15:32的版本
/* MediaWiki:Timeless.css - Mindustry green header + MkDocs-ish
sidebars */
body.skin-timeless {
--mdtBrand: #00af89;
--mdtBrand2: #00cfa0;
--mdtHeaderFg: #ffffff;
--mdtText: rgba(0, 0, 0, 0.87);
--mdtTextMut: rgba(0, 0, 0, 0.55);
--mdtHover: rgba(0, 0, 0, 0.06);
--mdtSidebarW: 16rem;
--mdtShadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.08),
0 0 0.05rem rgba(0, 0, 0, 0.12);
}
/* ===== Header (Mindustry green) ===== */
body.skin-timeless #mw-header-container {
background: var(--mdtBrand) !important;
color: var(--mdtHeaderFg);
box-shadow: var(--mdtShadow);
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
body.skin-timeless #mw-header {
display: flex;
align-items: center;
gap: 0.75rem;
flex-wrap: nowrap;
}
body.skin-timeless #mw-header .visualClear {
display: none;
}
/* Site title (left) */
body.skin-timeless #p-logo-text {
order: 1;
flex: 0 0 auto;
min-width: 0;
max-width: none;
position: static !important;
text-align: left !important;
}
body.skin-timeless #p-logo-text #p-banner {
display: flex;
align-items: center;
gap: 0.5rem;
color: inherit;
text-decoration: none;
font-weight: 700;
letter-spacing: 0.02em;
line-height: 1.1;
}
/* Hide sidebar logo; show a small icon next to title */
body.skin-timeless #mw-site-navigation #p-logo {
display: none !important;
}
body.skin-timeless #p-logo-text #p-banner::before {
content: '';
width: 32px;
height: 32px;
background: url(/resources/assets/logo.jpg) center / cover no-
repeat;
border-radius: 8px;
box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22);
}
/* Search (right, smaller, dark like external wiki) */
body.skin-timeless #p-search {
order: 2;
margin-left: auto;
flex: 0 1 13rem;
min-width: 11rem;
max-width: 22vw;
}
body.skin-timeless #p-search h3 {
display: none;
}
body.skin-timeless #p-search form {
margin: 0;
}
body.skin-timeless #mw-header-container #simpleSearch {
display: flex;
align-items: stretch;
height: 2.2rem;
width: 100%;
background: rgba(0, 0, 0, 0.28) !important;
border: 1px solid rgba(255, 255, 255, 0.14) !important;
border-radius: 0.35rem !important;
box-shadow: none !important;
overflow: hidden;
}
body.skin-timeless #mw-header-container #simpleSearch:focus-within {
background: rgba(0, 0, 0, 0.36) !important;
border-color: rgba(255, 255, 255, 0.25) !important;
}
body.skin-timeless #mw-header-container #searchInput-container {
flex: 1 1 auto;
}
body.skin-timeless #mw-header-container #searchInput {
height: 100% !important;
width: 100% !important;
background: transparent !important;
border: 0 !important;
box-shadow: none !important;
color: var(--mdtHeaderFg) !important;
padding: 0.25rem 0.55rem !important;
}
body.skin-timeless #mw-header-container #searchInput::placeholder {
color: rgba(255, 255, 255, 0.75) !important;
}
/* Hide both submit buttons (press Enter to search) */
body.skin-timeless #mw-header-container #mw-searchButton,
body.skin-timeless #mw-header-container #searchButton {
display: none !important;
}
/* Account area on far right */
body.skin-timeless #user-tools {
order: 3;
flex: 0 0 auto;
white-space: nowrap;
}
body.skin-timeless #mw-header a,
body.skin-timeless #mw-header a:visited {
color: var(--mdtHeaderFg);
}
body.skin-timeless #mw-header .dropdown {
color: rgba(0, 0, 0, 0.87);
}
body.skin-timeless #mw-header .dropdown a,
body.skin-timeless #mw-header .dropdown a:visited {
color: #0645ad;
}
/* Header color bar -> solid Mindustry green */
body.skin-timeless #mw-header-hack {
background: var(--mdtBrand) !important;
}
body.skin-timeless #mw-header-hack .color-left,
body.skin-timeless #mw-header-hack .color-middle,
body.skin-timeless #mw-header-hack .color-right {
background: var(--mdtBrand) !important;
}
/* ===== Sidebars (left + right consistent) ===== */
body.skin-timeless #mw-site-navigation,
body.skin-timeless #mw-related-navigation {
width: var(--mdtSidebarW) !important;
flex: 0 0 var(--mdtSidebarW) !important;
}
body.skin-timeless #mw-site-navigation .sidebar-chunk,
body.skin-timeless #mw-related-navigation .sidebar-chunk {
background: transparent;
border: 0;
box-shadow: none;
padding: 0.25rem 0;
margin: 0 0 1rem;
}
body.skin-timeless #mw-site-navigation .sidebar-chunk > h2,
body.skin-timeless #mw-related-navigation .sidebar-chunk > h2 {
margin: 0.25rem 0.75rem 0.5rem;
font-size: 0.8rem;
letter-spacing: 0.06em;
color: var(--mdtTextMut);
}
body.skin-timeless #mw-site-navigation .mw-portlet-body ul,
body.skin-timeless #mw-related-navigation .mw-portlet-body ul {
list-style: none;
margin: 0;
padding: 0;
}
body.skin-timeless #mw-site-navigation .mw-portlet-body a,
body.skin-timeless #mw-related-navigation .mw-portlet-body a {
display: block;
padding: 0.38rem 0.85rem;
border-radius: 10px;
text-decoration: none;
color: var(--mdtText);
box-shadow: inset 3px 0 0 transparent;
}
body.skin-timeless #mw-site-navigation .mw-portlet-body a:hover,
body.skin-timeless #mw-related-navigation .mw-portlet-body a:hover {
background: var(--mdtHover);
box-shadow: inset 3px 0 0 var(--mdtBrand2);
}
/* Desktop: sticky and scrollable sidebars */
@media (min-width: 1000px) {
body.skin-timeless #mw-site-navigation,
body.skin-timeless #mw-related-navigation {
position: sticky;
top: 4rem;
align-self: flex-start;
max-height: calc(100vh - 4rem);
overflow-y: auto;
}
}
/* Thin scrollbar like MkDocs */
body.skin-timeless #mw-site-navigation,
body.skin-timeless #mw-related-navigation {
scrollbar-width: thin;
scrollbar-color: rgba(0, 207, 160, 0.85) transparent;
}
body.skin-timeless #mw-site-navigation::-webkit-scrollbar,
body.skin-timeless #mw-related-navigation::-webkit-scrollbar {
width: 6px;
}
body.skin-timeless #mw-site-navigation::-webkit-scrollbar-track,
body.skin-timeless #mw-related-navigation::-webkit-scrollbar-track {
background: transparent;
}
body.skin-timeless #mw-site-navigation::-webkit-scrollbar-thumb,
body.skin-timeless #mw-related-navigation::-webkit-scrollbar-thumb {
background: rgba(0, 207, 160, 0.85);
border-radius: 999px;
}
/* ===== Collapsible navigation (left) ===== */
body.skin-timeless #mw-site-navigation #p-navigation li.mdtNavGroup {
display: grid;
grid-template-columns: 1fr 2rem;
align-items: center;
min-width: 0;
}
body.skin-timeless #mw-site-navigation #p-navigation li.mdtNavGroup >
a {
min-width: 0;
}
body.skin-timeless #mw-site-navigation #p-navigation .mdtNavToggle {
width: 2rem;
height: 2rem;
border: 0;
background: transparent;
cursor: pointer;
color: var(--mdtTextMut);
border-radius: 10px;
}
body.skin-timeless #mw-site-navigation #p-
navigation .mdtNavToggle:hover {
background: var(--mdtHover);
}
body.skin-timeless #mw-site-navigation #p-
navigation .mdtNavToggle::before {
content: '\25B8';
display: block;
font-size: 18px;
line-height: 1;
transition: transform 0.15s ease;
}
body.skin-timeless #mw-site-navigation #p-navigation li.mdtNavOpen
> .mdtNavToggle::before {
transform: rotate(90deg);
}
body.skin-timeless #mw-site-navigation #p-navigation .mdtNavSublist {
grid-column: 1 / -1;
list-style: none;
margin: 0.15rem 0 0.4rem;
padding: 0 0 0 0.85rem;
border-left: 1px solid rgba(0, 0, 0, 0.08);
display: none;
}
body.skin-timeless #mw-site-navigation #p-navigation li.mdtNavOpen
> .mdtNavSublist {
display: block;
}
body.skin-timeless #mw-site-navigation #p-navigation .mdtNavSublist
a {
font-size: 0.92em;
padding: 0.32rem 0.85rem;
}
body.skin-timeless #mw-site-navigation #p-navigation a.mdtNavActive {
color: var(--mdtBrand) !important;
background: rgba(0, 175, 137, 0.12) !important;
box-shadow: inset 3px 0 0 var(--mdtBrand) !important;
}
/* Page title underline -> green */
body.skin-timeless .mw-body h1.firstHeading {
border-bottom-color: var(--mdtBrand) !important;
}
/* Small screens: search wraps */
@media (max-width: 720px) {
body.skin-timeless #mw-header {
flex-wrap: wrap;
}
body.skin-timeless #p-search {
flex: 1 1 100%;
max-width: none;
margin-left: 0;
}
}
