MediaWiki:Common.css: Difference between revisions

From Cobi Collectors Wiki
No edit summary
No edit summary
 
(82 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* ==========================================================================
  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 {
.infobox {
box-shadow: 5px 5px 10px black;
    float: right;
vertical-align:middle;
    margin: 0 0 0.5em 0.5em;
background: #ebecf0;
    padding: 0.5em;
border: 1px solid #aaa;
    width: 300px;
float: right;
    vertical-align: middle;
margin: 0 0 0.5em 0.5em;
padding: 0.5em;
width: 300px;
}
}


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


.headernocolumn {
.headernocolumn { height: 80px; font-size: 16px; }
width: 100%;
.headercatpage { height: 100px; }
height: 80px;
 
margin-bottom: 20px;
.textbox {
background: #ebecf0;
    width: 50%;
border: 1px solid #aaa;
    background: var(--bg-light);
padding: 15px;
    border: 2px solid var(--accent-blue);
box-shadow: 5px 5px 10px black;
    padding: 8px 15px;
font-size:16px;
    margin: 0 auto;
}
}


.headercatpage {
.box-headline {
width: 100%;
    background-color: var(--accent-blue);
height: 100px;
    font-size: 16px;
margin-bottom: 20px;
    padding: 8px 12px;
background: #ebecf0;
    margin-bottom: 15px;
border: 1px solid #aaa;
    border: 1px solid #8aa3bc;
padding: 8px 15px 8px 15px;
    border-radius: 4px;
box-shadow: 5px 5px 10px black;
    font-weight: bold;
font-size:18px;
    display: block;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
    text-align: left !important;
}
}


.textbox {
/* ==========================================================================
width: 50%;
  3. LOGO & TEXT BEREICH
background: #ebecf0;
  ========================================================================== */
border: 2px solid #9FB6CD;
.aboutsetlogo {
padding: 8px 15px 8px 15px;
    width: 150px;  
margin: 0 auto;
    float: left;
    margin: 0 30px 15px 0;
}
 
.aboutsetlogo img {
    width: 100% !important;
    height: auto !important;
}
}


.innercenter {
.aboutsettext {
text-align: center;
    overflow: hidden;  
padding: 15px;
    min-height: 120px;
}
}


/* ==========================================================================
  4. TABELLEN (COBITABLE)
  ========================================================================== */
.cobitable {
.cobitable {
  background-color: #f8f9fa;
    background-color: #f8f9fa;
  color: #202122;
    color: #202122;
  margin: 1em 0;
    margin: 1em auto;
  border: 1px solid #a2a9b1;
    border: 1px solid #000;
  border-collapse: collapse;
    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 > caption {
 
  font-weight: bold;
.cobitable th {
    background-color: var(--accent-blue);
    font-weight: bold;
    text-align: center;
}
}
.cobitable > tr > th,
 
.cobitable > * > tr > th {
/* ==========================================================================
  border: 1px solid #000;
  5. GRIDS (MAINPAGE)
  background-color: #9FB6CD;
  ========================================================================== */
  text-align: center;
.mainparent {
  padding: 0.4em 0.7em;
    display: grid;
    grid-template-columns: 4fr 6fr;
    gap: 15px;
}
}
.cobitable > tr > td,
 
.cobitable > * > tr > td {
.box1 { grid-column: 1 / 3; padding: 15px; }
  border: 1px solid #a2a9b1;
.box2 { grid-column: 1; padding: 15px; }
  padding: 0.4em 0.7em;
.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;
}
}


.box-headline {
/* Wir sorgen dafür, dass die Links nebeneinander bleiben */
  background-color: #9FB6CD;
.box4-content a,
  font-size: 16px;
.box4-content .mw-file-description {
  padding: 5px;
    display: inline-flex !important; /* 'inline' hält sie in der Zeile */
    margin: 0 !important;
    padding: 0 !important;
}
}


.mainparent {
.box4-content img {
display: grid;
    width: 150px !important; /* Feste Breite für das Raster */
grid-template-columns: repeat(2, 1fr);
    height: auto !important;
grid-template-rows: 160px repeat(2, 1fr);  
    border-radius: 4px;
grid-column-gap: 15px;
    transition: transform 0.3s ease;
grid-row-gap: 15px;
    display: block;
}
}
.box1 {
 
grid-area: 1 / 1 / 2 / 3;
.box4-content img:hover {  
background: #ebecf0;
    transform: scale(1.08);  
border: 1px solid #aaa;
padding: 15px;
}
}
.box2 {
 
grid-area: 2 / 1 / 3 / 2;
.innercenter {
background: #ebecf0;
    display: grid !important;
border: 1px solid #aaa;
    /* Erzeugt Spalten, die min. so groß wie das Bild sind, aber max. 200px */
padding: 15px;
    grid-template-columns: repeat(auto-fill, minmax(100px, 200px));
    gap: 20px;
    justify-content: flex-start; /* Oder 'center', falls gewünscht */
    align-items: center;
    margin: 20px 0;
}
}
.box3 {
 
grid-area: 3 / 1 / 4 / 2;
/* Wir bändigen alle direkten Kinder (Wrapper von MediaWiki) */
background: #ebecf0;
.innercenter > * {
border: 1px solid #aaa;
    display: block !important;
padding: 15px;
    width: 100% !important;
    max-width: 200px !important;
}
}
.box4 {
 
grid-area: 2 / 2 / 4 / 3;
/* Das Bild passt sich dem Grid-Platz an */
background: #ebecf0;
.innercenter img {
border: 1px solid #aaa;
    width: auto !important;
padding: 15px;
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto !important; /* Zentriert das Bild innerhalb seiner Grid-Zelle */
}
}


/* ==========================================================================
  6. BRICK-CONTAINER (DER FINALE LINKS-FIX)
  ========================================================================== */
.brickparent {
.brickparent {
display: grid;
    display: flex !important;
grid-template-columns: repeat(4, 1fr);
    flex-wrap: wrap !important;
grid-template-rows: repeat(3, 140px);
    justify-content: flex-start !important; /* Richtet die Zeilen links aus */
grid-column-gap: 10px;
    align-items: center;  
grid-row-gap: 10px;
    gap: 25px;
align-items: center;
    padding: 25px;
padding: 10px;
    background: #ebecf0;
    border: 1px solid #aaa;
    box-shadow: 5px 5px 10px black;
    border-radius: 8px;
    margin: 20px 0;
}
}
.brick1 { grid-area: 1 / 1 / 2 / 2;}
.brick2 { grid-area: 1 / 2 / 2 / 3;}
.brick3 { grid-area: 1 / 3 / 2 / 4;}
.brick4 { grid-area: 1 / 4 / 2 / 5;}
.brick5 { grid-area: 2 / 1 / 3 / 2;}
.brick6 { grid-area: 2 / 2 / 3 / 3;}
.brick7 { grid-area: 2 / 3 / 3 / 4;}
.brick8 { grid-area: 2 / 4 / 3 / 5;}
.brick9 { grid-area: 3 / 1 / 4 / 2;}


.aboutsetlogo {
/* Der entscheidende Teil: Wir zwingen die Unterelemente auf ihre natürliche Breite */
width:100px;
.brickparent > * {
height:100px;
    flex: 0 0 auto !important; /* Verhindert das Ausdehnen */
position: absolute;
    display: flex !important;
object-fit: contain;
    justify-content: flex-start !important;
}
 
/* Hover-Effekt auf dem Link/Container */
.brickparent a,
.brickparent .mw-file-description {
    display: inline-block !important;
    transition: transform 0.2s ease-in-out !important;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
}
 
.brickparent a:hover,
.brickparent .mw-file-description:hover {
    transform: scale(1.05);
    background-color: rgba(159, 182, 205, 0.2);
    z-index: 10;
}
 
/* Bild-Anpassung */
.brickparent img {
    width: auto !important;
    max-width: 200px !important;  
    height: auto !important;
    max-height: 80px !important;  
    display: block;
    margin: 0 !important;
}
}
.aboutsettext {
 
margin-left:110px;
/* ==========================================================================
height:120px;
  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;
    }
}
}

Latest revision as of 20:42, 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);
    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. 200px */
    grid-template-columns: repeat(auto-fill, minmax(100px, 200px));
    gap: 20px;
    justify-content: flex-start; /* Oder 'center', falls gewünscht */
    align-items: center;
    margin: 20px 0;
}

/* Wir bändigen alle direkten Kinder (Wrapper von MediaWiki) */
.innercenter > * {
    display: block !important;
    width: 100% !important;
    max-width: 200px !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 */
}

/* ==========================================================================
   6. BRICK-CONTAINER (DER FINALE LINKS-FIX)
   ========================================================================== */
.brickparent {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important; /* Richtet die Zeilen links aus */
    align-items: center; 
    gap: 25px;
    padding: 25px;
    background: #ebecf0;
    border: 1px solid #aaa;
    box-shadow: 5px 5px 10px black;
    border-radius: 8px;
    margin: 20px 0;
}

/* Der entscheidende Teil: Wir zwingen die Unterelemente auf ihre natürliche Breite */
.brickparent > * {
    flex: 0 0 auto !important; /* Verhindert das Ausdehnen */
    display: flex !important;
    justify-content: flex-start !important;
}

/* Hover-Effekt auf dem Link/Container */
.brickparent a, 
.brickparent .mw-file-description {
    display: inline-block !important;
    transition: transform 0.2s ease-in-out !important;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
}

.brickparent a:hover, 
.brickparent .mw-file-description:hover {
    transform: scale(1.05); 
    background-color: rgba(159, 182, 205, 0.2); 
    z-index: 10; 
}

/* Bild-Anpassung */
.brickparent img {
    width: auto !important;
    max-width: 200px !important; 
    height: auto !important;
    max-height: 80px !important; 
    display: block;
    margin: 0 !important;
}

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