MediaWiki:Vector.css: Difference between revisions

From D4RPoMM
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
/* ---------------------------------------------
/* ================================
   HIDE sidebar blocks for anonymous users only
   FOR ANONYMOUS USERS ONLY
   --------------------------------------------- */
   ================================ */


/* Hides all sidebar blocks except the logo for anonymous users */
/* Hide all sidebar portals (navigation, toolbox, etc.) */
body:not(.mw-user-loggedin) #mw-panel .portal {
body:not(.mw-user-loggedin) #mw-panel .portal {
     display: none !important;
     display: none !important;
}
}


/* Show personal tools (login link) */
/* Show the logo always */
body:not(.mw-user-loggedin) #p-personal {
    display: block !important;
}
 
/* Ensure the logo is always visible */
body:not(.mw-user-loggedin) #p-logo,
body:not(.mw-user-loggedin) #p-logo,
body:not(.mw-user-loggedin) #p-logo a,
body:not(.mw-user-loggedin) #p-logo a,
Line 21: Line 16:
}
}


/* Add dummy sidebar space for layout balance */
/* Show personal tools (top login link) */
body:not(.mw-user-loggedin) #p-personal {
    display: block !important;
}
 
/* Add dummy space under the logo for layout */
body:not(.mw-user-loggedin) #mw-panel::after {
body:not(.mw-user-loggedin) #mw-panel::after {
     content: '';
     content: '';
     display: block;
     display: block;
     height: 400px; /* Adjust this if needed */
     height: 400px;
}
}


/* ---------------------------------------------
/* ================================
   RESET sidebar visibility for logged-in users
   NOTHING hidden for logged-in users!
   --------------------------------------------- */
   ================================ */
 
/* Force show sidebar portals for logged-in users */
body.mw-user-loggedin #mw-panel .portal {
    display: block !important;
    visibility: visible !important;
}


/* Restore background if it was removed for anons */
/* Important: Do NOT override .portal for mw-user-loggedin at all */
body.mw-user-loggedin #mw-panel {
    background: #f8f9fa !important;
    padding-top: 1em;
}

Revision as of 22:58, 23 April 2025

/* ================================
   FOR ANONYMOUS USERS ONLY
   ================================ */

/* Hide all sidebar portals (navigation, toolbox, etc.) */
body:not(.mw-user-loggedin) #mw-panel .portal {
    display: none !important;
}

/* Show the logo always */
body:not(.mw-user-loggedin) #p-logo,
body:not(.mw-user-loggedin) #p-logo a,
body:not(.mw-user-loggedin) #p-logo a img {
    display: block !important;
    visibility: visible !important;
}

/* Show personal tools (top login link) */
body:not(.mw-user-loggedin) #p-personal {
    display: block !important;
}

/* Add dummy space under the logo for layout */
body:not(.mw-user-loggedin) #mw-panel::after {
    content: '';
    display: block;
    height: 400px;
}

/* ================================
   NOTHING hidden for logged-in users!
   ================================ */

/* Important: Do NOT override .portal for mw-user-loggedin at all */