MediaWiki:Common.css: Difference between revisions

From Cobi Collectors Wiki
No edit summary
No edit summary
Tag: Reverted
Line 341: Line 341:
#mw-content-block {
#mw-content-block {
     padding: 0 10px !important;
     padding: 0 10px !important;
}
/* Versteckt Boxen, die keine Listenpunkte (Links) enthalten */
.mw-portlet:empty,
.sidebar-chunk:empty,
.mw-portlet-body:empty {
    display: none !important;
}
/* Versteckt Boxen, die absolut keinen Inhalt haben */
.mw-portlet:empty,
.sidebar-chunk:empty {
    display: none !important;
}
/* Falls die Boxen trotzdem erscheinen, weil sie "unsichtbaren" Weißraum enthalten,
  können wir gezielt die IDs ansprechen, die dich stören: */
#p-variants,
#p-cactions,
#p-personal-more,
#p-user-menu {
    display: none !important;
}
}



Revision as of 21:39, 1 February 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;
    margin-top: 15px;
}

.box4-content p, .box4-content span { display: contents !important; }

.box4-content a, 
.box4-content .mw-file-description {
    display: block !important;
    flex: 0 0 150px !important;
    margin: 2px !important;
    padding: 5px;          
    transition: all 0.2s ease-in-out !important;
    border-radius: 8px;
    text-decoration: none !important;
}

.box4-content a:hover, .box4-content .mw-file-description:hover {
    background-color: rgba(159, 182, 205, 0.25); 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);    
}

.box4-content img {
    width: 150px !important;
    height: auto !important;
    border-radius: 4px;
    display: block;
    filter: drop-shadow(1px 1px 3px rgba(0,0,0,0.1));
}

.innercenter {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(100px, 150px));
    gap: 15px;
    justify-content: flex-start; 
    align-items: center;
    margin: 10px 0;
}

.innercenter > * { display: block !important; width: 100% !important; max-width: 150px !important; }

.innercenter img {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto !important;
    image-rendering: -webkit-optimize-contrast;
}

.innercenter a, .innercenter .mw-file-description {
    display: inline-block !important;
    transition: all 0.2s ease-in-out !important; 
    cursor: pointer;
    padding: 8px; 
    border-radius: 8px;
}

.innercenter a:hover, .innercenter .mw-file-description:hover {
    background-color: rgba(159, 182, 205, 0.25) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    z-index: 10; 
}

/* ==========================================================================
   6. BRICK-CONTAINER
   ========================================================================== */
.brickparent {
    display: block !important;
    text-align: left !important;
    padding: 25px;
    background: #ebecf0;
    border: var(--border-gray);
    box-shadow: var(--shadow-dark);
    border-radius: 8px;
    margin: 20px 0;
}

.brickparent p, .brickparent span { display: contents !important; }

.brickparent a, .brickparent .mw-file-description {
    display: inline-block !important;
    vertical-align: top !important;
    margin: 8px !important;      
    padding: 8px;               
    transition: all 0.2s ease-in-out !important;
    border-radius: 6px;
}

.brickparent a:hover, .brickparent .mw-file-description:hover {
    background-color: rgba(159, 182, 205, 0.3) !important; 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); 
}

.brickparent img {
    display: block !important;
    image-rendering: -webkit-optimize-contrast;
}

.brickparent.size-small a, .brickparent.size-small img { width: 110px !important; height: auto !important; }
.brickparent.size-large a, .brickparent.size-large img { width: 250px !important; height: 67px !important; }

/* ==========================================================================
   8. INHALTSVERZEICHNIS (TOC) & SIDEBAR
   ========================================================================== */

/* TOC - Modernes Design passend zu den Boxen */
#toc, .toc, .mw-toc-panel {
    background-color: var(--bg-light) !important;
    border: var(--border-gray) !important;
    box-shadow: 3px 3px 8px rgba(0,0,0,0.1) !important;
    border-radius: 8px;
    padding: 15px !important;
    display: inline-block;
}

.toctitle {
    background-color: var(--accent-blue);
    margin: -15px -15px 15px -15px; /* Füllt den Header-Bereich aus */
    padding: 10px;
    border-radius: 8px 8px 0 0;
    text-align: center;
}

.toctitle h2 {
    font-size: 16px !important;
    font-weight: bold !important;
    color: #202122;
    border: none !important;
}

/* 1. Äußere Hüllen (Chunks) komplett unsichtbar machen */
.sidebar-chunk, 
.sidebar-inner, 
#mw-site-navigation, 
#mw-related-navigation {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 2. LOGO-BOX (Sonne) */
#p-logo {
    background: var(--bg-light) !important;
    border: var(--border-gray) !important;
    border-radius: 8px !important;
    margin-top: 20px !important;
    margin-bottom: 20px !important;
    padding: 15px !important;
    display: block !important;
}

