MediaWiki:Common.js: Unterschied zwischen den Versionen
Erscheinungsbild
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| Zeile 1: | Zeile 1: | ||
/* === PREPRINT START === */ | /* === PREPRINT START === */ | ||
/* ============================================ | /* ============================================ | ||
PREPRINT v7.17 - | PREPRINT v7.17 - CSS v260207r4 | ||
Implements: R2 (Layout), R3 (Place), R5 (Tables), | |||
R8 (Portrait), R9 (Validation), R10 (BookNav) | |||
ARCHITECTURE: | ARCHITECTURE: Safe default, enhance when confirmed | ||
- | - Default: block layout (works on any screen width) | ||
- | - Landscape: grid layout (enabled by JS after width confirmed) | ||
- | - Portrait: explicit block (JS-applied, matches default) | ||
============================================ */ | ============================================ */ | ||
( | /* ============================================ | ||
1. OVERFLOW CONTROL | |||
Clips at browser edge, required for Minerva compatibility | |||
============================================ */ | |||
html { | |||
overflow-x: hidden; | |||
} | |||
/* ============================================ | |||
1b. MINERVA COLLAPSE SUPPRESSION | |||
Scoped to Preprint pages only. CSS acts instantly; | |||
JS sweep follows for structural cleanup. | |||
============================================ */ | |||
.preprint-layout .mf-icon, | |||
.preprint-book .mf-icon { | |||
display: none !important; | |||
} | |||
.preprint-layout .section-heading, | |||
.preprint-book .section-heading { | |||
pointer-events: none !important; | |||
} | |||
/* ============================================ | |||
2. SAFE DEFAULTS - Block Layout | |||
Works during JS initialization gap and on narrow screens | |||
============================================ */ | |||
.preprint-layout { | |||
display: block; | |||
margin: 2rem auto; | |||
} | |||
.inner-column { | |||
display: block; | |||
width: 100%; | |||
} | |||
.outer-column { | |||
display: none; /* Hidden by default; shown only in landscape */ | |||
} | |||
.inner-column p { | |||
margin-top: 0; | |||
padding-top: 0; | |||
} | |||
/* OC/LH elements: inline flow in default mode */ | |||
.place-oc { | |||
display: block; | |||
line-height: 1.6; | |||
background: #eaecf0; | |||
padding: 0.75em; | |||
margin: 0.5em 0; | |||
border-radius: 3px; | |||
} | |||
/* Adjacent OC elements (no content between): remove gap */ | |||
.place-oc + .oc-marker + .place-oc { | |||
margin-top: 0; | |||
} | |||
.place-oc + .oc-marker + .preprint-table-oc-wrapper { | |||
margin-top: 0; | |||
} | |||
.preprint-table-oc-wrapper + .oc-marker + .place-oc { | |||
margin-top: 0; | |||
} | |||
.preprint-table-oc-wrapper + .oc-marker + .preprint-table-oc-wrapper { | |||
margin-top: 0; | |||
} | |||
.place-lh { | |||
display: inline-block; | |||
height: 1.6em; | |||
line-height: 1.6em; | |||
vertical-align: baseline; | |||
font-size: 1em; | |||
float: right; | |||
background: #eaecf0; | |||
padding: 0.1em 0.4em; | |||
border-radius: 2px; | |||
margin: 0 0 0.2em 0.3em; | |||
} | |||
.place-lh.lh-has-media { | |||
background: none; | |||
padding: 0.1em; | |||
} | |||
.place-lh img { | |||
height: 1.4em; | |||
width: auto; | |||
} | |||
/* Hide during init to prevent FOUC */ | |||
#preprint-magic ~ * { | |||
visibility: hidden; | |||
} | |||
.preprint-layout:not(.preprint-ready) { | |||
visibility: hidden; | |||
} | |||
.preprint-table-oc-wrapper { | |||
display: block; | |||
width: 100%; | |||
background: #eaecf0; | |||
padding: 0.75em; | |||
margin: 0.5em 0; | |||
border-radius: 3px; | |||
box-sizing: border-box; | |||
} | |||
/* Images: constrained by default */ | |||
.preprint-layout img { | |||
max-width: 100%; | |||
height: auto; | |||
} | |||
/* 2C wrapper: full width block by default */ | |||
.preprint-2c-wrapper { | |||
display: table; | |||
width: 100%; | |||
margin: 0; | |||
padding: 0; | |||
border: none; | |||
border-collapse: collapse; | |||
border-spacing: 0; | |||
line-height: normal; | |||
} | |||
.preprint-2c-wrapper > tbody > tr > td { | |||
padding: 0; | |||
border: none; | |||
line-height: normal; | |||
vertical-align: top; | |||
} | |||
/* ============================================ | |||
3. LANDSCAPE MODE - Grid Enhancement | |||
Applied by JS when screen.width >= 768 | |||
============================================ */ | |||
body.preprint-landscape .preprint-layout { | |||
display: grid; | |||
grid-template-columns: 2fr 1fr; | |||
column-gap: 2rem; | |||
row-gap: 0; | |||
} | |||
body.preprint-landscape .preprint-layout > .inner-column { | |||
grid-column: 1; | |||
min-width: 0; /* Respect fr allocation */ | |||
} | |||
body.preprint-landscape .preprint-layout > .outer-column { | |||
display: block; | |||
grid-column: 2; | |||
position: relative; | |||
min-width: 0; /* Respect fr allocation */ | |||
} | |||
body.preprint-landscape .outer-column:empty { | |||
display: none; | |||
} | |||
/* 2C spans both columns in grid */ | |||
body.preprint-landscape .preprint-2c-wrapper { | |||
grid-column: 1 / -1; | |||
} | |||
/* OC elements: positioned in outer column */ | |||
body.preprint-landscape .place-oc { | |||
display: block; | |||
background: none; | |||
padding: 0; | |||
margin: 0; | |||
margin-top: -0.25em; | |||
border-radius: 0; | |||
} | |||
body.preprint-landscape .place-oc.place-small { | |||
font-size: 0.875em; | |||
margin-top: -0.1em; | |||
line-height: 1.5; | |||
} | |||
body.preprint-landscape .place-oc.place-bg { | |||
background-color: inherit; /* Allow bg= parameter */ | |||
padding: 0.5em; | |||
margin-top: -0.75em; | |||
border-radius: 3px; | |||
} | |||
/* LH elements: positioned markers */ | |||
body.preprint-landscape .place-lh { | |||
float: none; | |||
background: none; | |||
padding: 0; | |||
margin: 0; | |||
margin-top: -0.1em; | |||
margin-right: 0.5em; | |||
z-index: 10; | |||
} | |||
body.preprint-landscape .place-lh img { | |||
height: 1.4em !important; | |||
width: auto !important; | |||
max-width: 3em !important; | |||
margin-top: -0.45em; | |||
} | |||
body.preprint-landscape .place-lh a { | |||
display: block; | |||
height: 100%; | |||
text-decoration: none; | |||
color: #36c; | |||
} | |||
body.preprint-landscape .place-lh a:hover { | |||
text-decoration: underline; | |||
} | |||
/* OC table wrapper: positioned */ | |||
body.preprint-landscape .preprint-table-oc-wrapper { | |||
background: none; | |||
padding: 0; | |||
margin: 0; | |||
margin-top: -0.4em; | |||
border-radius: 0; | |||
} | |||
body.preprint-landscape .preprint-table-oc-wrapper table { | |||
width: 100%; | |||
max-width: 100%; | |||
} | |||
body.preprint-landscape.skin-minerva .preprint-table-oc-wrapper table { | |||
font-size: 0.75em; | |||
} | |||
body.preprint-landscape .preprint-table-oc-wrapper table.wikitable, | |||
body.preprint-landscape .preprint-table-oc-wrapper table.wikitable td { | |||
background-color: #fff; | |||
} | |||
/* OC images */ | |||
body.preprint-landscape .place-oc img { | |||
max-width: 100%; | |||
height: auto; | |||
} | |||
/* ============================================ | |||
4. PORTRAIT MODE - Explicit Block | |||
Applied by JS when screen.width < 768 | |||
Mostly matches defaults, but explicit for clarity | |||
============================================ */ | |||
body.preprint-portrait .preprint-layout { | |||
display: block; | |||
} | |||
body.preprint-portrait .preprint-layout > * { | |||
width: 100%; | |||
max-width: 100%; | |||
} | |||
body.preprint-portrait .inner-column { | |||
display: block; | |||
position: static; | |||
width: 100%; | |||
} | |||
body.preprint-portrait .outer-column { | |||
display: none; | |||
} | |||
body.preprint-portrait .oc-marker { | |||
visibility: hidden; | |||
width: 0; | |||
height: 0; | |||
overflow: hidden; | |||
} | |||
/* OC: gray background box */ | |||
body.preprint-portrait .place-oc { | |||
display: block; | |||
position: static; | |||
top: auto; | |||
background: #eaecf0; | |||
padding: 0.75em; | |||
margin: 0.5em 0; | |||
border-radius: 3px; | |||
} | |||
/* LH: float right */ | |||
body.preprint-portrait .place-lh { | |||
float: right !important; | |||
display: inline-block !important; | |||
position: static !important; | |||
top: auto !important; | |||
background: #eaecf0; | |||
padding: 0.1em 0.4em; | |||
border-radius: 2px; | |||
margin: 0 0 0.2em 0.3em; | |||
} | |||
body.preprint-portrait .place-lh.lh-has-media { | |||
background: none; | |||
padding: 0.1em; | |||
} | |||
body.preprint-portrait .place-lh img, | |||
body.preprint-portrait .place-lh .lazy-image-placeholder { | |||
height: 1.4em !important; | |||
width: auto !important; | |||
max-width: 3em !important; | |||
} | |||
/* OC table wrapper */ | |||
body.preprint-portrait .preprint-table-oc-wrapper { | |||
display: block; | |||
position: static; | |||
top: auto; | |||
background: none; | |||
padding: 0.75em; | |||
margin: 0.5em 0; | |||
border-radius: 3px; | |||
box-sizing: border-box; | |||
width: 100%; | |||
} | |||
body.preprint-portrait .preprint-table-oc-wrapper table.wikitable { | |||
margin: 0; | |||
} | |||
/* Tables */ | |||
body.preprint-portrait.skin-minerva .preprint-table-oc-wrapper table { | |||
font-size: 0.75em; | |||
} | |||
body.preprint-portrait table.wikitable { | |||
display: table; | |||
width: 100%; | |||
} | |||
body.preprint-portrait .preprint-2c-wrapper { | |||
display: table; | |||
width: 100%; | |||
} | |||
body.preprint-portrait .preprint-table-oc-wrapper.place-oc { | |||
background: #eaecf0; | |||
padding: 0.75em; | |||
} | |||
// | body.preprint-portrait .preprint-table-oc-wrapper table.wikitable, | ||
body.preprint-portrait .preprint-table-oc-wrapper table.wikitable td { | |||
background: #fff; | |||
} | |||
} | |||
/* Images */ | |||
body.preprint-portrait .preprint-layout img { | |||
max-width: 100%; | |||
height: auto; | |||
} | |||
body.preprint-portrait .place-2c img, | |||
body.preprint-portrait .preprint-2c-wrapper img { | |||
width: 100%; | |||
height: auto; | |||
} | |||
/* Lazy-load stability */ | |||
body.preprint-portrait .lazy-image-placeholder { | |||
min-height: 1.4em; | |||
} | |||
/* ============================================ | |||
5. PLACE TEMPLATE - Mode-Agnostic Rules | |||
============================================ */ | |||
.place-ic { | |||
display: block; | |||
margin: 1rem 0; | |||
} | |||
.place-ic img { | |||
max-width: 100%; | |||
height: auto; | |||
} | |||
.place-small { | |||
font-size: 0.875em; | |||
} | |||
.skin-minerva .place-small { | |||
font-size: 0.75em; | |||
} | |||
.place-bg { | |||
border-radius: 3px; | |||
} | |||
.place-2c { | |||
width: 100%; | |||
line-height: 1.6; | |||
} | |||
.place-2c img { | |||
max-width: 100%; | |||
height: auto; | |||
} | |||
/* ============================================ | |||
6. TABLES - Wrappers and Validation | |||
============================================ */ | |||
.preprint-table-ic-wrapper { | |||
width: 100%; | |||
} | |||
.preprint-table-ic-wrapper table { | |||
width: 100%; | |||
max-width: 100%; | |||
} | |||
/* Validation: Red border for unwrapped tables */ | |||
.preprint-layout table:not(.preprint-2c-wrapper):not(.preprint-table-ic-wrapper table):not(.preprint-table-oc-wrapper table):not(.preprint-2c-wrapper table) { | |||
border: 3px solid #d33 !important; | |||
} | |||
/* Exclude tables inside wrappers from red border */ | |||
.preprint-table-ic-wrapper table, | |||
.preprint-table-oc-wrapper table, | |||
.preprint-2c-wrapper table { | |||
border: revert !important; | |||
} | |||
/* IC table width enforcement */ | |||
.preprint-table-ic-wrapper > table { | |||
max-width: 100%; | |||
box-sizing: border-box; | |||
} | |||
/* ============================================ | |||
8. SNIPPET (Collaboration) | |||
============================================ */ | |||
.snippet { | |||
margin: 1rem 0; | |||
padding: 1rem; | |||
background: #f8f9fa; | |||
border-left: 3px solid #72777d; | |||
} | |||
.snippet-quote { | |||
margin-bottom: 0.5em; | |||
} | |||
.snippet-context { | |||
font-size: 0.875em; | |||
color: #54595d; | |||
margin-bottom: 0.5em; | |||
} | |||
.snippet-source { | |||
font-size: 0.875em; | |||
text-align: right; | |||
} | |||
/* ============================================ | |||
9. SELECTION-TO-TALK BUTTON | |||
============================================ */ | |||
.snippet-button { | |||
background: #fc3; | |||
color: #222; | |||
border: none; | |||
border-radius: 2px; | |||
padding: 0.4em 0.8em; | |||
font-size: 0.875em; | |||
cursor: pointer; | |||
box-shadow: 0 2px 4px rgba(0,0,0,0.2); | |||
} | |||
.snippet-button:hover { | |||
background: #eb2; | |||
} | |||
/* ============================================ | |||
10. ERROR STYLING | |||
============================================ */ | |||
.error { | |||
color: #d33; | |||
font-weight: bold; | |||
} | |||
/* Book navigation sidebar link (Vector only) */ | |||
@media (max-width: 850px) { | |||
.book-nav-sidebar { | |||
display: none; | |||
} | |||
} | |||
/* ============================================ | |||
12. BOOK NAVIGATION ICON | |||
============================================ */ | |||
.book-nav-icon { | |||
position: fixed; | |||
bottom: 1em; | |||
right: 1em; | |||
z-index: 1000; | |||
padding: 5px; | |||
border-radius: 3px; | |||
opacity: 0.6; | |||
transition: opacity 0.2s; | |||
line-height: 0; | |||
} | |||
.book-nav-icon:hover, | |||
.book-nav-icon:active { | |||
opacity: 1; | |||
} | |||
.book-nav-icon img { | |||
display: block; | |||
height: 1.6em; | |||
width: auto; | |||
} | |||
/* Minerva: dark pill with inverted logo */ | |||
.skin-minerva .book-nav-icon { | |||
background: #000; | |||
opacity: 0.85; | |||
} | |||
.skin-minerva .book-nav-icon img { | |||
filter: invert(1); | |||
} | |||
/* ============================================ | |||
11. DEBUG STYLES (optional) | |||
============================================ */ | |||
.debug-preprint .preprint-layout { | |||
border: 2px solid blue; | |||
padding: 10px; | |||
} | position: relative; | ||
} | |||
.debug-preprint .preprint-layout::before { | |||
content: "LAYOUT"; | |||
position: absolute; | |||
top: -10px; | |||
left: 10px; | |||
background: white; | |||
color: blue; | |||
font-size: 10px; | |||
padding: 0 5px; | |||
} | |||
.debug-preprint .inner-column { | |||
background: rgba(0, 255, 0, 0.1); | |||
border: 1px dashed green; | |||
position: relative; | |||
} | |||
.debug-preprint .inner-column::before { | |||
content: "IC"; | |||
position: absolute; | |||
top: 0; | |||
right: 0; | |||
background: green; | |||
color: white; | |||
font-size: 10px; | |||
padding: 2px; | |||
} | |||
.debug-preprint .outer-column { | |||
background: rgba(255, 0, 255, 0.1); | |||
border: 1px dashed purple; | |||
position: relative; | |||
} | |||
.debug-preprint .outer-column::before { | |||
content: "OC"; | |||
position: absolute; | |||
top: 0; | |||
right: 0; | |||
background: purple; | |||
color: white; | |||
font-size: 10px; | |||
padding: 2px; | |||
} | |||
} | .debug-preprint .place-lh { | ||
outline: 1px solid orange; | |||
} | |||
.debug-preprint .place-2c { | |||
outline: 1px solid red; | |||
} | |||
/* === PREPRINT END === */ | /* === PREPRINT END === */ | ||
Version vom 10. Februar 2026, 11:19 Uhr
/* === PREPRINT START === */
/* ============================================
PREPRINT v7.17 - CSS v260207r4
Implements: R2 (Layout), R3 (Place), R5 (Tables),
R8 (Portrait), R9 (Validation), R10 (BookNav)
ARCHITECTURE: Safe default, enhance when confirmed
- Default: block layout (works on any screen width)
- Landscape: grid layout (enabled by JS after width confirmed)
- Portrait: explicit block (JS-applied, matches default)
============================================ */
/* ============================================
1. OVERFLOW CONTROL
Clips at browser edge, required for Minerva compatibility
============================================ */
html {
overflow-x: hidden;
}
/* ============================================
1b. MINERVA COLLAPSE SUPPRESSION
Scoped to Preprint pages only. CSS acts instantly;
JS sweep follows for structural cleanup.
============================================ */
.preprint-layout .mf-icon,
.preprint-book .mf-icon {
display: none !important;
}
.preprint-layout .section-heading,
.preprint-book .section-heading {
pointer-events: none !important;
}
/* ============================================
2. SAFE DEFAULTS - Block Layout
Works during JS initialization gap and on narrow screens
============================================ */
.preprint-layout {
display: block;
margin: 2rem auto;
}
.inner-column {
display: block;
width: 100%;
}
.outer-column {
display: none; /* Hidden by default; shown only in landscape */
}
.inner-column p {
margin-top: 0;
padding-top: 0;
}
/* OC/LH elements: inline flow in default mode */
.place-oc {
display: block;
line-height: 1.6;
background: #eaecf0;
padding: 0.75em;
margin: 0.5em 0;
border-radius: 3px;
}
/* Adjacent OC elements (no content between): remove gap */
.place-oc + .oc-marker + .place-oc {
margin-top: 0;
}
.place-oc + .oc-marker + .preprint-table-oc-wrapper {
margin-top: 0;
}
.preprint-table-oc-wrapper + .oc-marker + .place-oc {
margin-top: 0;
}
.preprint-table-oc-wrapper + .oc-marker + .preprint-table-oc-wrapper {
margin-top: 0;
}
.place-lh {
display: inline-block;
height: 1.6em;
line-height: 1.6em;
vertical-align: baseline;
font-size: 1em;
float: right;
background: #eaecf0;
padding: 0.1em 0.4em;
border-radius: 2px;
margin: 0 0 0.2em 0.3em;
}
.place-lh.lh-has-media {
background: none;
padding: 0.1em;
}
.place-lh img {
height: 1.4em;
width: auto;
}
/* Hide during init to prevent FOUC */
#preprint-magic ~ * {
visibility: hidden;
}
.preprint-layout:not(.preprint-ready) {
visibility: hidden;
}
.preprint-table-oc-wrapper {
display: block;
width: 100%;
background: #eaecf0;
padding: 0.75em;
margin: 0.5em 0;
border-radius: 3px;
box-sizing: border-box;
}
/* Images: constrained by default */
.preprint-layout img {
max-width: 100%;
height: auto;
}
/* 2C wrapper: full width block by default */
.preprint-2c-wrapper {
display: table;
width: 100%;
margin: 0;
padding: 0;
border: none;
border-collapse: collapse;
border-spacing: 0;
line-height: normal;
}
.preprint-2c-wrapper > tbody > tr > td {
padding: 0;
border: none;
line-height: normal;
vertical-align: top;
}
/* ============================================
3. LANDSCAPE MODE - Grid Enhancement
Applied by JS when screen.width >= 768
============================================ */
body.preprint-landscape .preprint-layout {
display: grid;
grid-template-columns: 2fr 1fr;
column-gap: 2rem;
row-gap: 0;
}
body.preprint-landscape .preprint-layout > .inner-column {
grid-column: 1;
min-width: 0; /* Respect fr allocation */
}
body.preprint-landscape .preprint-layout > .outer-column {
display: block;
grid-column: 2;
position: relative;
min-width: 0; /* Respect fr allocation */
}
body.preprint-landscape .outer-column:empty {
display: none;
}
/* 2C spans both columns in grid */
body.preprint-landscape .preprint-2c-wrapper {
grid-column: 1 / -1;
}
/* OC elements: positioned in outer column */
body.preprint-landscape .place-oc {
display: block;
background: none;
padding: 0;
margin: 0;
margin-top: -0.25em;
border-radius: 0;
}
body.preprint-landscape .place-oc.place-small {
font-size: 0.875em;
margin-top: -0.1em;
line-height: 1.5;
}
body.preprint-landscape .place-oc.place-bg {
background-color: inherit; /* Allow bg= parameter */
padding: 0.5em;
margin-top: -0.75em;
border-radius: 3px;
}
/* LH elements: positioned markers */
body.preprint-landscape .place-lh {
float: none;
background: none;
padding: 0;
margin: 0;
margin-top: -0.1em;
margin-right: 0.5em;
z-index: 10;
}
body.preprint-landscape .place-lh img {
height: 1.4em !important;
width: auto !important;
max-width: 3em !important;
margin-top: -0.45em;
}
body.preprint-landscape .place-lh a {
display: block;
height: 100%;
text-decoration: none;
color: #36c;
}
body.preprint-landscape .place-lh a:hover {
text-decoration: underline;
}
/* OC table wrapper: positioned */
body.preprint-landscape .preprint-table-oc-wrapper {
background: none;
padding: 0;
margin: 0;
margin-top: -0.4em;
border-radius: 0;
}
body.preprint-landscape .preprint-table-oc-wrapper table {
width: 100%;
max-width: 100%;
}
body.preprint-landscape.skin-minerva .preprint-table-oc-wrapper table {
font-size: 0.75em;
}
body.preprint-landscape .preprint-table-oc-wrapper table.wikitable,
body.preprint-landscape .preprint-table-oc-wrapper table.wikitable td {
background-color: #fff;
}
/* OC images */
body.preprint-landscape .place-oc img {
max-width: 100%;
height: auto;
}
/* ============================================
4. PORTRAIT MODE - Explicit Block
Applied by JS when screen.width < 768
Mostly matches defaults, but explicit for clarity
============================================ */
body.preprint-portrait .preprint-layout {
display: block;
}
body.preprint-portrait .preprint-layout > * {
width: 100%;
max-width: 100%;
}
body.preprint-portrait .inner-column {
display: block;
position: static;
width: 100%;
}
body.preprint-portrait .outer-column {
display: none;
}
body.preprint-portrait .oc-marker {
visibility: hidden;
width: 0;
height: 0;
overflow: hidden;
}
/* OC: gray background box */
body.preprint-portrait .place-oc {
display: block;
position: static;
top: auto;
background: #eaecf0;
padding: 0.75em;
margin: 0.5em 0;
border-radius: 3px;
}
/* LH: float right */
body.preprint-portrait .place-lh {
float: right !important;
display: inline-block !important;
position: static !important;
top: auto !important;
background: #eaecf0;
padding: 0.1em 0.4em;
border-radius: 2px;
margin: 0 0 0.2em 0.3em;
}
body.preprint-portrait .place-lh.lh-has-media {
background: none;
padding: 0.1em;
}
body.preprint-portrait .place-lh img,
body.preprint-portrait .place-lh .lazy-image-placeholder {
height: 1.4em !important;
width: auto !important;
max-width: 3em !important;
}
/* OC table wrapper */
body.preprint-portrait .preprint-table-oc-wrapper {
display: block;
position: static;
top: auto;
background: none;
padding: 0.75em;
margin: 0.5em 0;
border-radius: 3px;
box-sizing: border-box;
width: 100%;
}
body.preprint-portrait .preprint-table-oc-wrapper table.wikitable {
margin: 0;
}
/* Tables */
body.preprint-portrait.skin-minerva .preprint-table-oc-wrapper table {
font-size: 0.75em;
}
body.preprint-portrait table.wikitable {
display: table;
width: 100%;
}
body.preprint-portrait .preprint-2c-wrapper {
display: table;
width: 100%;
}
body.preprint-portrait .preprint-table-oc-wrapper.place-oc {
background: #eaecf0;
padding: 0.75em;
}
body.preprint-portrait .preprint-table-oc-wrapper table.wikitable,
body.preprint-portrait .preprint-table-oc-wrapper table.wikitable td {
background: #fff;
}
/* Images */
body.preprint-portrait .preprint-layout img {
max-width: 100%;
height: auto;
}
body.preprint-portrait .place-2c img,
body.preprint-portrait .preprint-2c-wrapper img {
width: 100%;
height: auto;
}
/* Lazy-load stability */
body.preprint-portrait .lazy-image-placeholder {
min-height: 1.4em;
}
/* ============================================
5. PLACE TEMPLATE - Mode-Agnostic Rules
============================================ */
.place-ic {
display: block;
margin: 1rem 0;
}
.place-ic img {
max-width: 100%;
height: auto;
}
.place-small {
font-size: 0.875em;
}
.skin-minerva .place-small {
font-size: 0.75em;
}
.place-bg {
border-radius: 3px;
}
.place-2c {
width: 100%;
line-height: 1.6;
}
.place-2c img {
max-width: 100%;
height: auto;
}
/* ============================================
6. TABLES - Wrappers and Validation
============================================ */
.preprint-table-ic-wrapper {
width: 100%;
}
.preprint-table-ic-wrapper table {
width: 100%;
max-width: 100%;
}
/* Validation: Red border for unwrapped tables */
.preprint-layout table:not(.preprint-2c-wrapper):not(.preprint-table-ic-wrapper table):not(.preprint-table-oc-wrapper table):not(.preprint-2c-wrapper table) {
border: 3px solid #d33 !important;
}
/* Exclude tables inside wrappers from red border */
.preprint-table-ic-wrapper table,
.preprint-table-oc-wrapper table,
.preprint-2c-wrapper table {
border: revert !important;
}
/* IC table width enforcement */
.preprint-table-ic-wrapper > table {
max-width: 100%;
box-sizing: border-box;
}
/* ============================================
8. SNIPPET (Collaboration)
============================================ */
.snippet {
margin: 1rem 0;
padding: 1rem;
background: #f8f9fa;
border-left: 3px solid #72777d;
}
.snippet-quote {
margin-bottom: 0.5em;
}
.snippet-context {
font-size: 0.875em;
color: #54595d;
margin-bottom: 0.5em;
}
.snippet-source {
font-size: 0.875em;
text-align: right;
}
/* ============================================
9. SELECTION-TO-TALK BUTTON
============================================ */
.snippet-button {
background: #fc3;
color: #222;
border: none;
border-radius: 2px;
padding: 0.4em 0.8em;
font-size: 0.875em;
cursor: pointer;
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.snippet-button:hover {
background: #eb2;
}
/* ============================================
10. ERROR STYLING
============================================ */
.error {
color: #d33;
font-weight: bold;
}
/* Book navigation sidebar link (Vector only) */
@media (max-width: 850px) {
.book-nav-sidebar {
display: none;
}
}
/* ============================================
12. BOOK NAVIGATION ICON
============================================ */
.book-nav-icon {
position: fixed;
bottom: 1em;
right: 1em;
z-index: 1000;
padding: 5px;
border-radius: 3px;
opacity: 0.6;
transition: opacity 0.2s;
line-height: 0;
}
.book-nav-icon:hover,
.book-nav-icon:active {
opacity: 1;
}
.book-nav-icon img {
display: block;
height: 1.6em;
width: auto;
}
/* Minerva: dark pill with inverted logo */
.skin-minerva .book-nav-icon {
background: #000;
opacity: 0.85;
}
.skin-minerva .book-nav-icon img {
filter: invert(1);
}
/* ============================================
11. DEBUG STYLES (optional)
============================================ */
.debug-preprint .preprint-layout {
border: 2px solid blue;
padding: 10px;
position: relative;
}
.debug-preprint .preprint-layout::before {
content: "LAYOUT";
position: absolute;
top: -10px;
left: 10px;
background: white;
color: blue;
font-size: 10px;
padding: 0 5px;
}
.debug-preprint .inner-column {
background: rgba(0, 255, 0, 0.1);
border: 1px dashed green;
position: relative;
}
.debug-preprint .inner-column::before {
content: "IC";
position: absolute;
top: 0;
right: 0;
background: green;
color: white;
font-size: 10px;
padding: 2px;
}
.debug-preprint .outer-column {
background: rgba(255, 0, 255, 0.1);
border: 1px dashed purple;
position: relative;
}
.debug-preprint .outer-column::before {
content: "OC";
position: absolute;
top: 0;
right: 0;
background: purple;
color: white;
font-size: 10px;
padding: 2px;
}
.debug-preprint .place-lh {
outline: 1px solid orange;
}
.debug-preprint .place-2c {
outline: 1px solid red;
}
/* === PREPRINT END === */
/* Unified Consent System JavaScript v250911r1
* Single file for both EN and DE versions
* Automatically detects language based on domain
*/
/* Common JavaScript - Keep only consent system if needed */
// Language detection helper
function getCurrentLanguage() {
var hostname = window.location.hostname;
return (hostname === 'de.transformal.com' ||
hostname === 'de.olaflangmack.info' ||
hostname === 'de.mediawiki.transformal.com') ? 'de' : 'en';
}
// Localized strings
var strings = {
en: {
journalingEnabled: 'Journaling enabled',
journalingDisabled: 'Journaling disabled',
proofOfWorkEnabled: 'Proof-of-work enabled',
proofOfWorkDisabled: 'Proof-of-work disabled',
preferencesSaved: 'Your preferences are being saved',
checkboxLabel: 'Enabled'
},
de: {
journalingEnabled: 'Aufzeichnungen zugelassen',
journalingDisabled: 'Aufzeichnungen nicht zugelassen',
proofOfWorkEnabled: 'Proof-of-work zugelassen',
proofOfWorkDisabled: 'Proof-of-work nicht zugelassen',
preferencesSaved: 'Ihre Einstellungen werden gespeichert',
checkboxLabel: 'Erlaubt'
}
};
function getString(key) {
var lang = getCurrentLanguage();
return strings[lang][key] || strings.en[key];
}
// Handle consent acquisition box - 90-day reminder for everyone
$(document).ready(function() {
var consentBox = document.getElementById('consent-acquisition-box');
if (!consentBox) return;
// Check if dismissed within last 90 days
var dismissedUntil = localStorage.getItem('consent-acquisition-dismissed-until');
var now = Date.now();
if (dismissedUntil && parseInt(dismissedUntil) > now) {
// Still within 90-day dismissal period
consentBox.style.display = 'none';
} else {
// Show box - dismissal expired or never dismissed
consentBox.style.display = 'block';
consentBox.classList.add('show');
}
consentBox.addEventListener('click', function() {
sessionStorage.setItem('consent-acquisition-dismissed', 'true');
// ADD THIS LINE:
localStorage.setItem('consent-acquisition-dismissed-until', Date.now() + (90 * 24 * 60 * 60 * 1000));
var targetPage = getCurrentLanguage() === 'de' ?
'/wiki/Transformal_GmbH:Einstellungen' :
'/wiki/Transformal_GmbH:Settings';
window.location.href = targetPage;
});
});
// Convert template placeholders to actual checkboxes
$(function() {
$('.consent-option').each(function() {
var $option = $(this);
if ($option.find('.consent-checkbox').length > 0) return;
var consentId = $option.find('.consent-data').text().trim();
var status = $option.find('.consent-status-data').text().trim();
var $checkboxRow = $option.find('.checkbox-row');
if (!$checkboxRow.length) return;
var $container = $('<span class="checkbox-container"></span>');
var $checkbox = $('<input>', {
type: 'checkbox',
id: consentId,
class: 'consent-checkbox'
});
if (status === 'disabled') {
$checkbox.prop('disabled', true);
}
var label = $option.find('.checkbox-placeholder').attr('data-label') || getString('checkboxLabel');
var $label = $('<label>', {
'for': consentId,
text: ' ' + label,
style: 'cursor: pointer;'
});
$container.append($checkbox).append($label);
$checkboxRow.append($container);
$checkboxRow.find('.checkbox-placeholder').remove();
var saved = localStorage.getItem(consentId) === 'true';
$checkbox.prop('checked', saved);
$checkbox.on('change', function() {
localStorage.setItem(consentId, this.checked);
if (typeof handleConsentChange === 'function') {
handleConsentChange(consentId, this.checked);
}
if (typeof showConsentFeedback === 'function') {
showConsentFeedback(consentId, this.checked);
}
});
});
});
// Handle consent changes for different features
function handleConsentChange(feature, enabled) {
if (feature === 'matomo-consent') {
if (enabled) {
if (window._paq) {
// Enable enhanced tracking
_paq.push(['setCookieConsentGiven']);
_paq.push(['setConsentGiven']);
// Track this page view again with full details
_paq.push(['trackPageView']);
_paq.push(['enableHeartBeatTimer']);
_paq.push(['trackVisibleContentImpressions']);
}
} else {
if (window._paq) {
// Revert to anonymous tracking only
_paq.push(['forgetCookieConsentGiven']);
_paq.push(['forgetConsentGiven']);
// Note: Already tracked pages remain in this session
}
}
}
}
// Show feedback when consent changes
function showConsentFeedback(feature, enabled) {
var feedbackDiv = document.getElementById('consent-feedback');
if (!feedbackDiv) return;
var message = '';
if (feature === 'matomo-consent') {
message = enabled ? getString('journalingEnabled') : getString('journalingDisabled');
} else if (feature === 'altcha-consent') {
message = enabled ? getString('proofOfWorkEnabled') : getString('proofOfWorkDisabled');
}
if (message) {
feedbackDiv.innerHTML = message + ' – ' + getString('preferencesSaved');
feedbackDiv.style.display = 'block';
setTimeout(function() {
feedbackDiv.style.display = 'none';
}, 3000);
}
}
/* Template 'ConditionalContent' - v250925r8 */
/* Two templates for alternative running text (ConditionalContent) and alternative sections (ConditionalSection) */
mw.loader.using('mediawiki.user').then(function() {
if (mw.user.isAnon()) {
// Inline content
$('.logged-out-only').each(function() {
if ($(this).is(':empty') || !$(this).text().replace(/\s/g, '')) {
$(this).css('display', 'none');
} else {
$(this).css('display', 'inline');
}
});
$('.logged-in-only').css('display', 'none');
// Block content
$('.logged-out-section').each(function() {
if ($(this).is(':empty') || !$(this).text().replace(/\s/g, '')) {
$(this).css('display', 'none');
} else {
$(this).css('display', 'block');
}
});
$('.logged-in-section').css('display', 'none');
} else {
// Inline content
$('.logged-in-only').each(function() {
if ($(this).is(':empty') || !$(this).text().replace(/\s/g, '')) {
$(this).css('display', 'none');
} else {
$(this).css('display', 'inline');
}
});
$('.logged-out-only').css('display', 'none');
// Block content
$('.logged-in-section').each(function() {
if ($(this).is(':empty') || !$(this).text().replace(/\s/g, '')) {
$(this).css('display', 'none');
} else {
$(this).css('display', 'block');
}
});
$('.logged-out-section').css('display', 'none');
}
// Clean TOC
var toc = $('.vector-toc')[0] || $('#toc')[0] || $('.toc')[0];
if (toc) {
$('.logged-in-section:hidden, .logged-out-section:hidden').each(function() {
$(this).find('h1, h2, h3, h4, h5, h6').each(function() {
var id = this.id || $(this).find('.mw-headline').attr('id');
if (id) {
$(toc).find('a[href="#' + id + '"]').closest('li').remove();
}
});
});
}
});