Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/249570

Change subject: Update and add more examples
......................................................................

Update and add more examples

* Convert css to LESS with example imports
* Add an example js module
* Add viewport and basic responsiveness (separate common, desktop,
  mobile stylesheets)
* Include external links module and normalise library by default
* Separate ExampleTemplate class out into its own file

Change-Id: Icb6efef1e7e3429e126aa30adc93adef8cf19698
---
M Example.skin.php
A ExampleTemplate.php
A resources/libraries/normalise.css
A resources/main.js
R resources/screen-common.less
A resources/screen-desktop.less
A resources/screen-mobile.less
A resources/variables.less
M skin.json
9 files changed, 665 insertions(+), 218 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Example 
refs/changes/70/249570/1

diff --git a/Example.skin.php b/Example.skin.php
index 2a43d53..8c3b165 100644
--- a/Example.skin.php
+++ b/Example.skin.php
@@ -1,12 +1,5 @@
 <?php
 /**
- * Skin file for the Example skin.
- *
- * @file
- * @ingroup Skins
- */
-
-/**
  * SkinTemplate class for the Example skin
  *
  * @ingroup Skins
@@ -22,191 +15,14 @@
         */
        function setupSkinUserCss( OutputPage $out ) {
                parent::setupSkinUserCss( $out );
+
+               $out->addMeta( 'viewport', 'width=device-width, 
initial-scale=1.0' );
+
                $out->addModuleStyles( array(
-                       'mediawiki.skinning.interface', 'skins.example'
+                       'mediawiki.skinning.interface',
+                       'mediawiki.skinning.content.externallinks',
+                       'skins.example'
                ) );
-       }
-}
-
-/**
- * BaseTemplate class for the Example skin
- *
- * @ingroup Skins
- */
-class ExampleTemplate extends BaseTemplate {
-       /**
-        * Outputs a single sidebar portlet of any kind.
-        */
-       private function outputPortlet( $box ) {
-               if ( !$box['content'] ) {
-                       return;
-               }
-
-               ?>
-               <div
-                       role="navigation"
-                       class="mw-portlet"
-                       id="<?php echo Sanitizer::escapeId( $box['id'] ) ?>"
-                       <?php echo Linker::tooltip( $box['id'] ) ?>
-               >
-                       <h3>
-                               <?php
-                               if ( isset( $box['headerMessage'] ) ) {
-                                       $this->msg( $box['headerMessage'] );
-                               } else {
-                                       echo htmlspecialchars( $box['header'] );
-                               }
-                               ?>
-                       </h3>
-
-                       <?php
-                       if ( is_array( $box['content'] ) ) {
-                               echo '<ul>';
-                               foreach ( $box['content'] as $key => $item ) {
-                                       echo $this->makeListItem( $key, $item );
-                               }
-                               echo '</ul>';
-                       } else {
-                               echo $box['content'];
-                       }?>
-               </div>
-               <?php
-       }
-
-       /**
-        * Outputs the entire contents of the page
-        */
-       public function execute() {
-               $this->html( 'headelement' ) ?>
-               <div id="mw-wrapper">
-                       <a
-                               id="p-logo"
-                               role="banner"
-                               href="<?php echo htmlspecialchars( 
$this->data['nav_urls']['mainpage']['href'] ) ?>"
-                               <?php echo Xml::expandAttributes( 
Linker::tooltipAndAccesskeyAttribs( 'p-logo' ) ) ?>
-                       >
-                               <img
-                                       src="<?php $this->text( 'logopath' ) ?>"
-                                       alt="<?php $this->text( 'sitename' ) ?>"
-                               />
-                       </a>
-
-
-                       <div class="mw-body" role="main">
-                               <?php if ( $this->data['sitenotice'] ) { ?>
-                                       <div id="siteNotice"><?php $this->html( 
'sitenotice' ) ?></div>
-                               <?php } ?>
-
-                               <?php if ( $this->data['newtalk'] ) { ?>
-                                       <div class="usermessage"><?php 
$this->html( 'newtalk' ) ?></div>
-                               <?php } ?>
-
-                               <h1 class="firstHeading">
-                                       <?php $this->html( 'title' ) ?>
-                               </h1>
-
-                               <div id="siteSub"><?php $this->msg( 'tagline' ) 
?></div>
-
-                               <div class="mw-body-content">
-                                       <div id="contentSub">
-                                               <?php if ( 
$this->data['subtitle'] ) { ?>
-                                                       <p><?php $this->html( 
'subtitle' ) ?></p>
-                                               <?php } ?>
-                                               <?php if ( 
$this->data['undelete'] ) { ?>
-                                                       <p><?php $this->html( 
'undelete' ) ?></p>
-                                               <?php } ?>
-                                       </div>
-
-                                       <?php $this->html( 'bodytext' ) ?>
-
-                                       <?php $this->html( 'catlinks' ) ?>
-
-                                       <?php $this->html( 'dataAfterContent' 
); ?>
-
-                               </div>
-                       </div>
-
-
-                       <div id="mw-navigation">
-                               <h2><?php $this->msg( 'navigation-heading' ) 
?></h2>
-
-                               <form
-                                       action="<?php $this->text( 'wgScript' ) 
?>"
-                                       role="search"
-                                       class="mw-portlet"
-                                       id="p-search"
-                               >
-                                       <input type="hidden" name="title" 
value="<?php $this->text( 'searchtitle' ) ?>" />
-
-                                       <h3><label for="searchInput"><?php 
$this->msg( 'search' ) ?></label></h3>
-
-                                       <?php echo $this->makeSearchInput( 
array( "id" => "searchInput" ) ) ?>
-                                       <?php echo $this->makeSearchButton( 
'go' ) ?>
-
-                               </form>
-
-                               <?php
-
-                               $this->outputPortlet( array(
-                                       'id' => 'p-personal',
-                                       'headerMessage' => 'personaltools',
-                                       'content' => $this->getPersonalTools(),
-                               ) );
-
-                               $this->outputPortlet( array(
-                                       'id' => 'p-namespaces',
-                                       'headerMessage' => 'namespaces',
-                                       'content' => 
$this->data['content_navigation']['namespaces'],
-                               ) );
-                               $this->outputPortlet( array(
-                                       'id' => 'p-variants',
-                                       'headerMessage' => 'variants',
-                                       'content' => 
$this->data['content_navigation']['variants'],
-                               ) );
-                               $this->outputPortlet( array(
-                                       'id' => 'p-views',
-                                       'headerMessage' => 'views',
-                                       'content' => 
$this->data['content_navigation']['views'],
-                               ) );
-                               $this->outputPortlet( array(
-                                       'id' => 'p-actions',
-                                       'headerMessage' => 'actions',
-                                       'content' => 
$this->data['content_navigation']['actions'],
-                               ) );
-
-                               foreach ( $this->getSidebar() as $boxName => 
$box ) {
-                                       $this->outputPortlet( $box );
-                               }
-
-                               ?>
-                       </div>
-
-                       <div id="mw-footer">
-                               <?php foreach ( $this->getFooterLinks() as 
$category => $links ) { ?>
-                                       <ul role="contentinfo">
-                                               <?php foreach ( $links as $key 
) { ?>
-                                                       <li><?php $this->html( 
$key ) ?></li>
-                                               <?php } ?>
-                                       </ul>
-                               <?php } ?>
-
-                               <ul role="contentinfo">
-                                       <?php foreach ( $this->getFooterIcons( 
'icononly' ) as $blockName => $footerIcons ) { ?>
-                                               <li>
-                                                       <?php
-                                                       foreach ( $footerIcons 
as $icon ) {
-                                                               echo 
$this->getSkin()->makeFooterIcon( $icon );
-                                                       }
-                                                       ?>
-                                               </li>
-                                       <?php } ?>
-                               </ul>
-                       </div>
-               </div>
-
-               <?php $this->printTrail() ?>
-               </body></html>
-
-               <?php
+               $out->addModules( array( 'skins.example.js' ) );
        }
 }
