fixes for main_page, edit, history. Fixed TOC table and implemented in a body. Categories styling yet to be fixed.
authorMilos Dinic <milos@mozilla-europe.org>
Sat, 13 Nov 2010 09:56:42 +0100
changeset 37 825d30d1cf7b59ccad5acfdd2466d1b4f1a35aa4
parent 36 eecca947058c93fb6436c6c81329a6ac8f7a3ccb
child 38 3c2ee4ab9e85bde6e95057547e598f6bc3324287
push id17
push userzbraniecki@mozilla.com
push dateWed, 17 Nov 2010 15:15:17 +0000
fixes for main_page, edit, history. Fixed TOC table and implemented in a body. Categories styling yet to be fixed.
mediawiki/skins/gmo.php
mediawiki/skins/gmo/style/screen.css
--- a/mediawiki/skins/gmo.php
+++ b/mediawiki/skins/gmo.php
@@ -19,17 +19,17 @@ if( !defined( 'MEDIAWIKI' ) )
  * Inherit main code from SkinTemplate, set the CSS and template filter.
  * @todo document
  * @ingroup Skins
  */
 class SkinGMO extends SkinTemplate {
     function initPage( OutputPage $out ) {
         parent::initPage( $out );
         $this->skinname  = 'gmo';
-        $this->stylename = 'gmomo';
+        $this->stylename = 'gmo';
         $this->template  = 'GMOTemplate';
 
     }
 
     function setupSkinUserCss( OutputPage $out ) {
         global $wgHandheldStyle;
 
         parent::setupSkinUserCss( $out );
@@ -98,41 +98,42 @@ class GMOTemplate extends QuickTemplate 
             foreach($this->data['xhtmlnamespaces'] as $tag => $ns) {
                 $doctype .= 'xmlns:'.$tag.'="'.$ns.'" ';
             }
             $doctype .= ' xml:lang="'.$this->data['lang'].'" lang="'.$this->data['lang'].'" dir="'.$this->data['dir'].'">';
             print($doctype);
         }
     }
      /*************************************************************************************************/
-        function crumbs($arr=Array()) {
-            array_unshift($arr, $t = Array('http://contribute.mozilla.org', 'Contribute'));
-            array_unshift($arr, $t = Array('http://www.mozilla.org', 'Home'));
-            print('<p id="crumbs">');
-            foreach($arr as $v) {
-                print('<a href="'.$v[0].'">'.$v[1].'</a> / ');
-            }
-            print('</p>'); 
-        }
 
-        /*************************************************************************************************/
         function title_crumbs($title) {
             $elems = explode('/',$this->data['titletext']);
             $elems2 = Array();
             $url = Array();
             foreach($elems as $v) {
                 $url[] = str_replace(' ','_',$v);
                 $elems2[] = Array(str_replace('$1',implode('/',$url),$this->data['articlepath']), $v);
             }
             $title = array_pop($elems); // take last element as title
             array_pop($elems2); // and remove the last element from crumbs
             return Array($elems2, $title);
         }
         
         /*************************************************************************************************/
