MediaWiki:Common.css: Difference between revisions

From Cobi Collectors Wiki
No edit summary
No edit summary
Line 1: Line 1:
/* Punkt vor img entfernt, damit es alle Bilder anspricht */
/* --- BASIS OPTIMIERUNG --- */
.mw-parser-output img {
.mw-parser-output img {
     max-width: 100%;
     max-width: 100%;
Line 5: Line 5:
}
}


/* Tabellen-Scroll-Fix */
/* --- LOGO & TEXT (ABOUT BEREICH) --- */
/* Diese Werte gelten jetzt korrekt für den Desktop */
.aboutsetlogo {
    width: 250px;
    height: auto;
    float: left;
    margin-right: 25px;
    margin-bottom: 15px;
    object-fit: contain;
    position: relative;
}
 
.aboutsettext {
    margin-left: 0;
    min-height: 150px;
}
 
.aboutsettext::after {
    content: "";
    display: table;
    clear: both;
}
 
/* --- TABELLEN --- */
.cobitable {
.cobitable {
   background-color: #f8f9fa;
   background-color: #f8f9fa;
   color: #202122;
   color: #202122;
   margin: 1em auto;
   margin: 1em auto;
   border: 1px solid #000; /* Deutlicher Außenrahmen */
   border: 1px solid #000;
   border-collapse: collapse;
   border-collapse: collapse;
   display: block;  
   display: block;  
   overflow-x: auto;
   overflow-x: auto;
   width: fit-content; /* Verhindert, dass die Tabelle unnötig die ganze Breite streckt */
   width: fit-content;
   max-width: 100%;
   max-width: 100%;
}
}


/* Rahmen für alle Zellen (Kopfzeile und Daten) */
.cobitable th, .cobitable td {
.cobitable th,  
   border: 1px solid #444 !important;
.cobitable td {
   border: 1px solid #444 !important; /* Dunklerer Rahmen für bessere Lesbarkeit */
   padding: 0.6em 0.8em;
   padding: 0.6em 0.8em;
}
}


/* Spezielle Formatierung für die Kopfzeile */
.cobitable th {
.cobitable th {
   background-color: #9FB6CD; /* Dein Cobi-Blau */
   background-color: #9FB6CD;
   color: #000;
   color: #000;
   font-weight: bold;
   font-weight: bold;
Line 33: Line 53:
}
}


/* --- BOXEN & LAYOUT --- */
/* --- BOXEN & HEADERS --- */
 
.infobox {
.infobox {
     box-shadow: 5px 5px 10px black;
     box-shadow: 5px 5px 10px black;
    vertical-align: middle;
     background: #ebecf0;
     background: #ebecf0;
     border: 1px solid #aaa;
     border: 1px solid #aaa;
Line 43: Line 61:
     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 */
     max-width: 100%;
}
}


Line 55: Line 73:
     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 */
.box-headline {
.textbox {
  background-color: #9FB6CD;
    width: 80%; /* Standardmäßig breiter */
  font-size: 16px;
    min-width: 300px;
  padding: 5px;
    background: #ebecf0;
  /* Damit die blaue Überschrift wieder bündig in der Box sitzt: */
    border: 2px solid #9FB6CD;
  margin: -15px -15px 10px -15px;  
    padding: 8px 15px;
  border-bottom: 1px solid #aaa;
    margin: 0 auto;
}
}


/* --- GRID SYSTEME (RESPONSIV) --- */
.innercenter {
  text-align: center;
  padding: 15px;
}


/* --- MAINPAGE DESKTOP DESIGN --- */
/* --- GRID SYSTEME --- */
.mainparent {
.mainparent {
     display: grid;
     display: grid;
     grid-template-columns: repeat(2, 1fr);
     grid-template-columns: repeat(2, 1fr);
     grid-template-rows: auto; /* Flexibel statt festen 160px */
     grid-gap: 15px;
    grid-column-gap: 15px;
    grid-row-gap: 15px;
}
}


