MediaWiki:Common.css: Difference between revisions
From Cobi Collectors Wiki
No edit summary |
No edit summary |
||
| Line 201: | Line 201: | ||
.brickparent { | .brickparent { | ||
display: grid !important; | display: grid !important; | ||
/* | /* Spaltenbreite etwas größer als die Grafik (134px + Puffer) */ | ||
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); | grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important; | ||
gap: | gap: 20px; | ||
padding: | padding: 25px; | ||
background: #ebecf0; | background: #ebecf0; | ||
border: var(--border-gray); | border: var(--border-gray); | ||
| Line 210: | Line 210: | ||
border-radius: 8px; | border-radius: 8px; | ||
margin: 20px 0; | margin: 20px 0; | ||
justify-items: center; /* Zentriert die Bricks im Raster */ | |||
justify-items: center; | |||
} | } | ||
/* Wir sorgen dafür, dass die MediaWiki-Wrapper nicht kollabieren */ | |||
.brickparent > * { | .brickparent > * { | ||
display: | display: block !important; | ||
width: 134px !important; /* Exakte Breite der Grafik */ | |||
margin: 0 auto; | |||
} | } | ||
/* Der Hover-Effekt ( | /* Der Hover-Effekt (jetzt auch auf innercenter-Niveau) */ | ||
.brickparent a, | .brickparent a, | ||
.brickparent .mw-file-description { | .brickparent .mw-file-description { | ||
| Line 226: | Line 226: | ||
transition: transform 0.2s ease-in-out !important; | transition: transform 0.2s ease-in-out !important; | ||
cursor: pointer; | cursor: pointer; | ||
padding: | padding: 8px; | ||
border-radius: 6px; | |||
} | } | ||
| Line 234: | Line 233: | ||
.brickparent .mw-file-description:hover { | .brickparent .mw-file-description:hover { | ||
transform: scale(1.1); | transform: scale(1.1); | ||
background-color: rgba(159, 182, 205, 0. | background-color: rgba(159, 182, 205, 0.3); | ||
} | } | ||
/* Bild-Anpassung: | /* Bild-Anpassung: Wir geben die exakten Pixel vor */ | ||
.brickparent img { | .brickparent img { | ||
width: 134px !important; /* Deine Originalbreite */ | |||
width: | height: 96px !important; /* Deine Originalhöhe */ | ||
display: block; | |||
object-fit: contain; | |||
/* Optional: Falls die Logos auf dem Grau untergehen, hilft ein leichter Schatten */ | |||
filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.2)); | |||
filter: drop-shadow(2px | |||
} | } | ||
Revision as of 19:43, 1 February 2026
/* ==========================================================================
1. VARIABLEN & BASIS-STYLING
========================================================================== */
:root {
--bg-light: #ebecf0;
--border-gray: 1px solid #aaa;
--shadow-dark: 5px 5px 10px black;
--accent-blue: #9FB6CD;
}
.mw-parser-output img {
max-width: 100%;
height: auto;
}
/* Gemeinsame Basis für alle Box-Elemente */
.infobox, .headersetpage, .headernocolumn, .headercatpage,
.box1, .box2, .box3, .box4 {
background: var(--bg-light);
border: var(--border-gray);
box-shadow: var(--shadow-dark);
box-sizing: border-box;
}
/* ==========================================================================
2. BOX-ELEMENTE & HEADERS
========================================================================== */
.infobox {
float: right;
margin: 0 0 0.5em 0.5em;
padding: 0.5em;
width: 300px;
vertical-align: middle;
}
.headersetpage, .headernocolumn, .headercatpage {
width: 100%;
margin-bottom: 20px;
padding: 8px 15px;
font-size: 18px;
}
.headernocolumn { height: 80px; font-size: 16px; }
.headercatpage { height: 100px; }
.textbox {
width: 50%;
background: var(--bg-light);
border: 2px solid var(--accent-blue);
padding: 8px 15px;
margin: 0 auto;
}
.box-headline {
background-color: var(--accent-blue);
font-size: 16px;
padding: 8px 12px;
margin-bottom: 15px;
border: 1px solid #8aa3bc;
border-radius: 4px;
font-weight: bold;
display: block;
box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
text-align: left !important;
}
/* ==========================================================================
3. LOGO & TEXT BEREICH
========================================================================== */
.aboutsetlogo {
width: 150px;
float: left;
margin: 0 30px 15px 0;
}
.aboutsetlogo img {
width: 100% !important;
height: auto !important;
}
.aboutsettext {
overflow: hidden;
min-height: 120px;
}
/* ==========================================================================
4. TABELLEN (COBITABLE)
========================================================================== */
.cobitable {
background-color: #f8f9fa;
color: #202122;
margin: 1em auto;
border: 1px solid #000;
border-collapse: collapse;
display: table;
overflow-x: auto;
width: fit-content;
max-width: 100%;
box-shadow: var(--shadow-dark);
border-radius: 4px;
}
.cobitable th, .cobitable td {
border: 1px solid #444 !important;
padding: 0.6em 0.8em;
}
.cobitable th {
background-color: var(--accent-blue);
font-weight: bold;
text-align: center;
}
/* ==========================================================================
5. GRIDS (MAINPAGE)
========================================================================== */
.mainparent {
display: grid;
grid-template-columns: 4fr 6fr;
gap: 15px;
}
.box1 { grid-column: 1 / 3; padding: 15px; }
.box2 { grid-column: 1; padding: 15px; }
.box3 { grid-column: 1; padding: 15px; }
.box4 { grid-column: 2; grid-row: 2 / 4; padding: 15px; text-align: center; }
.box4-content {
display: flex !important;
flex-wrap: wrap !important;
justify-content: center !important;
gap: 35px !important; /* Erzeugt horizontalen und vertikalen Abstand */
margin-top: 10px;
}
/* Wir sorgen dafür, dass die Links nebeneinander bleiben */
.box4-content a,
.box4-content .mw-file-description {
display: inline-flex !important; /* 'inline' hält sie in der Zeile */
margin: 0 !important;
padding: 0 !important;
}
.box4-content img {
width: 150px !important; /* Feste Breite für das Raster */
height: auto !important;
border-radius: 4px;
transition: transform 0.3s ease;
display: block;
}
.box4-content img:hover {
transform: scale(1.08);
}
.innercenter {
display: grid !important;
/* Erzeugt Spalten, die min. so groß wie das Bild sind, aber max. 150px */
grid-template-columns: repeat(auto-fill, minmax(100px, 150px));
gap: 15px;
justify-content: flex-start; /* Oder 'center', falls gewünscht */
align-items: center;
margin: 15px 0;
}
/* Wir bändigen alle direkten Kinder (Wrapper von MediaWiki) */
.innercenter > * {
display: block !important;
width: 100% !important;
max-width: 150px !important;
}
/* Das Bild passt sich dem Grid-Platz an */
.innercenter img {
width: auto !important;
max-width: 100% !important;
height: auto !important;
display: block;
margin: 0 auto !important; /* Zentriert das Bild innerhalb seiner Grid-Zelle */
}
.innercenter a,
.innercenter .mw-file-description {
display: inline-block !important;
transition: transform 0.2s ease-in-out !important;
cursor: pointer;
padding: 5px;
border-radius: 4px;
}
.innercenter a:hover,
.innercenter .mw-file-description:hover {
transform: scale(1.05);
background-color: rgba(159, 182, 205, 0.2);
z-index: 10;
}
/* ==========================================================================
6. BRICK-CONTAINER (DER FINALE LINKS-FIX)
========================================================================== */
.brickparent {
display: grid !important;
/* Spaltenbreite etwas größer als die Grafik (134px + Puffer) */
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
gap: 20px;
padding: 25px;
background: #ebecf0;
border: var(--border-gray);
box-shadow: var(--shadow-dark);
border-radius: 8px;
margin: 20px 0;
justify-items: center; /* Zentriert die Bricks im Raster */
}
/* Wir sorgen dafür, dass die MediaWiki-Wrapper nicht kollabieren */
.brickparent > * {
display: block !important;
width: 134px !important; /* Exakte Breite der Grafik */
margin: 0 auto;
}
/* Der Hover-Effekt (jetzt auch auf innercenter-Niveau) */
.brickparent a,
.brickparent .mw-file-description {
display: block !important;
transition: transform 0.2s ease-in-out !important;
cursor: pointer;
padding: 8px;
border-radius: 6px;
}
.brickparent a:hover,
.brickparent .mw-file-description:hover {
transform: scale(1.1);
background-color: rgba(159, 182, 205, 0.3);
}
/* Bild-Anpassung: Wir geben die exakten Pixel vor */
.brickparent img {
width: 134px !important; /* Deine Originalbreite */
height: 96px !important; /* Deine Originalhöhe */
display: block;
object-fit: contain;
/* Optional: Falls die Logos auf dem Grau untergehen, hilft ein leichter Schatten */
filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.2));
}
/* ==========================================================================
7. MOBILE OPTIMIERUNG
========================================================================== */
@media screen and (max-width: 720px) {
.mainparent {
display: flex;
flex-direction: column;
}
.box1, .box2, .box3, .box4, .infobox, .textbox {
width: 100% !important;
float: none !important;
margin: 0 0 15px 0 !important;
}
.headernocolumn, .headercatpage { height: auto; }
.brickparent {
gap: 10px;
justify-content: center !important; /* Mobile bleibt zentriert oft besser */
}
.brickparent img {
max-width: 120px !important;
}
.brickparent a,
.brickparent .mw-file-description {
float: none !important; /* Auf Mobile kein Float */
display: inline-block !important;
margin-right: 10px !important;
margin-bottom: 15px !important;
}
.innercenter {
grid-template-columns: repeat(auto-fill, minmax(80px, 150px));
gap: 10px;
justify-content: center;
}
.innercenter * {
max-width: 150px !important;
}
}
