mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-24 22:35:45 +00:00
feat(core): ✨ add styles for temp user in user menu
This commit is contained in:
parent
bb27f801bd
commit
6ab486b82e
|
@ -93,15 +93,20 @@ class SkinHooks implements
|
|||
* @param array &$links
|
||||
*/
|
||||
public function onSkinTemplateNavigation__Universal( $sktemplate, &$links ): void {
|
||||
$isRegistered = $sktemplate->getUser()->isRegistered();
|
||||
$user = $sktemplate->getUser();
|
||||
$isRegistered = $user->isRegistered();
|
||||
$isTemp = $user->isTemp();
|
||||
|
||||
if ( $isRegistered ) {
|
||||
// Remove user page link from user menu and recreate it in user info
|
||||
unset( $links['user-menu']['userpage'] );
|
||||
if ( $isTemp ) {
|
||||
// Remove temporary user page text from user menu and recreate it in user info
|
||||
unset( $links['user-menu']['tmpuserpage'] );
|
||||
// Remove links as they are added to the bottom of user menu later
|
||||
// unset( $links['user-menu']['logout'] );
|
||||
} else if ( $isRegistered ) {
|
||||
// Remove user page link from user menu and recreate it in user info
|
||||
unset( $links['user-menu']['userpage'] );
|
||||
} else {
|
||||
// Remove anonuserpage from user menu and recreate it in user info
|
||||
// Remove anon user page text from user menu and recreate it in user info
|
||||
unset( $links['user-menu']['anonuserpage'] );
|
||||
// Remove links as they are added to the bottom of user menu later
|
||||
// unset( $links['user-menu']['createaccount'] );
|
||||
|
|
|
@ -67,6 +67,7 @@
|
|||
|
||||
#pt {
|
||||
&-anonuserpage span,
|
||||
&-tmpuserpage-2,
|
||||
&-userpage-2 a {
|
||||
padding: var( --space-xs ) 0;
|
||||
color: var( --color-base--emphasized );
|
||||
|
@ -77,6 +78,8 @@
|
|||
|
||||
&-user {
|
||||
&groups {
|
||||
margin-bottom: var( --space-sm );
|
||||
|
||||
ul {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
@ -105,7 +108,6 @@
|
|||
}
|
||||
|
||||
&contris {
|
||||
margin-top: var( --space-sm );
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue