MediaWiki:Common.css: Difference between revisions

From Cobi Collectors Wiki
No edit summary
No edit summary
 
(29 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* Punkt vor img entfernt, damit es alle Bilder anspricht */
/* ==========================================================================
  1. BASIS-STYLING & BILDER
  ========================================================================== */
.mw-parser-output img {
.mw-parser-output img {
     max-width: 100%;
     max-width: 100%;
Line 5: Line 7:
}
}


/* Tabellen-Scroll-Fix */
/* ==========================================================================
.cobitable {
  2. BOX-ELEMENTE & HEADERS (DEIN ORIGINAL-DESIGN)
  background-color: #f8f9fa;
   ========================================================================== */
  color: #202122;
  margin: 1em 0;
  border: 1px solid #a2a9b1;
  border-collapse: collapse;
  display: block; /* Erlaubt horizontales Scrollen */
   overflow-x: auto;
}
 
/* --- BOXEN & LAYOUT --- */
 
.infobox {
.infobox {
     box-shadow: 5px 5px 10px black;
     box-shadow: 5px 5px 10px black;
Line 26: Line 18:
     margin: 0 0 0.5em 0.5em;
     margin: 0 0 0.5em 0.5em;
     padding: 0.5em;
     padding: 0.5em;
     width: 300px; /* Feste Breite für Desktop */
     width: 300px;
    max-width: 100%; /* Verhindert Überlappen auf Mobilgeräten */
}
}


Line 38: Line 29:
     box-shadow: 5px 5px 10px black;
     box-shadow: 5px 5px 10px black;
     font-size: 18px;
     font-size: 18px;
     box-sizing: border-box; /* Wichtig für korrekte Breite inkl. Padding */
     box-sizing: border-box;
}
}


/* Textbox auf Mobilgeräten breiter machen */
.headernocolumn { height: 80px; font-size: 16px; }
.headercatpage { height: 100px; }
 
.textbox {
.textbox {
     width: 80%; /* Standardmäßig breiter */
     width: 50%;
    min-width: 300px;
     background: #ebecf0;
     background: #ebecf0;
     border: 2px solid #9FB6CD;
     border: 2px solid #9FB6CD;
Line 51: Line 43:
}
}


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


/* --- MAINPAGE DESKTOP DESIGN --- */
.innercenter {
    text-align: center;
    padding: 15px;
}
 
/* ==========================================================================
  3. LOGO BEREICH (BILD-GRÖSSE ERZWINGEN)
  ========================================================================== */
.aboutsetlogo {
    width: 150px;
    float: left;
    margin-right: 30px;
    margin-bottom: 15px;
    display: block;
}
 
/* Dieser Teil stellt sicher, dass das BILD im Container mitwächst */
.aboutsetlogo img {
    width: 100% !important;
    height: auto !important;
    max-width: none !important; /* Hebt globale Begrenzungen auf */
}
 
.aboutsettext {
    display: block;
    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: 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: #9FB6CD;
    font-weight: bold;
    text-align: center;
}
 
/* ==========================================================================
  5. GRIDS (MAINPAGE & BRICKS) - OPTIMIERT (40:60)
  ========================================================================== */
.mainparent {
.mainparent {
     display: grid;
     display: grid;
     grid-template-columns: repeat(2, 1fr);
     /* ÄNDERUNG: Von 'repeat(2, 1fr)' zu '0.4fr 0.6fr' für das 40:60 Verhältnis */
     grid-template-rows: auto; /* Flexibel statt festen 160px */
    grid-template-columns: 40fr 60fr;  
     grid-template-rows: auto repeat(2, 1fr);  
     grid-column-gap: 15px;
     grid-column-gap: 15px;
     grid-row-gap: 15px;
     grid-row-gap: 15px;
}
}


