Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Common.css: Difference between revisions

MediaWiki interface page
No edit summary
No edit summary
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* --- Fandom Style Cards --- */
/* Slider Container */
.card-grid {
.jule-slider {
     display: flex;
     position: relative;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center; /* Centers them on the page */
}
 
.fandom-card {
    background: #1a1a1a; /* Dark grey background */
    border: 1px solid #333;
    border-radius: 8px; /* Rounded corners */
    width: 220px; /* Width of each card */
     overflow: hidden;
     overflow: hidden;
     transition: transform 0.2s, box-shadow 0.2s;
     background: var(--color-surface-1); /* Fallback bg */
     text-align: center;
     border-radius: 8px;
    margin: 0 auto;
}
}


/* Hover Effect (Makes it pop up) */
/* Individual Slides */
.fandom-card:hover {
.jule-slide {
     transform: translateY(-5px);
     position: absolute;
     box-shadow: 0 10px 20px rgba(0,0,0,0.5);
     top: 0;
     border-color: #a855f7; /* Purple glow */
     left: 0;
}
 
/* Image styling */
.fandom-card img {
     width: 100%;
     width: 100%;
     height: 120px;
     height: 100%;
     object-fit: cover;
     opacity: 0;
    transition: opacity 1s ease-in-out; /* Smooth fade duration */
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}
}


/* Text styling */
/* The Active Slide */
.fandom-card-text {
.jule-slide.active {
     padding: 10px;
     opacity: 1;
     color: white;
     z-index: 1;
}
}


.fandom-card-title {
/* Force images to cover the area (Object-Fit) */
     font-weight: bold;
.jule-slide .slide-img img {
     font-size: 1.1em;
     width: 100% !important;
     display: block;
     height: 100% !important;
     margin-bottom: 5px;
     object-fit: cover !important;
     object-position: center;
}
}


/* Style for Infobox Aura */
/* LinkGridBanner Fixes */
.pi-theme-aura .pi-header {
.linkgrid-banner img {
     background-color: #6a0dad; /* Purple header */
     width: 100% !important;
     color: white;
     height: 100% !important;
     font-weight: bold;
     object-fit: cover !important;
     text-transform: uppercase;
     object-position: center;
    display: block !important;
}
}


.pi-theme-aura {
/* Mobile: Cards become full width */
    border: 1px solid #444;
@media (max-width: 768px) {
    background-color: #222; /* Dark background */
     .citizen-card-grid > div { max-width: 100% !important; }
     color: white;
}
}
/*
=============================================================================
INFOBOX & CARDS CSS ENHANCEMENTS
=============================================================================
Copy this to your wiki's MediaWiki:Common.css page for enhanced styling.
This is OPTIONAL - the templates work with inline styles alone.
=============================================================================
*/


/* ===== INFOBOX STYLES ===== */
/* ================================================================= */
/* MOBILE RESPONSIVENESS & LAYOUT FIXES FOR JULE'S RNG WIKI        */
/* ================================================================= */


.infobox {
/* 1. LinkGrid & LinkGridBanner Images */
     font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
.linkgrid-banner img {
     width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center;
    display: block !important;
}
}


.infobox th[colspan="2"] {
/* 2. Sidebox Desktop Defaults */
     text-transform: uppercase;
.jule-sidebox {
     letter-spacing: 0.5px;
     float: right;
    width: 300px;
     margin: 0 0 1rem 1rem;
    clear: right;
}
}


/* Hover effect for infobox */
/* 3. MOBILE RULES (Max Width 768px) */
.infobox:hover {
@media screen and (max-width: 768px) {
     box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
      
}
    /* Make LinkGrid cards full width */
    .jule-grid-card {
        max-width: 100% !important;
        flex-basis: 100% !important;
    }


/* Alternating row colors (optional) */
    /* Make Sidebox float normally and take full width */
.infobox tr:nth-child(even) td {
    .jule-sidebox {
    background-color: #fafafa;
        float: none !important;
}
        width: 100% !important;
        margin: 0 0 1.5em 0 !important;
    }


    /* Shrink the Main Banner padding */
    .jule-main-banner {
        padding: 1em !important;
    }


/* ===== CARD STYLES ===== */
    /* Shrink the Slider height so it isn't huge on phones */
    .jule-main-banner .jule-slider {
        height: 200px !important;
    }
}


.cards-container {
/* ================================================================= */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
/* MAIN PAGE LAYOUT (CSS GRID VERSION)                              */
}
/* ================================================================= */


/* Card hover effects */
.jule-main-layout {
.card-item:hover,
    display: grid;
.single-card:hover {
     /* DESKTOP: Content takes available space (1fr), Sidebar is fixed 300px */
     transform: translateY(-3px);
     grid-template-columns: minmax(0, 1fr) 300px;
     box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
    gap: 20px;
     transition: all 0.2s ease;
     align-items: start; /* Prevents stretching height */
    margin-top: 1em;
}
}


