MediaWiki:Common.css: Difference between revisions
No edit summary Tag: Reverted |
No edit summary |
||
| (17 intermediate revisions by the same user not shown) | |||
| Line 119: | Line 119: | ||
} | } | ||
.spoiler-box { | .spoiler-box { | ||
border: 1px solid # | display: inline-block; | ||
width: fit-content; | |||
max-width: 100%; | |||
box-sizing: border-box; | |||
border: 1px solid #8b1e1e; | |||
background: #f8f1df; | background: #f8f1df; | ||
padding: 0. | padding: 0.25em 0.6em; | ||
margin: 1em 0; | margin: 1em 0; | ||
border-radius: 4px; | border-radius: 4px; | ||
} | |||
/* Once expanded, stop acting like a bordered box */ | |||
.spoiler-box.mw-made-collapsible:not(.mw-collapsed) { | |||
display: block; | |||
width: auto; | |||
border: none; | |||
background: transparent; | |||
padding: 0; | |||
} | |||
/* Keep the expand/collapse link close to the label */ | |||
.spoiler-box .mw-collapsible-toggle { | |||
float: none; | |||
margin-left: 0.5em; | |||
} | |||
.spoiler-label { | |||
color: #8b1e1e; | |||
font-weight: bold; | |||
text-transform: uppercase; | |||
letter-spacing: 0.04em; | |||
} | } | ||
| Line 129: | Line 156: | ||
margin-top: 0.6em; | margin-top: 0.6em; | ||
} | } | ||
.spoiler-label { | .spoiler-small { | ||
color: # | border: 1px solid #8b1e1e; | ||
padding: 0.15em 0.3em; | |||
margin: 0.15em 0; | |||
border-radius: 2px; | |||
font-size: 85%; | |||
line-height: 1.15; | |||
} | |||
.spoiler-small-label { | |||
color: #a83232; /* red */ | |||
font-weight: bold; | font-weight: bold; | ||
text-transform: uppercase; | text-transform: uppercase; | ||
letter-spacing: 0. | letter-spacing: 0.02em; | ||
} | |||
.spoiler-small .mw-collapsible-content { | |||
margin-top: 0.25em; | |||
} | } | ||
importScript("https://adaris.wiki/MediaWiki:Familytree.js"); | importScript("https://adaris.wiki/MediaWiki:Familytree.js"); | ||
/* ============================================================ | |||
Interactive deep-zoom map — styles | |||
Paste this block at the bottom of MediaWiki:Common.css | |||
============================================================ */ | |||
.interactive-map { | |||
position: relative; | |||
width: 100%; | |||
height: 600px; /* override per page with | height = 700 */ | |||
max-height: 85vh; | |||
background: #11131a; /* shows briefly while the first tiles load */ | |||
border-radius: 8px; | |||
overflow: hidden; | |||
} | |||
/* ---- Pins (an <a> when they link to an article) ---- */ | |||
.imap-pin { | |||
--pin-color: #2f6fed; | |||
position: absolute; | |||
display: block; | |||
width: 22px; | |||
height: 31px; | |||
color: var( --pin-color ); | |||
cursor: pointer; | |||
transform-origin: bottom center; | |||
transition: transform 0.12s ease, opacity 0.3s ease; | |||
filter: drop-shadow( 0 1px 2px rgba( 0, 0, 0, 0.5 ) ); | |||
z-index: 2; | |||
} | |||
.imap-pin:hover, | |||
.imap-pin:focus { | |||
transform: scale( 1.18 ); | |||
outline: none; | |||
z-index: 5; | |||
} | |||
.imap-pin svg { | |||
display: block; | |||
width: 100%; | |||
height: 100%; | |||
} | |||
/* Drive the pin color from the shape's fill, not the link's text color, | |||
so a skin's visited-link rule can't repaint it. */ | |||
.imap-pin svg path { | |||
fill: var( --pin-color ); | |||
} | |||
/* Name shown on hover / keyboard focus. */ | |||
.imap-pin-label { | |||
position: absolute; | |||
left: 50%; | |||
bottom: calc( 100% + 4px ); | |||
transform: translateX( -50% ); | |||
white-space: nowrap; | |||
padding: 3px 8px; | |||
border-radius: 5px; | |||
background: rgba( 17, 19, 26, 0.95 ); | |||
color: #fff; | |||
font-family: sans-serif; | |||
font-size: 12px; | |||
line-height: 1.3; | |||
opacity: 0; | |||
pointer-events: none; | |||
transition: opacity 0.12s ease; | |||
} | |||
.imap-pin:hover .imap-pin-label, | |||
.imap-pin:focus .imap-pin-label { | |||
opacity: 1; | |||
} | |||
/* ---- Text labels (region / area names) ---- */ | |||
.imap-label { | |||
position: absolute; | |||
white-space: nowrap; | |||
color: #fff; | |||
font-family: sans-serif; | |||
font-weight: 600; | |||
font-size: 15px; | |||
letter-spacing: 0.04em; | |||
text-decoration: none; | |||
text-shadow: 0 1px 2px rgba( 0, 0, 0, 0.9 ), 0 0 4px rgba( 0, 0, 0, 0.7 ); | |||
cursor: default; | |||
transition: opacity 0.3s ease; | |||
z-index: 1; | |||
} | |||
a.imap-label { cursor: pointer; } | |||
a.imap-label:hover { text-decoration: underline; } | |||
/* ---- Shared: fade out when outside a marker's zoom range / disabled ---- */ | |||
.imap-hidden { | |||
opacity: 0 !important; | |||
pointer-events: none !important; | |||
} | |||
/* ---- Category toggle legend ---- */ | |||
.imap-legend { | |||
position: absolute; | |||
top: 10px; | |||
right: 10px; | |||
z-index: 6; | |||
max-height: calc( 100% - 20px ); | |||
overflow-y: auto; | |||
padding: 8px 11px; | |||
border-radius: 6px; | |||
background: rgba( 17, 19, 26, 0.82 ); | |||
color: #eef; | |||
font-family: sans-serif; | |||
font-size: 13px; | |||
line-height: 1.4; | |||
-webkit-backdrop-filter: blur( 2px ); | |||
backdrop-filter: blur( 2px ); | |||
-webkit-user-select: none; | |||
user-select: none; | |||
} | |||
.imap-legend-title { | |||
margin-bottom: 6px; | |||
font-size: 11px; | |||
font-weight: 700; | |||
letter-spacing: 0.06em; | |||
text-transform: uppercase; | |||
opacity: 0.7; | |||
} | |||
.imap-legend-all { | |||
display: flex; | |||
align-items: center; | |||
gap: 7px; | |||
margin-bottom: 4px; | |||
padding-bottom: 5px; | |||
border-bottom: 1px solid rgba( 255, 255, 255, 0.15 ); | |||
font-weight: 600; | |||
cursor: pointer; | |||
} | |||
.imap-legend-all input { margin: 0; cursor: pointer; } | |||
.imap-legend label { | |||
display: flex; | |||
align-items: center; | |||
gap: 7px; | |||
padding: 2px 0; | |||
cursor: pointer; | |||
} | |||
.imap-legend input { | |||
margin: 0; | |||
cursor: pointer; | |||
} | |||
.imap-legend-swatch { | |||
flex: 0 0 auto; | |||
width: 11px; | |||
height: 11px; | |||
border-radius: 50%; | |||
box-shadow: 0 0 0 1px rgba( 255, 255, 255, 0.25 ); | |||
} | |||
/* ---- Coordinate / zoom helper box ---- */ | |||
.imap-coords { | |||
position: absolute; | |||
left: 10px; | |||
bottom: 10px; | |||
z-index: 6; | |||
max-width: 90%; | |||
padding: 6px 9px; | |||
border-radius: 5px; | |||
background: rgba( 17, 19, 26, 0.9 ); | |||
color: #cfefff; | |||
font-family: monospace; | |||
font-size: 12px; | |||
pointer-events: none; | |||
} | |||
.imap-coords div { white-space: nowrap; } | |||
.imap-coords div + div { margin-top: 3px; } | |||
@media ( prefers-reduced-motion: reduce ) { | |||
.imap-pin, | |||
.imap-pin-label, | |||
.imap-label { transition: none; } | |||
} | |||