Zum Inhalt springen


Vorlage:Infobox/style-E.css

Aus HammWiki
/* ==========================================================================
   1. INFOBOX BASIS-LAYOUT
   ========================================================================== */

.infobox {
    background: var(--background-color-neutral-subtle, #f8f9fa);
    border-radius: 6px;
    box-sizing: border-box;
    width: 330px;
    max-width: 330px;
    overflow: hidden;
    float: right;
    clear: both;
    font-size: 85%; 
    margin: 0 0 1.4em 1.4em;
    padding: 1.4em;
}

/* ==========================================================================
   2. HEADER: BILD & LOGO (Grid-System)
   ========================================================================== */

/* Grid-Container für Logo & Bild */
.logo-bild-container {
    display: grid;
    /* 25-Spalten-Grid für minutiöse Kontrolle, jede Spalte 4 % der Infobox breit */
    grid-template-columns: repeat(25, 4%); 
    /* Automatische Höhe für Logo, Grid verbleibender Platz für Bild */
    grid-template-rows: repeat(4, auto) 1fr; 
    width: 100%;
    margin: 0 0 1.8em 0;
}

.logo, .bild {
    box-sizing: border-box;
}

.logo img, .bild img {
    height: auto;
}

/* --- Stil für das Logo --- */
.logo {
    z-index: 2;
    grid-column: 1 / -1; /* Logo nimmt alle Spalten der Grid ein */
    grid-row: 1 / 5;     /* Logo erstreckt sich über 5 Zeilen der Grid */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0px 2px 12px 0px rgba(0,0,0,0.18);
    max-width: 85%;
    width: max-content;
    height: max-content;
}

.logo img {
    max-height: 100px;
    max-width: 100%;
    width: auto;
}

.logo:hover {
    transform: scale(1.05);
    transition: transform 0.5s ease-in;
    border-color: rgba(0,0,0,0.12);
    z-index: 2; 
}

/* Dark Mode: Logo Schatten */
@media screen {
    html.skin-theme-clientpref-night .logo {
        box-shadow: 0 0.4rem 1.2rem rgba(0,0,0,0.6), 0 0.1rem 0.3rem rgba(0,0,0,0.4);
    }
    html.skin-theme-clientpref-night .logo:hover {
        box-shadow: 0 0.6rem 1.8rem rgba(0,0,0,0.8), 0 0.2rem 0.6rem rgba(0,0,0,0.5);
    }
}
@media screen and (prefers-color-scheme: dark) {
    html.skin-theme-clientpref-os .logo {
        box-shadow: 0 0.4rem 1.2rem rgba(0,0,0,0.6), 0 0.1rem 0.3rem rgba(0,0,0,0.4);
    }
    html.skin-theme-clientpref-os .logo:hover {
        box-shadow: 0 0.6rem 1.8rem rgba(0,0,0,0.8), 0 0.2rem 0.6rem rgba(0,0,0,0.5);
    }
}

/* --- Stil für das Hauptbild --- */
.bild {
    width: 100%;
    grid-column: 2 / -1; /* Bild erstreckt sich über Spalte 2 bis Ende */
    grid-row: 4 / -1;    /* Bild beginnt in 4. Zeile, um sich mit dem Logo zu überschneiden */
}

.bild img {
    width: 100%;
    margin-bottom: 1.2em;
    height: auto;
    border-radius: 6px;
    box-shadow: 0px 4px 16px 0px rgba(0,0,0,0.25);
}

.bild:hover {
    transform: scale(1.05);
    transition: transform 0.5s ease-in;
    border-color: rgba(0,0,0,0.12);
    z-index: 2;
}

/* Dark Mode: Bild Schatten */
@media screen {
    html.skin-theme-clientpref-night .bild img {
        box-shadow: 0 0.4rem 1.2rem rgba(0,0,0,0.7), 0 0.1rem 0.4rem rgba(0,0,0,0.5);
    }
}
@media screen and (prefers-color-scheme: dark) {
    html.skin-theme-clientpref-os .bild img {
        box-shadow: 0 0.4rem 1.2rem rgba(0,0,0,0.7), 0 0.1rem 0.4rem rgba(0,0,0,0.5);
    }
}

/* ==========================================================================
   3. TITEL & ÜBERSCHRIFTEN (Sauberes Block-Design)
   ========================================================================== */

/* Zusammengefasste Titel-Klassen (ersetzt das alte Box-Design) */
.infobox .title,
.title-no-logo,
.infobox .title-no-img {
    grid-column: 1 / -1;       /* Nimmt die volle Breite im Grid ein */
    grid-row: 1;               /* Bleibt ganz oben */
    display: block;            /* Erlaubt natürliche Zeilenumbrüche für lange Namen */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 0 1.2em 0;
    padding: 0 0 0.6em 0;      /* Abstand zur Trennlinie */
    background: transparent;   /* Keine Hintergrundfarbe */
    box-shadow: none;          /* Kein Schatten nötig */
    border-radius: 0;
    border-bottom: 2px solid var(--border-color-muted, #dadde3); /* Dezente Trennlinie */
    font-size: 1.3em;
    font-weight: bold;
    line-height: 1.4;
    text-align: left;          /* Linksbündig für bessere Lesbarkeit */
    word-wrap: break-word;     /* Bricht extrem lange Wörter um */
    overflow-wrap: break-word;
    color: var(--color-base, #202122);
}

/* Overlap wird bei Block-Titeln auf Standard zurückgesetzt */
.title-no-logo.overlap {
    background: transparent;
    z-index: 1;
}

/* Versteckte Titel */
.infobox .title-noshow {
    display: none;
}

/* Motto / Slogan */
.infobox .motto {
    font-size: 115% !important;
    font-weight: normal;
    padding: 0;
    margin: 0;
    font-style: italic !important;
    text-align: left;
}

/* Gruppen-Überschriften */
.infobox .head {
    font-size: 1.1em;
    font-weight: bold;
    line-height: 1.6;
    margin: 1em 0;
    border: 0;
    padding: 0;
    font-family: sans-serif;
}

/* ==========================================================================
   4. DATEN & LISTEN (Aspect-Groups)
   ========================================================================== */

.infobox .aspect-group {
    margin: 0.8em 0 0 0;
    padding: 0.4em 0 0 0;
    border-top: 1px solid var(--border-color-muted, #dadde3);
}

.infobox .first {
    border-top: none;
}

.infobox .notitle {
    padding-top: 0.8em !important;
}

.infobox .sub {
    border-top: none !important;
    margin: 1.5em 0 0 0 !important;
}

/* Definitionslisten (dt = links, dd = rechts) */
.infobox dl {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
}

.infobox dl dt {
    width: 35%;
    margin: 0 0 0.4em 0;
    padding: 0 2% 0 0;
    font-weight: bold;
    display: flex;
}

.infobox dl dd {
    width: 63%;
    margin: 0 0 0.4em 0;
    text-align: right;
}

.infobox .services img {
    vertical-align: text-bottom;
    margin-right: 0.5em;
    border-radius: 4px;
}

/* ==========================================================================
   5. MEDIEN & KARTEN
   ========================================================================== */

.infobox .media-container {
    margin: 1.2em 0 0 0;
}

.infobox .map-container {
    border-radius: 6px;
    box-shadow: 0px 4px 16px 0px rgba(0,0,0,0.25);
}

.infobox .karte p {
    display: none !important;
}

.infobox .leaflet-container {
    border-radius: 6px;
}

/* Straßen- und Unternehmensbilder */
.infobox .strassenbild {
    margin: 1.2em 0 1.2em 0;
}

.infobox .strassenbild img {
    width: 100%;
    border-radius: 6px;
    height: auto !important;
    box-shadow: 0px 4px 16px 0px rgba(0,0,0,0.25);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.2em;
    display: block;
}

.infobox .strassenbild p {
    margin: -0.5em 0 0 0;
    font-size: 11px;
}

.strassenbild:hover, .strassenschild:hover {
    transform: scale(1.05);
    transition: transform 0.5s ease-in;
    border-color: rgba(0,0,0,0.12);
    z-index: 2;
}

.infobox .strassenschild img {
    width: 100%;
    border-radius: 6px;
    height: auto !important;
    filter: grayscale(30%);
    box-shadow: 0px 4px 16px 0px rgba(0,0,0,0.25);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0.8em;
    display: block;
}

.nocorner img {
    border-radius: 0px 6px 6px 6px !important;
}

.infobox .unter_logo {
    padding-top: 2em;
}

/* Dark Mode: Karten & Bilder Schatten */
@media screen {
    html.skin-theme-clientpref-night .infobox .map-container,
    html.skin-theme-clientpref-night .infobox .strassenbild img,
    html.skin-theme-clientpref-night .infobox .strassenschild img {
        box-shadow: 0 0.4rem 1.2rem rgba(0,0,0,0.7), 0 0.1rem 0.4rem rgba(0,0,0,0.5);
    }
}
@media screen and (prefers-color-scheme: dark) {
    html.skin-theme-clientpref-os .infobox .map-container,
    html.skin-theme-clientpref-os .infobox .strassenbild img,
    html.skin-theme-clientpref-os .infobox .strassenschild img {
        box-shadow: 0 0.4rem 1.2rem rgba(0,0,0,0.7), 0 0.1rem 0.4rem rgba(0,0,0,0.5);
    }
}

/* ==========================================================================
   6. TOGGLE-BUTTON (Ein-/Ausklappen)
   ========================================================================== */

.infobox .mw-collapsible-toggle {
    width: max-content;
    padding: 0.1rem 0.7rem;
    height: max-content;
    background-color: var(--background-color-interactive, #3366cc);
    border: 1px solid var(--border-color-muted, #dadde3);
    border-radius: 100px;
    text-align: center;
    line-height: 22px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all .3s;
    display: flex;
    user-select: none;
    touch-action: manipulation;
    white-space: pre;
    float: right;
}

.infobox.mw-collapsed .mw-collapsible-toggle:before {
    content: 'Infobox erweitern';
}

.infobox:not(.mw-collapsed) .mw-collapsible-toggle:before {
    content: 'Minimieren';
}

.infobox .mw-collapsible-toggle:hover {
    background-color: var(--background-color-button-quiet--hover, #F8F9FA);
}

/* Dark mode Toggle */
@media screen {
    html.skin-theme-clientpref-night .infobox .mw-collapsible-toggle {
        box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    }
    html.skin-theme-clientpref-night .infobox .mw-collapsible-toggle:hover {
        background-color: #3a3a3a;
        border-color: #505050;
    }
}
@media screen and (prefers-color-scheme: dark) {
    html.skin-theme-clientpref-os .infobox .mw-collapsible-toggle {
        box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    }
    html.skin-theme-clientpref-os .infobox .mw-collapsible-toggle:hover {
        background-color: #3a3a3a;
        border-color: #505050;
        box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    }
}

/* ==========================================================================
   7. RESPONSIVE DESIGN (Media Queries)
   ========================================================================== */

@media (max-width: 700px) and (min-width: 585px) {
    .infobox {
        max-width: none;
        width: 100%;
        padding: 2em 2.5em;
    }
    .infobox .media-container {
        display: flex;
    }
    .infobox .map-container {
        width: 49%;
        height: max-content;
        margin-right: 2%;
    }
    .noscale {
        width: 100% !important;
        margin: 0 !important;
    }
    .infobox .strassenbild, .infobox .unternehmensbild {
        width: 49%;
        margin-top: 0;
    }
    .infobox .strassenbild img, .infobox .unternehmensbild img {
        height: 180px !important;
        object-fit: cover;
        margin-left: 0 !important;
        display: block;
    }
    .infobox .unternehmensbild p, .infobox .strassenbild p {
        text-align: left;
    }
    .infobox .strassenschild img {
        width: 90% !important;
        margin-left: 0 !important;
        display: block;
    }
    .infobox .leaflet-container {
        height: 180px !important;
    }
    .infobox .services dt {
        display: inline-flex;
    }
}

@media (max-width: 584px) and (min-width: 431px) {
    .infobox-pagewide {
        font-size: 80% !important;
    }
    .infobox-inline {
        display: flex;
        margin-bottom: 1.2em;
        max-width: 100% !important;
    }
    .infobox {
        max-width: none;
        width: 100%;
    }
    .infobox .services dt {
        display: flex;
    }
    .noscale {
        width: 100% !important;
        margin: 0 !important;
    }
}

@media (max-width: 430px) and (min-width: 401px) {
    .infobox {
        max-width: none;
        width: 100%;
    }
    .infobox-pagewide {
        font-size: 75% !important;
    }
    .infobox-inline-icon, .infobox-inline-img {
        flex-shrink: 1 !important;
    }
    .noscale {
        width: 100% !important;
        margin: 0 !important;
    }
}

@media (max-width: 400px) {
    .infobox {
        max-width: none;
        width: 100%;
    }
    .infobox-pagewide {
        font-size: 75% !important;
    }
    .infobox .services img {
        display: none;
    }
    .noscale {
        width: 100% !important;
        margin: 0 !important;
    }
}
Cookies helfen uns bei der Bereitstellung von HammWiki. Durch die Nutzung von HammWiki erklärst du dich damit einverstanden, dass wir Cookies speichern.