/* Dark style hover */
/* Force the sidebox to fill the grid cell and stop floating */
.card-item[style*="2a2a2a"]:hover,
.jule-main-layout .jule-sidebox {
.single-card[style*="2a2a2a"]:hover {
    width: 100% !important;
     box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
    float: none !important;
     margin: 0 !important;
}
}


/* Card image zoom on hover */
/* MOBILE / TABLET BREAKPOINT */
.card-item:hover .card-image img,
/* When screen is smaller than 900px, switch to 1 column */
.single-card:hover .card-image img {
@media (max-width: 900px) {
    transform: scale(1.05);
    .jule-main-layout {
     transition: transform 0.3s ease;
        grid-template-columns: 1fr; /* Stack vertically */
     }
}
}


/* Card title link styling */
/* Infobox Tab Buttons */
.card-title a {
.infobox-tab-btn {
     color: inherit;
     cursor: pointer;
     text-decoration: none;
    padding: 6px 12px;
    background: var(--color-surface-2);
    border: 1px solid var(--border-color-base);
    border-radius: 4px;
    font-size: 0.85em;
    transition: all 0.2s;
     user-select: none;
}
}


.card-title a:hover {
.infobox-tab-btn:hover {
     color: #3366cc;
     background: var(--color-surface-0);
}
}


 
/* The Active Tab Button */
/* ===== RESPONSIVE ADJUSTMENTS ===== */
.infobox-tab-btn.active {
 
    background: var(--color-primary);
/* Mobile: Stack cards vertically */
     color: white;
@media screen and (max-width: 600px) {
     border-color: var(--color-primary);
     .infobox {
        float: none !important;
        width: 100% !important;
        margin: 1em 0 !important;
     }
   
    .cards-container {
        justify-content: center !important;
    }
   
    .card-item,
    .single-card {
        width: 100% !important;
        max-width: 300px;
    }
}
}


 
/* Hide images by default */
/* ===== DARK MODE SUPPORT ===== */
.infobox-img-content {
 
     display: none;
/* If your wiki uses a dark mode class on body */
.dark-mode .infobox,
body.skin-fandomdesktop-dark .infobox {
     background-color: #1f1f1f;
    border-color: #444;
    color: #e0e0e0;
}
}


.dark-mode .infobox th,
/* Show the active image */
body.skin-fandomdesktop-dark .infobox th {
.infobox-img-content.active {
     background-color: #2a2a2a;
     display: block;
     color: #ffffff;
     animation: fadeIn 0.3s ease;
}
}


.dark-mode .infobox th[colspan="2"],
@keyframes fadeIn {
body.skin-fandomdesktop-dark .infobox th[colspan="2"] {
    from { opacity: 0; }
     background-color: #3366cc;
     to { opacity: 1; }
}
}


.dark-mode .card-item:not([style*="2a2a2a"]),
/* Mobile Infobox Fix */
body.skin-fandomdesktop-dark .card-item:not([style*="2a2a2a"]) {
@media screen and (max-width: 768px) {
     background-color: #2a2a2a !important;
     .citizen-infobox {
    border-color: #444 !important;
        float: none !important;
        width: 100% !important;
        margin: 0 0 1em 0 !important;
    }
}
}


.dark-mode .card-title,
/* --- INFOBOX TABS & BUTTONS --- */
body.skin-fandomdesktop-dark .card-title {
    color: #ffffff !important;
}


.dark-mode .card-text,
/* The Button Look */
body.skin-fandomdesktop-dark .card-text {
.infobox-tab-btn {
     color: #cccccc !important;
    display: inline-block;
    padding: 6px 14px;
    background: var(--color-surface-2); /* Grey background */
    border: 1px solid var(--border-color-base);
    border-radius: 20px; /* Rounded pill shape */
    font-size: 0.85em;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
     color: var(--color-subtle);
}
}


 
/* Hover State */
/* ===== CUSTOM COLOR THEMES ===== */
.infobox-tab-btn:hover {
 
     background: var(--color-surface-0);
/* Add these classes to your infobox wrapper for different colors */
    border-color: var(--color-primary);
.infobox-blue th[colspan="2"]:first-child {
    color: var(--color-base);
     background-color: #3366cc !important;
}
}