diff --git a/ExampleTemplate.php b/ExampleTemplate.php
new file mode 100644
index 0000000..c8914f0
--- /dev/null
+++ b/ExampleTemplate.php
@@ -0,0 +1,183 @@
+<?php
+/**
+ * BaseTemplate class for the Example skin
+ *
+ * @ingroup Skins
+ */
+class ExampleTemplate extends BaseTemplate {
+       /**
+        * Outputs a single sidebar portlet of any kind.
+        */
+       private function outputPortlet( $box ) {
+               if ( !$box['content'] ) {
+                       return;
+               }
+
+               ?>
+               <div
+                       role="navigation"
+                       class="mw-portlet"
+                       id="<?php echo Sanitizer::escapeId( $box['id'] ) ?>"
+                       <?php echo Linker::tooltip( $box['id'] ) ?>
+               >
+                       <h3>
+                               <?php
+                               if ( isset( $box['headerMessage'] ) ) {
+                                       $this->msg( $box['headerMessage'] );
+                               } else {
+                                       echo htmlspecialchars( $box['header'] );
+                               }
+                               ?>
+                       </h3>
+
+                       <?php
+                       if ( is_array( $box['content'] ) ) {
+                               echo '<ul>';
+                               foreach ( $box['content'] as $key => $item ) {
+                                       echo $this->makeListItem( $key, $item );
+                               }
+                               echo '</ul>';
+                       } else {
+                               echo $box['content'];
+                       }?>
+               </div>
+               <?php
+       }
+
+       /**
+        * Outputs the entire contents of the page
+        */
+       public function execute() {
+               $this->html( 'headelement' ) ?>
+               <div id="mw-wrapper">
+                       <a
+                               id="p-logo"
+                               role="banner"
+                               href="<?php echo htmlspecialchars( 
$this->data['nav_urls']['mainpage']['href'] ) ?>"
+                               <?php echo Xml::expandAttributes( 
Linker::tooltipAndAccesskeyAttribs( 'p-logo' ) ) ?>
+                       >
+                               <img
+                                       src="<?php $this->text( 'logopath' ) ?>"
+                                       alt="<?php $this->text( 'sitename' ) ?>"
+                               />
+                       </a>
+
+
+                       <div class="mw-body" role="main">
+                               <?php if ( $this->data['sitenotice'] ) { ?>
+                                       <div id="siteNotice"><?php $this->html( 
'sitenotice' ) ?></div>
+                               <?php } ?>
+
+                               <?php if ( $this->data['newtalk'] ) { ?>
+                                       <div class="usermessage"><?php 
$this->html( 'newtalk' ) ?></div>
+                               <?php } ?>
+
+                               <h1 class="firstHeading">
+                                       <?php $this->html( 'title' ) ?>
+                               </h1>
+
+                               <div id="siteSub"><?php $this->msg( 'tagline' ) 
?></div>
+
+                               <div class="mw-body-content">
+                                       <div id="contentSub">
+                                               <?php if ( 
$this->data['subtitle'] ) { ?>
+                                                       <p><?php $this->html( 
'subtitle' ) ?></p>
+                                               <?php } ?>
+                                               <?php if ( 
$this->data['undelete'] ) { ?>
+                                                       <p><?php $this->html( 
'undelete' ) ?></p>
+                                               <?php } ?>
+                                       </div>
+
+                                       <?php $this->html( 'bodytext' ) ?>
+
+                                       <?php $this->html( 'catlinks' ) ?>
+
+                                       <?php $this->html( 'dataAfterContent' 
); ?>
+
+                               </div>
+                       </div>
+
+
+                       <div id="mw-navigation">
+                               <h2><?php $this->msg( 'navigation-heading' ) 
?></h2>
+
+                               <form
+                                       action="<?php $this->text( 'wgScript' ) 
?>"
+                                       role="search"
+                                       class="mw-portlet"
+                                       id="p-search"
+                               >
+                                       <input type="hidden" name="title" 
value="<?php $this->text( 'searchtitle' ) ?>" />
+
+                                       <h3><label for="searchInput"><?php 
$this->msg( 'search' ) ?></label></h3>
+
+                                       <?php echo $this->makeSearchInput( 
array( "id" => "searchInput" ) ) ?>
+                                       <?php echo $this->makeSearchButton( 
'go' ) ?>
+
+                               </form>
+
+                               <?php
+
+                               $this->outputPortlet( array(
+                                       'id' => 'p-personal',
+                                       'headerMessage' => 'personaltools',
+                                       'content' => $this->getPersonalTools(),
+                               ) );
+
+                               $this->outputPortlet( array(
+                                       'id' => 'p-namespaces',
+                                       'headerMessage' => 'namespaces',
+                                       'content' => 
$this->data['content_navigation']['namespaces'],
+                               ) );
+                               $this->outputPortlet( array(
+                                       'id' => 'p-variants',
+                                       'headerMessage' => 'variants',
+                                       'content' => 
$this->data['content_navigation']['variants'],
+                               ) );
+                               $this->outputPortlet( array(
+                                       'id' => 'p-views',
+                                       'headerMessage' => 'views',
+                                       'content' => 
$this->data['content_navigation']['views'],
+                               ) );
+                               $this->outputPortlet( array(
+                                       'id' => 'p-actions',
+                                       'headerMessage' => 'actions',
+                                       'content' => 
$this->data['content_navigation']['actions'],
+                               ) );
+
+                               foreach ( $this->getSidebar() as $boxName => 
$box ) {
+                                       $this->outputPortlet( $box );
+                               }
+
+                               ?>
+                       </div>
+
+                       <div id="mw-footer">
+                               <?php foreach ( $this->getFooterLinks() as 
$category => $links ) { ?>
+                                       <ul role="contentinfo">
+                                               <?php foreach ( $links as $key 
) { ?>
+                                                       <li><?php $this->html( 
$key ) ?></li>
+                                               <?php } ?>
+                                       </ul>
+                               <?php } ?>
+
+                               <ul role="contentinfo">
+                                       <?php foreach ( $this->getFooterIcons( 
'icononly' ) as $blockName => $footerIcons ) { ?>
+                                               <li>
+                                                       <?php
+                                                       foreach ( $footerIcons 
as $icon ) {
+                                                               echo 
$this->getSkin()->makeFooterIcon( $icon );
+                                                       }
+                                                       ?>
+                                               </li>
+                                       <?php } ?>
+                               </ul>
+                       </div>
+               </div>
+
+               <?php $this->printTrail() ?>
+               </body></html>
+
+               <?php
+       }
+}
diff --git a/resources/libraries/normalise.css 
b/resources/libraries/normalise.css
new file mode 100644
index 0000000..351d2c6
--- /dev/null
+++ b/resources/libraries/normalise.css
@@ -0,0 +1,412 @@
+/*! normalize.css v3.0.mwfork.2 | MIT License | git.io/normalize */
+
+/**
+ * Prevent iOS text size adjust after orientation change, without disabling
+ * user zoom.
+ */
+
+html {
+       -ms-text-size-adjust: 100%;
+       -webkit-text-size-adjust: 100%;
+}
+
+/**
+ * Remove default margin.
+ */
+
+body {
+       margin: 0;
+}
+
+/* HTML5 display definitions
+        
========================================================================== */
+
+/**
+ * Correct 'block' display not defined in IE 8/9.
+ */
+
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+main,
+nav,
+section,
+summary {
+       display: block;
+}
+
+/**
+ * 1. Correct 'inline-block' display not defined in IE 8/9.
+ * 2. Normalize vertical alignment of 'progress' in Chrome, Firefox, and Opera.
+ */
+
+audio,
+canvas,
+progress,
+video {
+       display: inline-block; /* 1 */
+       vertical-align: baseline; /* 2 */
+}
+
+/**
+ * Prevent modern browsers from displaying 'audio' without controls.
+ * Remove excess height in iOS 5 devices.
+ */
+
+audio:not([controls]) {
+       display: none;
+       height: 0;
+}
+
+/**
+ * Address '[hidden]' styling not present in IE 8/9.
+ * Hide the 'template' element in IE, Safari, and Firefox < 22.
+ */
+
+[hidden],
+template {
+       display: none;
+}
+
+/* Links
+        
========================================================================== */
+
+/**
+ * Remove the gray background color from active links in IE 10.
+ */
+
+a {
+       background: transparent;
+}
+
+/* Text-level semantics
+        
========================================================================== */
+
+/**
+ * Address styling not present in IE 8/9, Safari 5, and Chrome.
+ */
+
+abbr[title] {
+       border-bottom: 1px dotted;
+}
+@supports (text-decoration: underline dotted) {
+       abbr[title] {
+               border-bottom: none;
+               text-decoration: underline dotted;
+       }
+}
+
+/**
+ * Address style set to 'bolder' in Firefox 4+, Safari 5, and Chrome.
+ */
+
+b,
+strong {
+       font-weight: bold;
+}
+
+/**
+ * Address styling not present in Safari 5 and Chrome.
+ */
+
+dfn {
+       font-style: italic;
+}
+
+/**
+ * Address variable 'h1' font-size and margin within 'section' and 'article'
+ * contexts in Firefox 4+, Safari 5, and Chrome.
+ */
+
+h1 {
+       font-size: 2em;
+       margin: 0.67em 0;
+}
+
+/**
+ * Address styling not present in IE 8/9.
+ */
+
+mark {
+       background: #ff0;
+       color: #000;
+}
+
+/**
+ * Address inconsistent and variable font size in all browsers.
+ */
+
+small {
+       font-size: 80%;
+}
+
+/**
+ * Prevent 'sub' and 'sup' affecting 'line-height' in all browsers.
+ */
+
+sub,
+sup {
+       font-size: 75%;
+       line-height: 0;
+       position: relative;
+       vertical-align: baseline;
+}
+
+sup {
+       top: -0.5em;
+}
+
+sub {
+       bottom: -0.25em;
+}
+
+/* Embedded content
+        
========================================================================== */
+
+/**
+ * Remove border when inside 'a' element in IE 8/9.
+ */
+
+img {
+       border: 0;
+}
+
+/**
+ * Correct overflow displayed oddly in IE 9.
+ */
+
+svg:not(:root) {
+       overflow: hidden;
+}
+
+/* Grouping content
+        
========================================================================== */
+
+/**
+ * Address margin not present in IE 8/9 and Safari 5.
+ */
+
+figure {
+       margin: 1em 40px;
+}
+
+/**
+ * Address differences between Firefox and other browsers.
+ */
+
+hr {
+       -moz-box-sizing: content-box;
+       box-sizing: content-box;
+       height: 0;
+}
+
+/**
+ * Address odd 'em'-unit font size rendering in all browsers.
+ */
+
+code,
+kbd,
+pre,
+samp {
+       font-family: monospace, monospace;
+       font-size: 1em;
+}
+
+/* Forms
+        
========================================================================== */
+
+/**
+ * Known limitation: by default, Chrome and Safari on OS X allow very limited
+ * styling of 'select', unless a 'border' property is set.
+ */
+
+/**
+ * 1. Inherit most font properties to avoid cross-browser weirdness
+ * 2. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
+ */
+
+button,
+input,
+optgroup,
+select,
+textarea {
+       font-style: inherit;
+       font-variant: inherit;
+       font-weight: inherit;
+       font-stretch: inherit;
+       font-size: inherit;
+       line-height: inherit; /* 1 */
+       margin: 0; /* 2 */
+}
+
+/**
+ * Address 'overflow' set to 'hidden' in IE 8/9/10.
+ */
+
+button {
+       overflow: visible;
+}
+
+/**
+ * Address inconsistent 'text-transform' inheritance for 'button' and 'select'.
+ * All other form control elements do not inherit 'text-transform' values.
+ * Correct 'button' style inheritance in Firefox, IE 8+, and Opera
+ * Correct 'select' style inheritance in Firefox.
+ */
+
+button,
+select {
+       text-transform: none;
+}
+
+/**
+ * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native 'audio'
+ *    and 'video' controls.
+ * 2. Correct inability to style clickable 'input' types in iOS.
+ * 3. Improve usability and consistency of cursor style between image-type
+ *    'input' and others.
+ */
+
+button,
+html input[type="button"], /* 1 */
+input[type="reset"],
+input[type="submit"] {
+       -webkit-appearance: button; /* 2 */
+       cursor: pointer; /* 3 */
+}
+
+/**
+ * Re-set default cursor for disabled elements.
+ */
+
+button[disabled],
+html input[disabled] {
+       cursor: default;
+}
+
+/**
+ * Remove inner padding and border in Firefox 4+.
+ */
+
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+       border: 0;
+       padding: 0;
+}
+
+/**
+ * Address Firefox 4+ setting 'line-height' on 'input' using '!important' in
+ * the UA stylesheet.
+ */
+
+input {
+       line-height: normal;
+}
+
+/**
+ * It's recommended that you don't attempt to style these elements.
+ * Firefox's implementation doesn't respect box-sizing, padding, or width.
+ *
+ * 1. Address box sizing set to 'content-box' in IE 8/9/10.
+ * 2. Remove excess padding in IE 8/9/10.
+ */
+
+input[type="checkbox"],
+input[type="radio"] {
+       box-sizing: border-box; /* 1 */
+       padding: 0; /* 2 */
+}
+
+/**
+ * Fix the cursor style for Chrome's increment/decrement buttons. For certain
+ * 'font-size' values of the 'input', it causes the cursor style of the
+ * decrement button to change from 'default' to 'text'.
+ */
+
+input[type="number"]::-webkit-inner-spin-button,
+input[type="number"]::-webkit-outer-spin-button {
+       height: auto;
+}
+
+/**
+ * 1. Address 'appearance' set to 'searchfield' in Safari 5 and Chrome.
+ * 2. Address 'box-sizing' set to 'border-box' in Safari 5 and Chrome
+ *    (include '-moz' to future-proof).
+ */
+
+input[type="search"] {
+       -webkit-appearance: textfield; /* 1 */
+       -moz-box-sizing: content-box;
+       -webkit-box-sizing: content-box; /* 2 */
+       box-sizing: content-box;
+}
+
+/**
+ * Remove inner padding and search cancel button in Safari and Chrome on OS X.
+ * Safari (but not Chrome) clips the cancel button when the search input has
+ * padding (and 'textfield' appearance).
+ */
+
+input[type="search"]::-webkit-search-cancel-button,
+input[type="search"]::-webkit-search-decoration {
+       -webkit-appearance: none;
+}
+
+/**
+ * Define consistent border, margin, and padding.
+ */
+
+fieldset {
+       border: 1px solid #c0c0c0;
+       margin: 0 2px;
+       padding: 0.35em 0.625em 0.75em;
+}
+
+/**
+ * 1. Correct 'color' not being inherited in IE 6/7/8/9.
+ * 2. Remove padding so people aren't caught out if they zero out fieldsets.
+ */
+
+legend {
+       border: 0; /* 1 */
+       padding: 0; /* 2 */
+}
+
+/**
+ * Remove default vertical scrollbar in IE 8/9.
+ */
+
+textarea {
+       overflow: auto;
+}
+
+/**
+ * Don't inherit the 'font-weight' (applied by a rule above).
+ * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
+ */
+
+optgroup {
+       font-weight: bold;
+}
+
+/* Tables
+        
========================================================================== */
+
+/**
+ * Remove most spacing between table cells.
+ */
+
+table {
+       border-collapse: collapse;
+       border-spacing: 0;
+}
+
+td,
+th {
+       padding: 0;
+}
diff --git a/resources/main.js b/resources/main.js
new file mode 100644
index 0000000..a9f01d0
--- /dev/null
+++ b/resources/main.js
@@ -0,0 +1 @@
+/* JavaScript for the Example skin */
diff --git a/resources/screen.css b/resources/screen-common.less
similarity index 70%
rename from resources/screen.css
rename to resources/screen-common.less
index 6a396b4..16dcd73 100644
--- a/resources/screen.css
+++ b/resources/screen-common.less
@@ -2,6 +2,8 @@
  * Basic styling for the Example skin.
  */
 