/* Deine Original-Positionen */
.box1 { grid-area: 1 / 1 / 2 / 3; background: #ebecf0; border: 1px solid #aaa; padding: 15px; }
.box1 { grid-area: 1 / 1 / 2 / 3; background: #ebecf0; border: 1px solid #aaa; padding: 15px; }
.box2 { grid-area: 2 / 1 / 3 / 2; background: #ebecf0; border: 1px solid #aaa; padding: 15px; }
.box2 { grid-area: 2 / 1 / 3 / 2; background: #ebecf0; border: 1px solid #aaa; padding: 15px; }
Line 85: Line 102:
.box4 { grid-area: 2 / 2 / 4 / 3; background: #ebecf0; border: 1px solid #aaa; padding: 15px; }
.box4 { grid-area: 2 / 2 / 4 / 3; background: #ebecf0; border: 1px solid #aaa; padding: 15px; }


/* --- MOBILE OPTIMIERUNG (Nur für schmale Bildschirme) --- */
@media screen and (max-width: 720px) {
    .mainparent {
        display: flex;
        flex-direction: column; /* Stapelt Boxen untereinander */
    }
    .box1, .box2, .box3, .box4 {
        width: 100%;
        margin-bottom: 10px;
        /* Wir entfernen hier die grid-area Bindung für Mobilgeräte */
        grid-area: unset;
    }
   
    .infobox {
        float: none;
        width: 100% !important;
        margin: 0 0 1em 0;
    }
}
/* --- BRICK-ÜBERSICHT (DEKTOP: 4 SPALTEN, MOBIL: FLEXIBEL) --- */
.brickparent {
.brickparent {
     display: grid;
     display: grid;
    /* Standardmäßig 4 Spalten auf dem Desktop */
     grid-template-columns: repeat(4, 1fr);  
     grid-template-columns: repeat(4, 1fr);  
     grid-gap: 25px;
     grid-gap: 25px;
Line 116: Line 110:
}
}


/* Verhindert, dass die Bilder in den Bricks zu klein oder zu groß werden */
.brickparent > div { text-align: center; }
.brickparent > div {
    text-align: center;
}


/* Mobile Anpassung für die Steine */
/* --- MOBILE OPTIMIERUNG (Alles unter 720px) --- */
@media screen and (max-width: 1000px) {
@media screen and (max-width: 720px) {
     .brickparent {
     .mainparent {
         /* Auf Tablets 3 Spalten */
         display: flex;
         grid-template-columns: repeat(3, 1fr);
         flex-direction: column;
     }
     }
}


@media screen and (max-width: 600px) {
     .box1, .box2, .box3, .box4 {
     .brickparent {
         width: 100% !important;
         /* Auf dem Handy 2 Spalten, damit die Bilder erkennbar bleiben */
         grid-area: unset !important;
         grid-template-columns: repeat(2, 1fr);
        margin-bottom: 15px;
     }
     }
}


/* --- MOBILE ANPASSUNGEN (Media Queries) --- */
@media screen and (max-width: 720px) {
    /* Infobox nimmt volle Breite ein und rutscht nach oben/unten */
     .infobox {
     .infobox {
         float: none;
         float: none;
         width: 100%;
         width: 100% !important;
         margin: 0 0 1em 0;
         margin: 0 0 1em 0;
     }
     }


    /* Das Haupt-Grid wird einspaltig */
     .aboutsetlogo {
     .mainparent {
         float: none;
         grid-template-columns: 1fr;
        display: block;
    }
        margin: 0 auto 15px;
   
         width: 180px;
    .box1, .box2, .box3, .box4 {
         grid-area: auto !important; /* Hebt die starre Positionierung auf */
     }
     }


    /* Textbox auf volle Breite */
     .aboutsettext {
     .textbox {
         text-align: center;
         width: 100%;
        min-height: auto;
     }
     }


     /* Header-Höhen flexibel machen */
     .brickparent {
    .headernocolumn, .headercatpage {
         grid-template-columns: repeat(2, 1fr);
         height: auto;
         grid-gap: 15px;
         min-height: 80px;
     }
     }
   
    /* Über uns Bereich */
    .aboutsettext {
    margin-left: 0; /* Margin nicht mehr nötig durch float */
    min-height: 150px; /* Sorgt dafür, dass der Textbereich stabil bleibt */
}
/* Klare Trennung nach dem Logo-Bereich */
.aboutsettext::after {
    content: "";
    display: table;
    clear: both;
}
  .aboutsetlogo {
    width: 250px; /* Deutlich größer auf dem Desktop */
    height: auto; /* Höhe passt sich proportional an */
    float: left;  /* Fließt links vom Text */
    margin-right: 25px; /* Abstand zum Text */
    margin-bottom: 15px;
    object-fit: contain;
    position: relative; /* Absolute Positionierung entfernt für besseren Fluss */
}
}
/* --- BOX-STYLING (BLAUE ÜBERSCHRIFTEN) --- */
.box-headline {
  background-color: #9FB6CD;
  font-size: 16px;
  padding: 5px; /* Dein Original-Wert */
}
.innercenter {
  text-align: center;
  padding: 15px;
}
}

Revision as of 21:20, 30 January 2026

/* --- BASIS OPTIMIERUNG --- */
.mw-parser-output img {
    max-width: 100%;
    height: auto;
}

/* --- LOGO & TEXT (ABOUT BEREICH) --- */
/* Diese Werte gelten jetzt korrekt für den Desktop */
.aboutsetlogo {
    width: 250px; 
    height: auto;
    float: left;
    margin-right: 25px;
    margin-bottom: 15px;
    object-fit: contain;
    position: relative;
}

.aboutsettext {
    margin-left: 0;
    min-height: 150px;
}

.aboutsettext::after {
    content: "";
    display: table;
    clear: both;
}

/* --- TABELLEN --- */
.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;
   color: #000;
   font-weight: bold;
   text-align: center;
}

/* --- BOXEN & HEADERS --- */
.infobox {
    box-shadow: 5px 5px 10px black;
    background: #ebecf0;
    border: 1px solid #aaa;
    float: right;
    margin: 0 0 0.5em 0.5em;
    padding: 0.5em;
    width: 300px;
    max-width: 100%;
}

.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;
}

.box-headline {
   background-color: #9FB6CD;
   font-size: 16px;
   padding: 5px;
   /* Damit die blaue Überschrift wieder bündig in der Box sitzt: */
   margin: -15px -15px 10px -15px; 
   border-bottom: 1px solid #aaa;
}

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

/* --- GRID SYSTEME --- */
.mainparent {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 15px;
}

.box1 { grid-area: 1 / 1 / 2 / 3; background: #ebecf0; border: 1px solid #aaa; padding: 15px; }
.box2 { grid-area: 2 / 1 / 3 / 2; background: #ebecf0; border: 1px solid #aaa; padding: 15px; }
.box3 { grid-area: 3 / 1 / 4 / 2; background: #ebecf0; border: 1px solid #aaa; padding: 15px; }
.box4 { grid-area: 2 / 2 / 4 / 3; background: #ebecf0; border: 1px solid #aaa; padding: 15px; }

.brickparent {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    grid-gap: 25px;
    align-items: center;
    padding: 10px;
}

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

/* --- MOBILE OPTIMIERUNG (Alles unter 720px) --- */
@media screen and (max-width: 720px) {
    .mainparent {
        display: flex;
        flex-direction: column;
    }

    .box1, .box2, .box3, .box4 {
        width: 100% !important;
        grid-area: unset !important;
        margin-bottom: 15px;
    }

    .infobox {
        float: none;
        width: 100% !important;
        margin: 0 0 1em 0;
    }

    .aboutsetlogo {
        float: none;
        display: block;
        margin: 0 auto 15px;
        width: 180px;
    }

    .aboutsettext {
        text-align: center;
        min-height: auto;
    }

    .brickparent {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 15px;
    }
}