.infobox-red th[colspan="2"]:first-child {
/* Selected State (Active) */
     background-color: #cc3333 !important;
.infobox-tab-btn.active {
     background: var(--color-primary);
    color: #fff !important; /* Force white text */
    border-color: var(--color-primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
}


.infobox-green th[colspan="2"]:first-child {
/* Hide inactive images */
     background-color: #33aa33 !important;
.infobox-img-content {
     display: none;
}
}


.infobox-purple th[colspan="2"]:first-child {
/* Show active image */
     background-color: #9933cc !important;
.infobox-img-content.active {
     display: block;
    animation: fadeIn 0.3s ease-in-out;
}
}


.infobox-orange th[colspan="2"]:first-child {
/* Fade In Animation */
     background-color: #ff9900 !important;
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
     to { opacity: 1; transform: translateY(0); }
}
}


.infobox-gold th[colspan="2"]:first-child {
/* Mobile Fix */
     background-color: #c9a227 !important;
@media screen and (max-width: 768px) {
     .citizen-infobox {
        float: none !important;
        width: 100% !important;
        margin: 0 0 1em 0 !important;
    }
}
}

Latest revision as of 19:26, 27 January 2026

/* Slider Container */
.jule-slider {
    position: relative;
    overflow: hidden;
    background: var(--color-surface-1); /* Fallback bg */
    border-radius: 8px;
    margin: 0 auto;
}

/* Individual Slides */
.jule-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out; /* Smooth fade duration */
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

/* The Active Slide */
.jule-slide.active {
    opacity: 1;
    z-index: 1;
}

/* Force images to cover the area (Object-Fit) */
.jule-slide .slide-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center;
}

/* LinkGridBanner Fixes */
.linkgrid-banner img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center;
    display: block !important;
}

/* Mobile: Cards become full width */
@media (max-width: 768px) { 
    .citizen-card-grid > div { max-width: 100% !important; }
}

/* ================================================================= */
/* MOBILE RESPONSIVENESS & LAYOUT FIXES FOR JULE'S RNG WIKI         */
/* ================================================================= */

/* 1. LinkGrid & LinkGridBanner Images */
.linkgrid-banner img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center;
    display: block !important;
}

/* 2. Sidebox Desktop Defaults */
.jule-sidebox {
    float: right;
    width: 300px;
    margin: 0 0 1rem 1rem;
    clear: right;
}

/* 3. MOBILE RULES (Max Width 768px) */
@media screen and (max-width: 768px) {
    
    /* Make LinkGrid cards full width */
    .jule-grid-card {
        max-width: 100% !important;
        flex-basis: 100% !important;
    }

    /* Make Sidebox float normally and take full width */
    .jule-sidebox {
        float: none !important;
        width: 100% !important;
        margin: 0 0 1.5em 0 !important;
    }

    /* Shrink the Main Banner padding */
    .jule-main-banner {
        padding: 1em !important;
    }

    /* Shrink the Slider height so it isn't huge on phones */
    .jule-main-banner .jule-slider {
        height: 200px !important;
    }
}

/* ================================================================= */
/* MAIN PAGE LAYOUT (CSS GRID VERSION)                              */
/* ================================================================= */

.jule-main-layout {
    display: grid;
    /* DESKTOP: Content takes available space (1fr), Sidebar is fixed 300px */
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start; /* Prevents stretching height */
    margin-top: 1em;
}

/* Force the sidebox to fill the grid cell and stop floating */
.jule-main-layout .jule-sidebox {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

/* MOBILE / TABLET BREAKPOINT */
/* When screen is smaller than 900px, switch to 1 column */
@media (max-width: 900px) {
    .jule-main-layout {
        grid-template-columns: 1fr; /* Stack vertically */
    }
}

/* Infobox Tab Buttons */
.infobox-tab-btn {
    cursor: pointer;
    padding: 6px 12px;
    background: var(--color-surface-2);
    border: 1px solid var(--border-color-base);
    border-radius: 4px;
    font-size: 0.85em;
    transition: all 0.2s;
    user-select: none;
}

.infobox-tab-btn:hover {
    background: var(--color-surface-0);
}

/* The Active Tab Button */
.infobox-tab-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* Hide images by default */
.infobox-img-content {
    display: none;
}

/* Show the active image */
.infobox-img-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Mobile Infobox Fix */
@media screen and (max-width: 768px) {
    .citizen-infobox {
        float: none !important;
        width: 100% !important;
        margin: 0 0 1em 0 !important;
    }
}

/* --- INFOBOX TABS & BUTTONS --- */

/* The Button Look */
.infobox-tab-btn {
    display: inline-block;
    padding: 6px 14px;
    background: var(--color-surface-2); /* Grey background */
    border: 1px solid var(--border-color-base);
    border-radius: 20px; /* Rounded pill shape */
    font-size: 0.85em;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    color: var(--color-subtle);
}

/* Hover State */
.infobox-tab-btn:hover {
    background: var(--color-surface-0);
    border-color: var(--color-primary);
    color: var(--color-base);
}

/* Selected State (Active) */
.infobox-tab-btn.active {
    background: var(--color-primary);
    color: #fff !important; /* Force white text */
    border-color: var(--color-primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Hide inactive images */
.infobox-img-content {
    display: none;
}

/* Show active image */
.infobox-img-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

/* Fade In Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Fix */
@media screen and (max-width: 768px) {
    .citizen-infobox {
        float: none !important;
        width: 100% !important;
        margin: 0 0 1em 0 !important;
    }
}