+        function crumbs($arr=Array()) {
+            array_unshift($arr, $t = Array('http://contribute.mozilla.org', 'Contribute'));
+            array_unshift($arr, $t = Array('http://www.mozilla.org', 'Home'));
+            print('<p id="crumbs">');
+            foreach($arr as $v) {
+                print('<a href="'.$v[0].'">'.$v[1].'</a> / ');
+            }
+            print('</p>'); 
+        }
+        
+        /*************************************************************************************************/
     
     /*************************************************************************************************/
     function head() {
 ?>
 <head>
     <meta http-equiv="Content-Type" content="<?php $this->text('mimetype') ?>; charset=<?php $this->text('charset') ?>"/>
     <meta name="keywords" content="web browser, mozilla, firefox, foxfire, camino, thunderbird, bugzilla, user agent, email client, seamonkey, calendar, lightning, open web, better internet" />
     <title><?php $this->text('pagetitle') ?></title>
@@ -171,45 +172,31 @@ class GMOTemplate extends QuickTemplate 
 <ul id="skip">
     <li><a href="#q">Skip to Search</a></li>
     <li><a href="#nav">Skip to Navigation</a></li>
     <li><a href="#localnav">Skip to Sub Navigation</a></li>
     <li><a href="#main">Skip to Content</a></li>
 </ul>
 
 <div id="header">
-    <h1 class="unitPng"><a href="<?php echo $url?>/">mozilla</a></h1>
+    <h1 class="unitPng"><a href="<?php echo $url?>/">guides.mozila.org</a></h1>
     <div id="header-contents">
-        <ul id="nav">
-            <li><a href="<?php echo $url?>/about/">About us</a></li>
-            <li><a href="<?php echo $url?>/community/">Community map</a></li>
-            <li><a href="<?php echo $url?>/projects/">Our Projects</a></li>
-            <li><a href="<?php echo $url?>/contribute/">Get involved</a></li>
-        </ul>
-        
-        <form id="quick-search" action="http://www.google.com/cse" title="Search Mozilla sites">
-            <input type="hidden" name="cx" value="002443141534113389537:ysdmevkkknw" />
-            <input type="hidden" name="cof" value="FORID:0" />
-            <input id="q" type="text" name="q" class="input-placeholder-active" />
-            <input id="quick-search-btn" type="image" src="<?php echo $this->stylepath ?>/img/screen/template/search-submit.png" alt="Search" id="quick-search-btn" />
-        </form>
+        <div>
+            <ul>
+                <?php foreach($this->data['content_actions'] as $key => $action) {
+                ?><li id="ca-<?php echo htmlspecialchars($key) ?>"
+                <?php if($action['class']) { ?>class="<?php echo htmlspecialchars($action['class']) ?>"<?php } ?>
+                >[<a href="<?php echo htmlspecialchars($action['href']) ?>"><?php
+                    echo htmlspecialchars($action['text']) ?></a>]</li><?php
+                } ?>
+            </ul>
+        </div>
     </div>
 </div>
-<div id="breadcrumbs">
-    <div>
-        <ul>
-            <?php foreach($this->data['content_actions'] as $key => $action) {
-            ?><li id="ca-<?php echo htmlspecialchars($key) ?>"
-            <?php if($action['class']) { ?>class="<?php echo htmlspecialchars($action['class']) ?>"<?php } ?>
-            >[<a href="<?php echo htmlspecialchars($action['href']) ?>"><?php
-                echo htmlspecialchars($action['text']) ?></a>]</li><?php
-            } ?>
-        </ul>
-    </div>
-</div>
+
 <div id="main">
     <?php
         }
         
 
         function body() {
         
             $ar = $this->title_crumbs($this->data['title']);
@@ -248,36 +235,37 @@ class GMOTemplate extends QuickTemplate 
                         } ?>
                         </ul>
                       </div>
                     </div>
                   <?php }} ?>
                 </div>
             </div>
             
-            <div id="main-content"<?php if($menu)print(' class="with-menu"');?>>
+            <div id="main-content"<?php if($menu)print(' class="with-menu"');?>>              
                 <h1 id="page-title"><?php print($title);?></h1>
                 <hr>
-                 <?php $this->crumbs($crumbs); ?>
+                <?php $this->crumbs($crumbs); ?>
                 <h3 id="siteSub"><?php $this->msg('tagline') ?></h3>
                 <div id="contentSub"><?php $this->html('subtitle') ?></div>
                 <?php if($this->data['undelete']) { ?><div id="contentSub2"><?php     $this->html('undelete') ?></div><?php } ?>
                 <?php if($this->data['newtalk'] ) { ?><div class="usermessage"><?php $this->html('newtalk')  ?></div><?php } ?>
                 <?php if($this->data['showjumplinks']) { ?><div id="jump-to-nav"><?php $this->msg('jumpto') ?> <a href="#column-one"><?php $this->msg('jumptonavigation') ?></a>, <a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div><?php } ?>
                 <!-- start content -->
+                <?php if($menu)
+              $this->toc($toc); ?>
                 <?php print $body ?>
                 <?php if($this->data['catlinks']) { $this->html('catlinks'); } ?>
                 <!-- end content -->
                 <?php if($this->data['dataAfterContent']) { $this->html ('dataAfterContent'); } ?>
                 <div class="visualClear"></div>
             </div>
 
     <?php
-            if($menu)
-              $this->toc($toc);
+
         }
 
         /*************************************************************************************************/
         function footer() {
     ?>
         </div><!-- end #main -->
 </div>
 <div id="footer-wrap">
@@ -357,17 +345,18 @@ class GMOTemplate extends QuickTemplate 
 <?php
     }
 
     /*************************************************************************************************/
     function toc($toc) {
 ?>
 <div id="localnav">
     <ul class="first">
-        <li class="first"><a href="">Content</a>
+        <strong>Content</strong><hr>
+        <div class="tocbody">
             <ul>
                 <?php print($this->hackTOC($toc)) ?>
             </ul>
         </li>
     </ul>
 </div>
 <?php
     }
--- a/mediawiki/skins/gmo/style/screen.css
+++ b/mediawiki/skins/gmo/style/screen.css
@@ -18,61 +18,74 @@ body {
 }
 
 #header {
 	border-bottom: 10px solid #a5151e;
 	margin: 0 0 15px 6%;
 	position: relative;
 	background: #2a2a2a;
 	background: rgba(38,38,38,0.98);
