MediaWiki:Common.css: Difference between revisions

From Cobi Collectors Wiki
No edit summary
No edit summary
Line 1: Line 1:
/* ==========================================================================
/* ==========================================================================
   1. BASIS-STYLING & BILDER
   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 {
.mw-parser-output img {
     max-width: 100%;
     max-width: 100%;
     height: auto;
     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 (DEIN ORIGINAL-DESIGN)
   2. BOX-ELEMENTE & HEADERS
   ========================================================================== */
   ========================================================================== */
.infobox {
.infobox {
    box-shadow: 5px 5px 10px black;
    vertical-align: middle;
    background: #ebecf0;
    border: 1px solid #aaa;
     float: right;
     float: right;
     margin: 0 0 0.5em 0.5em;
     margin: 0 0 0.5em 0.5em;
     padding: 0.5em;
     padding: 0.5em;
     width: 300px;
     width: 300px;
    vertical-align: middle;
}
}


Line 24: Line 37:
     width: 100%;
     width: 100%;
     margin-bottom: 20px;
     margin-bottom: 20px;
    background: #ebecf0;
    border: 1px solid #aaa;
     padding: 8px 15px;
     padding: 8px 15px;
    box-shadow: 5px 5px 10px black;
     font-size: 18px;
     font-size: 18px;
    box-sizing: border-box;
}
}


Line 37: Line 46:
.textbox {
.textbox {
     width: 50%;
     width: 50%;
     background: #ebecf0;
     background: var(--bg-light);
     border: 2px solid #9FB6CD;
     border: 2px solid var(--accent-blue);
     padding: 8px 15px;
     padding: 8px 15px;
     margin: 0 auto;
     margin: 0 auto;
Line 44: Line 53:


.box-headline {
.box-headline {
     background-color: #9FB6CD;
     background-color: var(--accent-blue);
     font-size: 16px;
     font-size: 16px;
     padding: 8px 12px; /* Innenabstand im blauen Balken */
     padding: 8px 12px;
     margin: 0 0 15px 0; /* Nur ein Abstand nach unten zum Text, aber kein negativer Margin zu den Seiten */
     margin-bottom: 15px;
     border: 1px solid #8aa3bc; /* Optional: Ein feiner Rahmen um den Balken */
     border: 1px solid #8aa3bc;
     border-radius: 4px; /* Optional: Leicht abgerundete Ecken, passend zum "schwebenden" Look */
     border-radius: 4px;
     font-weight: bold;
     font-weight: bold;
     display: block;
     display: block;
     box-shadow: 2px 2px 5px rgba(0,0,0,0.1); /* Optional: Ein kleiner Schatten für den Balken */
     box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
    text-align: left;
}
 
.innercenter {
    text-align: center;
    padding: 15px;
}
}


/* ==========================================================================
/* ==========================================================================
   3. LOGO BEREICH (BILD-GRÖSSE ERZWINGEN)
   3. LOGO & TEXT BEREICH
   ========================================================================== */
   ========================================================================== */
.aboutsetlogo {
.aboutsetlogo {
     width: 150px;  
     width: 150px;  
     float: left;
     float: left;
     margin-right: 30px;
     margin: 0 30px 15px 0;
    margin-bottom: 15px;
    display: block;
}
}


/* Dieser Teil stellt sicher, dass das BILD im Container mitwächst */
.aboutsetlogo img {
.aboutsetlogo img {
     width: 100% !important;
     width: 100% !important;
     height: auto !important;
     height: auto !important;
    max-width: none !important; /* Hebt globale Begrenzungen auf */
}
}


.aboutsettext {
.aboutsettext {
    display: block;
     overflow: hidden;  
     overflow: hidden;  
     min-height: 120px;
     min-height: 120px;
Line 90: Line 88:
.cobitable {
.cobitable {
     background-color: #f8f9fa;
     background-color: #f8f9fa;
    color: #202122;
     margin: 1em auto;
     margin: 1em auto;
     border: 1px solid #000;
     border: 1px solid #000;
Line 106: Line 103:


.cobitable th {
.cobitable th {
     background-color: #9FB6CD;
     background-color: var(--accent-blue);
     font-weight: bold;
     font-weight: bold;
     text-align: center;
     text-align: center;
Line 112: Line 109:


/* ==========================================================================
/* ==========================================================================
   5. GRIDS (MAINPAGE & BRICKS) - OPTIMIERT (40:60)
   5. GRIDS (MAINPAGE) - SAUBERE STRUKTUR
   ========================================================================== */
   ========================================================================== */
.mainparent {
.mainparent {
     display: grid;
     display: grid;
     /* ÄNDERUNG: Von 'repeat(2, 1fr)' zu '0.4fr 0.6fr' für das 40:60 Verhältnis */
     grid-template-columns: 4fr 6fr; /* 40:60 Verhältnis */
     grid-template-columns: 40fr 60fr;
     gap: 15px;
    grid-template-rows: auto repeat(2, 1fr);
    grid-column-gap: 15px;
    grid-row-gap: 15px;
}
}


/* BOX-DEFINITIONEN */
.box1 { grid-column: 1 / 3; padding: 15px; }
.box1 {  
.box2 { grid-column: 1; padding: 15px; }
    grid-area: 1 / 1 / 2 / 3;  
.box3 { grid-column: 1; padding: 15px; }
    background: #ebecf0;
.box4 { grid-column: 2; grid-row: 2 / 4; padding: 15px; text-align: center; }
    border: 1px solid #aaa;
    padding: 15px !important;  
    box-shadow: 5px 5px 10px black;
    height: auto !important;
    overflow: hidden;
}
 
.box2 {  
    grid-area: 2 / 1 / 3 / 2;  
    background: #ebecf0;
    border: 1px solid #aaa;
    padding: 15px;  
    box-shadow: 5px 5px 10px black;
}
 
.box3 {  
    grid-area: 3 / 1 / 4 / 2;  
    background: #ebecf0;
    border: 1px solid #aaa;
    padding: 15px;  
    box-shadow: 5px 5px 10px black;
}
 
.box4 {  
    grid-area: 2 / 2 / 4 / 3;
    background: #ebecf0;  
    border: 1px solid #aaa;
    padding: 15px;  
    box-shadow: 5px 5px 10px black;
    text-align: center;  
}
 
/* Bilder-Zentrierung in Box 4 */
.box4 img {
    margin: 5px auto;
    display: inline-block;
}
 
/* Container für die Bilder innerhalb von Box 4 */
.box4-content {
    display: flex;
    flex-wrap: wrap;      /* Erlaubt Zeilenumbruch, wenn der Platz nicht reicht */
    justify-content: center; /* Zentriert die Bilder horizontal */
    gap: 15px;            /* Moderner Abstand zwischen den Bildern */
    margin-top: 10px;
}


/* Bild-Container in Box 4 */
.box4-content {
.box4-content {
     display: flex;
     display: flex;
Line 182: Line 131:
}
}


.box4-content .mw-file-description,
.box4-content a img,
.box4-content img {
.box4-content img {
    display: inline-block;
     max-width: 150px;
    width: 100% !important;
     height: auto;
     max-width: 150px !important; /* Hier die gewünschte Breite erzwingen */
     height: auto !important;
     border-radius: 4px;
     border-radius: 4px;
     transition: transform 0.3s ease;
     transition: transform 0.3s ease;
}
}


.box4-content img:hover {
.box4-content img:hover { transform: scale(1.05); }
    transform: scale(1.05);
}
 
.brickparent > div { text-align: center; }


/* ==========================================================================
/* ==========================================================================
   6. MOBILE OPTIMIERUNG (DER FINALE FIX)
   6. MOBILE OPTIMIERUNG
   ========================================================================== */
   ========================================================================== */
@media screen and (max-width: 720px) {
@media screen and (max-width: 720px) {
    /* Das Grid komplett auflösen */
     .mainparent {
     .mainparent {
         display: block !important; /* Flex/Grid durch Block ersetzen für maximale Stabilität */
         display: flex;
         width: 100% !important;
         flex-direction: column;
        padding: 0 !important;
     }
     }


    /* Alle Boxen (box1 bis box4) radikal auf 100% Breite setzen */
     .box1, .box2, .box3, .box4, .infobox, .textbox {
     .box1, .box2, .box3, .box4 {
         width: 100% !important;
         width: 100% !important;
        grid-area: auto !important; /* WICHTIG: Hebt die Raster-Positionierung auf */
        margin: 0 0 20px 0 !important; /* Abstand nach unten */
        box-sizing: border-box !important; /* Padding wird in die 100% eingerechnet */
         float: none !important;
         float: none !important;
        display: block !important;
         margin: 0 0 15px 0 !important;
    }
 
    .infobox {
        float: none !important;
        width: 100% !important;
         margin: 0 0 1em 0 !important;
        box-sizing: border-box !important;
    }
 
    .textbox {
        width: 100% !important;
        box-sizing: border-box !important;
     }
     }
   
    .headernocolumn, .headercatpage { height: auto; }
}
}

Revision as of 19:01, 31 January 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);
}

/* ==========================================================================
   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;
    margin: 1em auto;
    border: 1px solid #000;
    border-collapse: collapse;
    display: block; 
    overflow-x: auto;
    width: fit-content;
    max-width: 100%;
}

.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) - SAUBERE STRUKTUR
   ========================================================================== */
.mainparent {
    display: grid;
    grid-template-columns: 4fr 6fr; /* 40:60 Verhältnis */
    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; }

/* Bild-Container in Box 4 */
.box4-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.box4-content img {
    max-width: 150px;
    height: auto;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.box4-content img:hover { transform: scale(1.05); }

/* ==========================================================================
   6. 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; }
}