/* 3. DIE ECHTEN BOXEN (mw-portlet) */
/* Nur diese erhalten jetzt den Rahmen und Schatten */
.mw-portlet {
    background: var(--bg-light) !important;
    border: var(--border-gray) !important;
    border-radius: 8px !important;
    margin-bottom: 20px !important;
    margin-top: 10px !important;
    overflow: hidden !important;
    display: block !important;
}

/* 4. DER HEADER (Blauer Balken) */
/* Wir blenden alle Header aus, die NICHT direkt in einem mw-portlet sitzen */
.sidebar-chunk h2, 
.sidebar-chunk h3 { 
    display: none !important; 
}

/* Nur der Header im mw-portlet wird schick gemacht */
.mw-portlet h3 {
    display: block !important;
    background-color: var(--accent-blue) !important;
    color: #202122 !important;
    font-size: 13px !important;
    font-weight: bold !important;
    text-transform: uppercase;
    padding: 8px 10px !important;
    margin: 0 !important;
    border: none !important;
    border-bottom: 1px solid #8aa3bc !important;
    text-align: center;
}

/* 5. LISTEN-INHALTE */
.mw-portlet-body {
    padding: 12px 15px !important;
}

.mw-portlet-body ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Abstand der LINKEN Sidebar zum Text */
#mw-site-navigation {
    padding-right: 25px !important; /* Erzeugt Luft nach rechts zum Content */
}

/* Abstand der RECHTEN Sidebar zum Text */
#mw-related-navigation {
    padding-left: 25px !important; /* Erzeugt Luft nach links zum Content */
}

/* Falls der Content-Bereich selbst noch Puffer braucht */
#mw-content-block {
    padding: 0 10px !important;
}

/* Versteckt Boxen, die keine Listenpunkte (Links) enthalten */
.mw-portlet:empty,
.sidebar-chunk:empty,
.mw-portlet-body:empty {
    display: none !important;
}

/* Versteckt Boxen, die absolut keinen Inhalt haben */
.mw-portlet:empty,
.sidebar-chunk:empty {
    display: none !important;
}

/* Falls die Boxen trotzdem erscheinen, weil sie "unsichtbaren" Weißraum enthalten,
   können wir gezielt die IDs ansprechen, die dich stören: */

#p-variants,
#p-cactions,
#p-personal-more,
#p-user-menu {
    display: none !important;
}

/* ==========================================================================
   9. KATEGORIE-LISTEN (MEHRSPALTIG)
   ========================================================================== */

/* Kategorie-Box unten auf der Seite */
.catlinks {
    background-color: var(--bg-light) !important;
    border: var(--border-gray) !important;
    box-shadow: var(--shadow-dark);
    border-radius: 4px;
    margin-top: 2em;
}

/* Die eigentliche Kategorieseite (Listen-Optimierung) */
.mw-category {
    column-count: 2; /* Macht die Liste zweispaltig */
    column-gap: 30px;
}

.mw-category-group {
    break-inside: avoid-column; /* Verhindert das Zerschneiden von Gruppen */
    margin-bottom: 15px;
}

.mw-category-group ul li {
    list-style-type: none !important;
    padding: 4px 0;
    border-bottom: 1px solid #eee;
}

/* Ein schickes Icon vor jedem Kategorie-Link */
.mw-category-group ul li a::before {
    content: "▶";
    font-size: 0.8em;
    color: var(--accent-blue);
    margin-right: 8px;
}

/* ==========================================================================
   7. MOBILE OPTIMIERUNG
   ========================================================================== */
@media screen and (max-width: 850px) {
    div.mainparent { display: flex !important; flex-direction: column !important; width: 100% !important; }
    .box1 { order: 1 !important; }
    .box2 { order: 2 !important; }
    .box3 { order: 3 !important; }
    .box4 { order: 4 !important; }

    .box4-content { display: block !important; text-align: center !important; }
    .box4-content * { display: inline-flex !important; width: auto !important; }
    .box4-content a, .box4-content .mw-file-description {
        display: inline-block !important;
        width: 42% !important; 
        margin: 5px !important;
        vertical-align: top !important;
    }
    .box4-content img { width: 100% !important; max-width: 110px !important; height: auto !important; }

    .brickparent.size-large a, .brickparent.size-large img { width: 100% !important; max-width: 250px !important; height: auto !important; }

    .innercenter { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important; gap: 8px !important; }
    .innercenter > * { display: contents !important; }
}