Forskel mellem versioner af "MediaWiki:Common.css"

 
Linje 6: Linje 6:
 
}
 
}
  
private function renderPortals( $portals ) { // Force the rendering of the following portals
 
    global $wgUser;
 
    if ( !isset( $portals['SEARCH'] ) ) $portals['SEARCH'] = true;
 
case 'TOOLBOX':
 
    if ( $wgUser->isLoggedIn() ) {
 
        $this->renderPortal( 'tb', $this->getToolbox(), 'toolbox', 'SkinTemplateToolboxEnd' );
 
    }
 
  
<!-- No [view source] tab for anonymous users -->
+
$wgHooks['BeforePageDisplay'][] = 'wfHideVariousTabsFromAnonymous';
<?php global $wgUser; if( $wgUser->isAnon() ) { ?>
+
function wfHideVariousTabsFromAnonymous( OutputPage $out, Skin $skin ) {
      <style type="text/css">
+
  if ( !$out->getUser()->isLoggedIn() ) {
        #ca-viewsource { display: none !important; }
+
    // addInineStyle is deprecated
      </style>
+
    $out->addInlineStyle( 'li#ca-history, li#ca-viewsource, li#ca-edit, li#ca-talk, .vectorMenu { display: none; }' );
    <?php } ?>
+
  }
 +
  return true;
 +
}
 +
 
  
 
/* standard link colors */
 
/* standard link colors */

Nuværende version fra 20. nov 2019, 07:51

/* Fælles CSS for alle udseender */

/* Diskussion fjernet */
#ca-talk { 
display:none!important;
}


$wgHooks['BeforePageDisplay'][] = 'wfHideVariousTabsFromAnonymous';
function wfHideVariousTabsFromAnonymous( OutputPage $out, Skin $skin ) {
  if ( !$out->getUser()->isLoggedIn() ) {
    // addInineStyle is deprecated
    $out->addInlineStyle( 'li#ca-history, li#ca-viewsource, li#ca-edit, li#ca-talk, .vectorMenu { display: none; }' );
  }
  return true;
}


/* standard link colors */
.mw-body-content a:link { color: #337890; } /* normal unvisited links */
.mw-body-content a:link:visited { color: #337890; } /* visited links */
.mw-body-content a:link:active { color: #FF0000; } /* active links */
.mw-body-content a:link.new { color: #FF0000; } /* new links */
.mw-body-content a:link.extiw { color: #3366BB; } /* interwiki links */
.mw-body-content a:link.external { color: #3366BB; } /* external links */
.mw-body-content a:link.stub { color: #772233; } /* hovered links */

.mw-body-content a:link {color: #337890}
.mw-body-content a:visited {color: #337890}
.mw-body-content a:hover {color: #2e89a1; text-decoration: underline; }
.mw-body-content a:active {color: #0000FF}