/* Deine Original-Positionen */
/* BOX-DEFINITIONEN */
.box1 { grid-area: 1 / 1 / 2 / 3; background: #ebecf0; border: 1px solid #aaa; padding: 15px; }
.box1 {  
.box2 { grid-area: 2 / 1 / 3 / 2; background: #ebecf0; border: 1px solid #aaa; padding: 15px; }
    grid-area: 1 / 1 / 2 / 3;  
.box3 { grid-area: 3 / 1 / 4 / 2; background: #ebecf0; border: 1px solid #aaa; padding: 15px; }
    background: #ebecf0;  
.box4 { grid-area: 2 / 2 / 4 / 3; background: #ebecf0; border: 1px solid #aaa; padding: 15px; }
    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;
}


/* --- MOBILE OPTIMIERUNG (Nur für schmale Bildschirme) --- */
/* Container für die Bilder innerhalb von Box 4 */
@media screen and (max-width: 720px) {
.box4-content {
    .mainparent {
    display: flex;
        display: flex;
    flex-wrap: wrap;      /* Erlaubt Zeilenumbruch, wenn der Platz nicht reicht */
        flex-direction: column; /* Stapelt Boxen untereinander */
    justify-content: center; /* Zentriert die Bilder horizontal */
     }
    gap: 15px;            /* Moderner Abstand zwischen den Bildern */
    margin-top: 10px;
}
 
.box4-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
     margin-top: 10px;
}


    .box1, .box2, .box3, .box4 {
.box4-content .mw-file-description,
        width: 100%;
.box4-content a img,
        margin-bottom: 10px;
.box4-content img {
        /* Wir entfernen hier die grid-area Bindung für Mobilgeräte */
    display: inline-block;
        grid-area: unset;  
    width: 100% !important;
     }
    max-width: 150px !important; /* Hier die gewünschte Breite erzwingen */
   
    height: auto !important;
    .infobox {
     border-radius: 4px;
        float: none;
    transition: transform 0.3s ease;
        width: 100% !important;
        margin: 0 0 1em 0;
    }
}
}


/* Stein-Übersicht (Bricks) */
.box4-content img:hover {
.brickparent {
     transform: scale(1.05);
     display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); /* Automatisches Umbrechen */
    grid-gap: 10px;
    align-items: center;
    padding: 10px;
}
}


/* --- MOBILE ANPASSUNGEN (Media Queries) --- */
.brickparent > div { text-align: center; }


/* ==========================================================================
  6. MOBILE OPTIMIERUNG (DER FINALE FIX)
  ========================================================================== */
@media screen and (max-width: 720px) {
@media screen and (max-width: 720px) {
     /* Infobox nimmt volle Breite ein und rutscht nach oben/unten */
     /* Das Grid komplett auflösen */
     .infobox {
     .mainparent {
         float: none;
         display: block !important; /* Flex/Grid durch Block ersetzen für maximale Stabilität */
         width: 100%;
         width: 100% !important;
         margin: 0 0 1em 0;
         padding: 0 !important;
     }
     }


     /* Das Haupt-Grid wird einspaltig */
     /* Alle Boxen (box1 bis box4) radikal auf 100% Breite setzen */
    .mainparent {
        grid-template-columns: 1fr;
    }
   
     .box1, .box2, .box3, .box4 {
     .box1, .box2, .box3, .box4 {
         grid-area: auto !important; /* Hebt die starre Positionierung auf */
        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;
        display: block !important;
     }
     }


    /* Textbox auf volle Breite */
     .infobox {
     .textbox {
        float: none !important;
         width: 100%;
         width: 100% !important;
        margin: 0 0 1em 0 !important;
        box-sizing: border-box !important;
     }
     }


    /* Header-Höhen flexibel machen */
     .textbox {
     .headernocolumn, .headercatpage {
         width: 100% !important;
         height: auto;
         box-sizing: border-box !important;
         min-height: 80px;
    }
   
    /* Über uns Bereich */
    .aboutsettext {
        margin-left: 0;
        height: auto;
        text-align: center;
    }
    .aboutsetlogo {
        position: relative;
        display: block;
        margin: 0 auto 10px;
     }
     }
}
/* --- BOX-STYLING (BLAUE ÜBERSCHRIFTEN) --- */
.box-headline {
  background-color: #9FB6CD; /* Dein Blau-Ton */
  font-size: 16px;
  padding: 10px;
  font-weight: bold;
  margin: -15px -15px 15px -15px; /* Gleicht das Padding der Box aus */
  border-bottom: 1px solid #aaa;
}
.innercenter {
  text-align: center;
  padding: 15px;
}
}

Latest revision as of 13:16, 31 January 2026

/* ==========================================================================
   1. BASIS-STYLING & BILDER
   ========================================================================== */
.mw-parser-output img {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   2. BOX-ELEMENTE & HEADERS (DEIN ORIGINAL-DESIGN)
   ========================================================================== */
.infobox {
    box-shadow: 5px 5px 10px black;
    vertical-align: middle;
    background: #ebecf0;
    border: 1px solid #aaa;
    float: right;
    margin: 0 0 0.5em 0.5em;
    padding: 0.5em;
    width: 300px;
}

.headersetpage, .headernocolumn, .headercatpage {
    width: 100%;
    margin-bottom: 20px;
    background: #ebecf0;
    border: 1px solid #aaa;
    padding: 8px 15px;
    box-shadow: 5px 5px 10px black;
    font-size: 18px;
    box-sizing: border-box;
}

.headernocolumn { height: 80px; font-size: 16px; }
.headercatpage { height: 100px; }

.textbox {
    width: 50%;
    background: #ebecf0;
    border: 2px solid #9FB6CD;
    padding: 8px 15px;
    margin: 0 auto;
}

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

.innercenter {
    text-align: center;
    padding: 15px;
}

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

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

.aboutsettext {
    display: block;
    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: 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: #9FB6CD;
    font-weight: bold;
    text-align: center;
}

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

/* BOX-DEFINITIONEN */
.box1 { 
    grid-area: 1 / 1 / 2 / 3; 
    background: #ebecf0; 
    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;
}

.box4-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

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

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

.brickparent > div { text-align: center; }

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

    /* Alle Boxen (box1 bis box4) radikal auf 100% Breite setzen */
    .box1, .box2, .box3, .box4 {
        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;
        display: block !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;
    }
}