MediaWiki:Common.css: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
/* ======================================================================== | /* ======================================================================== | ||
Rules for logged-out (anonymous) users: | |||
Hide most of the page except: | |||
- Logo (#p-logo) | |||
- Main Page link (#n-mainpage) | |||
- Login link (#pt-login) in personal tools | |||
- Print/export link (#t-print) in toolbox | |||
======================================================================== */ | ======================================================================== */ | ||
#mw- | body.mw-user-logged-out #content, | ||
display: | body.mw-user-logged-out #footer, | ||
body.mw-user-logged-out #mw-head { | |||
display: none !important; | |||
} | } | ||
#mw-panel > * { | |||
/* In the left sidebar (#mw-panel), hide all items for logged-out users... */ | |||
body.mw-user-logged-out #mw-panel > * { | |||
display: none !important; | display: none !important; | ||
} | } | ||
/* | /* ...except the logo and the mainpage link */ | ||
#p-logo, | body.mw-user-logged-out #p-logo, | ||
#n-mainpage { | body.mw-user-logged-out #n-mainpage { | ||
display: block !important; | display: block !important; | ||
} | } | ||
/* | /* In the personal tools (#p-personal), hide everything except the login link */ | ||
body.mw-user-logged-out #p-personal > * { | |||
display: none !important; | |||
#p-personal { | } | ||
display: block !important; | body.mw-user-logged-out #pt-login { | ||
display: inline-block !important; | |||
} | } | ||
# | /* In the toolbox (#p-tb), hide all items except the print/export command */ | ||
body.mw-user-logged-out #p-tb > * { | |||
display: none !important; | |||
} | |||
body.mw-user-logged-out #t-print { | |||
display: inline-block !important; | display: inline-block !important; | ||
} | } | ||
/* ======================================================================== | /* ======================================================================== | ||
Rules for logged-in users: | |||
Revert to the default (full) sidebar / personal tools display. | |||
======================================================================== */ | ======================================================================== */ | ||
# | body.mw-user-logged-in #content, | ||
body.mw-user-logged-in #footer, | |||
body.mw-user-logged-in #mw-head { | |||
display: block !important; | |||
} | |||
/* Show the entire left sidebar for logged-in users */ | |||
body.mw-user-logged-in #mw-panel > * { | |||
display: block !important; | display: block !important; | ||
} | } | ||
#p- | |||
display: | /* Restore full personal tools for logged-in users */ | ||
body.mw-user-logged-in #p-personal > * { | |||
display: inline-block !important; | |||
} | } | ||
# | |||
/* Restore full toolbox for logged-in users */ | |||
body.mw-user-logged-in #p-tb > * { | |||
display: inline-block !important; | display: inline-block !important; | ||
} | } | ||
Revision as of 15:37, 11 April 2025
/* ========================================================================
Rules for logged-out (anonymous) users:
Hide most of the page except:
- Logo (#p-logo)
- Main Page link (#n-mainpage)
- Login link (#pt-login) in personal tools
- Print/export link (#t-print) in toolbox
======================================================================== */
body.mw-user-logged-out #content,
body.mw-user-logged-out #footer,
body.mw-user-logged-out #mw-head {
display: none !important;
}
/* In the left sidebar (#mw-panel), hide all items for logged-out users... */
body.mw-user-logged-out #mw-panel > * {
display: none !important;
}
/* ...except the logo and the mainpage link */
body.mw-user-logged-out #p-logo,
body.mw-user-logged-out #n-mainpage {
display: block !important;
}
/* In the personal tools (#p-personal), hide everything except the login link */
body.mw-user-logged-out #p-personal > * {
display: none !important;
}
body.mw-user-logged-out #pt-login {
display: inline-block !important;
}
/* In the toolbox (#p-tb), hide all items except the print/export command */
body.mw-user-logged-out #p-tb > * {
display: none !important;
}
body.mw-user-logged-out #t-print {
display: inline-block !important;
}
/* ========================================================================
Rules for logged-in users:
Revert to the default (full) sidebar / personal tools display.
======================================================================== */
body.mw-user-logged-in #content,
body.mw-user-logged-in #footer,
body.mw-user-logged-in #mw-head {
display: block !important;
}
/* Show the entire left sidebar for logged-in users */
body.mw-user-logged-in #mw-panel > * {
display: block !important;
}
/* Restore full personal tools for logged-in users */
body.mw-user-logged-in #p-personal > * {
display: inline-block !important;
}
/* Restore full toolbox for logged-in users */
body.mw-user-logged-in #p-tb > * {
display: inline-block !important;
}