+@import "variables.less";
+
 /* Page layout */
 
 html,
@@ -12,29 +14,13 @@
 }
 
 #mw-wrapper {
-       width: 60em;
        margin: 0 auto;
-       border-left: 1px solid black;
-       border-right: 1px solid black;
        position: relative;
 }
 
 .mw-body {
-       width: 46em;
        padding: 1em;
-       padding-top: 6em;
-       border-left: 1px solid black;
-       float: right;
 }
-
-#p-logo,
-#mw-navigation {
-       width: 10em;
-       padding-left: 1em;
-       clear: left;
-       float: left;
-}
-
 #p-logo {
        text-align: center;
 }
@@ -55,16 +41,11 @@
        right: 1em;
        width: 46em;
        text-align: right;
-}
 
-#p-personal ul {
-       list-style-type: none;
-       margin: 0;
-}
-
-#p-personal ul li {
-       display: inline-block;
-       margin-right: 1em;
+       ul {
+               list-style-type: none;
+               margin: 0;
+       }
 }
 
 /* Footer */
diff --git a/resources/screen-desktop.less b/resources/screen-desktop.less
new file mode 100644
index 0000000..3dd2668
--- /dev/null
+++ b/resources/screen-desktop.less
@@ -0,0 +1,33 @@
+@import "variables.less";
+
+#mw-wrapper {
+       max-width: 60em;
+       border-left: 1px solid black;
+       border-right: 1px solid black;
+}
+.mw-body {
+       width: 46em;
+       border-left: 1px solid black;
+       float: right;
+       padding-top: 6em;
+}
+
+#p-logo,
+#mw-navigation {
+       width: 10em;
+       padding-left: 1em;
+       clear: left;
+       float: left;
+}
+
+#p-personal ul li {
+       display: inline-block;
+       margin-right: 1em;
+}
+#p-namespaces, #p-views, #p-actions {
+       float: left;
+       margin-right: 1em;
+}
+#p-navigation {
+       clear: both;
+}
diff --git a/resources/screen-mobile.less b/resources/screen-mobile.less
new file mode 100644
index 0000000..c81cb8c
--- /dev/null
+++ b/resources/screen-mobile.less
@@ -0,0 +1,6 @@
+@import "variables.less";
+
+.mw-body,
+.firstHeading {
+       margin-top: 0;
+}
diff --git a/resources/variables.less b/resources/variables.less
new file mode 100644
index 0000000..7ce78df
--- /dev/null
+++ b/resources/variables.less
@@ -0,0 +1 @@
+/* @import "mediawiki.mixins"; */
diff --git a/skin.json b/skin.json
index d615a67..c992273 100644
--- a/skin.json
+++ b/skin.json
@@ -18,10 +18,24 @@
        "ResourceModules": {
                "skins.example": {
                        "styles": {
-                               "resources/screen.css": {
+                               "resources/libraries/normalise.css": {
                                        "media": "screen"
+                               },
+                               "resources/screen-common.less": {
+                                       "media": "screen"
+                               },
+                               "resources/screen-desktop.less": {
+                                       "media": "screen and (min-width: 751px)"
+                               },
+                               "resources/screen-mobile.less": {
+                                       "media": "screen and (max-width: 750px)"
                                }
                        }
+               },
+               "skins.example.js": {
+                       "scripts": [
+                               "resources/main.js"
+                       ]
                }
        },
        "ResourceFileModulePaths": {
@@ -30,7 +44,7 @@
        },
        "AutoloadClasses": {
                "SkinExample": "Example.skin.php",
-               "ExampleTemplate": "Example.skin.php"
+               "ExampleTemplate": "ExampleTemplate.php"
        },
        "manifest_version": 1
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/249570
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icb6efef1e7e3429e126aa30adc93adef8cf19698
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Example
Gerrit-Branch: master
Gerrit-Owner: Isarra <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to