MediaWiki:Common.css: Difference between revisions

From Cobi Collectors Wiki
No edit summary
No edit summary
Line 140: Line 140:
.box4-content img:hover { transform: scale(1.05); }
.box4-content img:hover { transform: scale(1.05); }


/* ==========================================================================
  7. BRICK-CONTAINER (MODERN CARD DESIGN)
  ========================================================================== */
.brickparent {
.brickparent {
     display: flex !important;   /* Erzwingt Flexbox */
     display: flex;
     flex-wrap: wrap;           /* Erlaubt Zeilenumbruch */
     flex-wrap: wrap;
     justify-content: center;   /* Zentriert den Inhalt */
     justify-content: center;
     gap: 30px;
    gap: 20px;
     padding: 30px;
    padding: 30px 15px;
     margin: 1em 0;
    background: #f0f2f5; /* Etwas helleres Grau für besseren Kontrast zu den Cards */
     background: var(--bg-light);
     border-radius: 12px;
     border: var(--border-gray);
     margin: 20px 0;
     box-shadow: var(--shadow-dark);
}
     border-radius: 8px;
 
/* Der Wrapper um jedes Bild (MediaWiki Link) */
.brickparent .mw-file-description {
     display: flex !important;
     background: #ffffff;      /* Weiße Kachel */
    padding: 10px;           /* Innerer Abstand zum Bild */
     border: 1px solid #ddd;
    border-radius: 8px;       /* Abgerundete Ecken */
     box-shadow: 0 4px 6px rgba(0,0,0,0.05); /* Sehr feiner Schatten */
    transition: all 0.3s ease;
    text-decoration: none !important;
    width: 200px;            /* Feste Breite der Kachel */
    height: 150px;            /* Optionale feste Höhe für Symmetrie */
    align-items: center;     /* Bild vertikal zentrieren */
     justify-content: center; /* Bild horizontal zentrieren */
}
}


/* WICHTIG: MediaWiki-Wrapper müssen auch Flex-Items werden */
/* Hover-Effekt für die ganze Kachel */
.brickparent .mw-file-description,
.brickparent .mw-file-description:hover {
.brickparent .floatnone,
     transform: translateY(-5px);
.brickparent .mw-file-element {
     box-shadow: 0 8px 15px rgba(0,0,0,0.15);
     display: flex;
     border-color: var(--accent-blue); /* Nutzt dein Blau als Highlight */
     justify-content: center;
     align-items: center;
}
}


/* Bild-Styling */
/* Das eigentliche Bild innerhalb der Kachel */
.brickparent img {
.brickparent img {
     display: block;
     max-width: 100% !important;
     width: 150px !important;   /* Feste Breite für den "Brick"-Look */
    max-height: 100% !important;
     width: auto !important;   /* Verhindert Verzerrung */
     height: auto !important;
     height: auto !important;
    max-width: 100%;            /* Verhindert Überlaufen auf kleinen Screens */
     border-radius: 4px;
     border-radius: 4px;
    transition: transform 0.3s ease;
}
.brickparent img:hover {
    transform: scale(1.05);
}
}



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

/* ==========================================================================
   7. BRICK-CONTAINER (MODERN CARD DESIGN)
   ========================================================================== */
.brickparent {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 30px 15px;
    background: #f0f2f5; /* Etwas helleres Grau für besseren Kontrast zu den Cards */
    border-radius: 12px;
    margin: 20px 0;
}

/* Der Wrapper um jedes Bild (MediaWiki Link) */
.brickparent .mw-file-description {
    display: flex !important;
    background: #ffffff;      /* Weiße Kachel */
    padding: 10px;            /* Innerer Abstand zum Bild */
    border: 1px solid #ddd;
    border-radius: 8px;       /* Abgerundete Ecken */
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); /* Sehr feiner Schatten */
    transition: all 0.3s ease;
    text-decoration: none !important;
    width: 200px;             /* Feste Breite der Kachel */
    height: 150px;            /* Optionale feste Höhe für Symmetrie */
    align-items: center;      /* Bild vertikal zentrieren */
    justify-content: center;  /* Bild horizontal zentrieren */
}

/* Hover-Effekt für die ganze Kachel */
.brickparent .mw-file-description:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
    border-color: var(--accent-blue); /* Nutzt dein Blau als Highlight */
}

/* Das eigentliche Bild innerhalb der Kachel */
.brickparent img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;   /* Verhindert Verzerrung */
    height: auto !important;
    border-radius: 4px;
}

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

.brickparent {
        gap: 10px;
        padding: 10px;
    }
    
    .brickparent img {
        max-width: 150px !important; /* Etwas kleiner auf Handys für 2 Bilder nebeneinander */
    }