-	height: 44px;
-	padding-top: 70px;
+	height: 30px;
+	padding-top: 57px;
 	zoom: 1;
+    color:#B91E27;
 }
 
 #header h1 {
 	background: transparent url(../img/screen/template/dino.png) no-repeat left top;
 	position: absolute;
-	left: -130px;
+	left: -140px;
 	margin: 0;
 	top: -30px;
 	width: 381px;
 	height: 227px;
 	z-index: 1;
 }
 
 #header h1 a,
 #header h1 span {
 	display: inline;
 	float: left;
 	font-family: MetaBold, Trebuchet MS, sans-serif;
     font-weight: bold;
 	letter-spacing: -2px;
-	font-size: 50px;
+	font-size: 30px;
 	color: #fff;
 	text-decoration: none;
 	padding: 0 40px;
 	margin: 70px 100px 0 130px;
 	text-shadow: 0 1px 5px rgba(0,0,0,0.4);
 }
 
 #header h1 a:hover {
 	text-decoration: none;
 	color: #eee;
 	text-shadow: 0 1px 5px rgba(0,0,0,0.4),
 	             0 0 10px rgba(255,255,255,0.4);
 }
 
-#header-contents {
-	position: absolute;
-	bottom: 0;
-	text-align: right;
-	padding-left: 270px;
+#header a:link, #header a:visited {
+    color: #FFFFFF;
 }
 
+#header-contents {
+    background:none repeat scroll 0 0 transparent;
+    float:right;
+    list-style-type:none;
+    padding-left:310px;
+    position:absolute;
+    text-align:right;
+    top:35px;
+}
+
+#header-contents li {
+background:inherit;
+float:left;
+font-size:20px;
+}
 #nav {
 	margin: 0;
 	float: left;
 }
 
 #nav li {
 	background: none;
 	padding: 0;
@@ -751,39 +764,26 @@ ul#home-nav li {
 	clear:both;
 	background: transparent url(../img/screen/template/screen/bg_body_2.jpg) no-repeat left bottom;
 }
 
 /* }}} */
 /* {{{ Everything Else */
 
 #localnav {
-	background: transparent url(../img/screen/template/screen/bg_localnav.png) no-repeat 20px -10px;
-	width: 195px;
-	list-style: none;
-	padding: 0 33px 10px 35px;
-	float: left;
-	position: relative;
-	z-index: 99;
+background-color:#F9F9F9;
+border:1px solid #AAAAAA;
+font-size:95%;
+padding:5px;
+display: table-cell;
 }
 
-	#localnav ul.first { border-top:9px solid #a8212a; padding-top:15px; }
-	#localnav ul { list-style:none; margin:0; }
-	#localnav a, #localnav span, #localnav strong { display: block; color:#000; font: normal 121% Georgia, serif; padding: 5px 10px; }
-	#localnav a:hover, #localnav a:focus { color: #148cb5; text-decoration: none; }
-	#localnav a.on, #localnav strong, #localnav span.on { background:#148cb5; color:#fff; }
-	#localnav li { background: none; border-top:1px solid #CFE1E7; padding:5px 20px; }
-	#localnav li.first, #localnav li:first-child { border-top:none; }
-	#localnav li ul { margin-bottom:10px; }
-	#localnav li li { background:transparent url(../img/screen/template/screen/bullet_localnav.png) no-repeat left .85em; border:none; margin-left:15px; padding:4px 4px 4px 14px; }
-	#localnav li li a { color:#148cb5; font-family:Arial, sans-serif; font-size:92%; padding: 0; }
-
 #main {
 	position: relative;
-	padding: 0 6%;
+	padding: 2% 6%;
 	zoom: 1;
 }
 
 #main-content {
 	margin: 0 0 0 40px;
 	zoom: 1;
     float: right;
     width:65%;
