Main Page: Difference between revisions

From IxWiki
Jump to navigation Jump to search
mNo edit summary
Tag: 2017 source edit
mNo edit summary
Tag: 2017 source edit
Line 1: Line 1:
{{#switch: {{lc:{{#var:skin}}}}
<div id="main-page-content">
   | citizen
   <!-- Default main page content goes here -->
   | citizen-skin
   <p>Welcome to the default main page!</p>
  | citizen-theme
</div>
  | citizen skin
 
  | citizen theme
<script>
   | {{#ifexist: MediaWiki:Mainpage/Citizen
   $(function() {
     | {{MediaWiki:Mainpage/Citizen}}
     var skinPreference = mw.user.options.get('skinPreference');
     | {{MediaWiki:Mainpage/Vector}}
   
   }}
    if (skinPreference === 'citizen') {
   | {{#ifexist: MediaWiki:Mainpage/Vector
      loadCitizenMainPage();
     | {{MediaWiki:Mainpage/Vector}}
     }
     | {{MediaWiki:Mainpage/Citizen}}
   });
   }}
 
}}
   function loadCitizenMainPage() {
     $.get(mw.config.get('wgArticlePath').replace('$1', 'MediaWiki:Mainpage/Citizen'), function(data) {
      $('#main-page-content').html(data);
     });
   }
</script>
 
 


__NOTOC__
__NOTOC__
__NONEWSECTIONLINK__
__NONEWSECTIONLINK__

Revision as of 13:42, 1 August 2024

Welcome to the default main page!

<script>

 $(function() {
   var skinPreference = mw.user.options.get('skinPreference');
   
   if (skinPreference === 'citizen') {
     loadCitizenMainPage();
   }
 });
 function loadCitizenMainPage() {
   $.get(mw.config.get('wgArticlePath').replace('$1', 'MediaWiki:Mainpage/Citizen'), function(data) {
     $('#main-page-content').html(data);
   });
 }

</script>