@@ -865,18 +865,18 @@ li, p, code, dd, dt { font-size:14px; }
 ul li { list-style-type: none; background: transparent url(../img/screen/template/screen/bullet.png) no-repeat 0 0.5em; padding-left: 10px; }
 
 dl { margin-bottom: 1em; }
 	dt { text-transform: uppercase; font-weight: bold;}
 	dd { margin: 0 0 0.5em 0.5em; }
 
 h1, h2, h3, h4, h5, h6 { color:#2a2a2a; font-family: MetaBold, Trebuchet MS, sans-serif; font-weight:bold; }
 	h1 { font-size:45px; margin:.55em 0; color:#b91e27; }
-	h2 { font-size:25px; margin:.75em 0; }
-	h3 { font-family: MetaBold, Trebuchet MS, sans-serif; font-size:13px; margin:.8em 0; font-weight: bold; }
+	h2 { font-size:150%; margin:.75em 0; font-weight: normal; }
+	h3 { font-size:1.3em; font-weight:bold;}
 		.section h3 { margin-top: 0; }
 	h4 { font-size:15px; margin:.85em 0; }
 	h5 { font-size:12.5px; margin:.875em 0; }
 
 ul, ol { margin:1em 0 1em 30px; }
 	li ul, li ol { margin:0 0 0 30px; }
 
 td, th { padding: 0.2em; }
@@ -950,23 +950,23 @@ fieldset legend {
 	.cols > *:last-child { margin-right:0; padding-right:0; }
 
 	.col-span { border-bottom:1px solid #404040; padding-bottom:15px; }
 
 ul.rows { border-top: 1px solid #dbe2e8; margin: 0 0 1em; }
 	ul.rows li { border-bottom: 1px solid #dbe2e8; padding: 1em 10px; background: none; }
 
 #crumbs {
-	margin: 0 6%;
-	padding: 0 0 0 36px;
-	font-size: 12px;
-	position: relative;
-	z-index: 2;
-	clear: both;
-	letter-spacing: 0.1em;
+clear:both;
+font-size:15px;
+letter-spacing:0.1em;
+margin:0 1%;
+padding:0 0 4% 0;
+position:relative;
+z-index:2;
 }
 
 #crumbs #crumbs-contents {
 	padding: 2px 4px;
 	xbackground: #fff;
 }
 
 #crumbs a {
@@ -980,18 +980,16 @@ ul.rows { border-top: 1px solid #dbe2e8;
 
 h1#page-title {
 	margin: 10px 0 15px;
 	font-size: 45px;
 	color: #b91e27;
 	line-height: 1;
 }
 
-#main .first { border-top:3px solid #c3c3c3; }
-
 .lead { font-family:Georgia, serif; font-size:20px; }
 
 .cta { background:#dadada url(../img/screen/template/screen/bg_cta.png) repeat-x 0 0; padding:20px; margin: 0 0 30px; }
 	.cta h4 { font: 250% Georgia, serif; text-transform: none; color: #fff; }
 	.cta p { color:#565353; line-height: 1.7; font-style: italic; }
 	.cta h4 + p:first-line { font-weight: bold; }
 
 .powered-by { background: transparent url(../img/screen/template/screen/powered-by-mozilla.png) no-repeat 0 0; width: 205px; height: 73px; text-indent: -9999px; position: relative; left: -3px; margin: 0; }
@@ -1243,20 +1241,72 @@ padding:20px 0 0 30px;
 
 #wiki-tools li {
 padding:3px 0 3px 50px;
 width:100%;
 list-style-type: none;
 background: none;
 }
 
-#breadcrumbs {
-background:none repeat scroll 0 0 transparent;
-float:right;
-list-style-type:none;
-padding:0 6% 0 0;
+#wpSummaryLabel {
+line-height: 1.3;
+font-weight: bold;
+}
+
+#wpSummary input {
+font-size:small;
+voice-family:inherit;
+}
+.editButtons {
+padding: 2% 0;
+}
+#mw-history-search legend {
+-moz-border-radius:3px 3px 3px 3px;
+-webkit-border-radius:3px 3px 3px 3px;
+background-color:#FFFFFF;
+padding:0 1%;
+}
+
+#contentSub {
+padding: 1% 0;
+}
+
+#mw-history-searchform {
+padding: 2% 0;
 }
 
-#breadcrumbs li {
-background:inherit;
-float:left;
-font-size:20px;
-}
\ No newline at end of file
+.mw-history-legend {
+padding: 2% 0;
+}
+/* Page history styling */
+/* the auto-generated edit comments */
+.autocomment { color: gray; }
+#pagehistory span.user {
+    margin-left: 1.4em;
+    margin-right: 0.4em;
+}
+#pagehistory span.minor { font-weight: bold; }
+#pagehistory li { border:1px dotted;
+padding:1% 0;
+}
+#pagehistory li.selected {
+    background-color:#f9f9f9;
+    border:1px dashed #aaaaaa;
+}
+/*
+** Diff rendering
+*/
+table.diff { background:white; }
+td.diff-otitle { background:#ffffff; }
+td.diff-ntitle { background:#ffffff; }
+td.diff-addedline {
+    background:#ccffcc;
+    font-size: smaller;
+}
+td.diff-deletedline {
+    background:#ffffaa;
+    font-size: smaller;
+}
+td.diff-context {
+    background:#eeeeee;
+    font-size: smaller;
+}
+span.diffchange { color: red; font-weight: bold; }
\ No newline at end of file