r27846 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r27845‎ | r27846 | r27847 >
Date:14:21, 26 November 2007
Author:tstarling
Status:old
Tags:
Comment:
Theme for a rough implementation of Frank's main page using a panel layout containing nodes, rather than a content-generating module.
Modified paths:
  • /trunk/fundcore/themes/fundcore/fundcore.js (added) (history)
  • /trunk/fundcore/themes/fundcore/page.tpl.php (modified) (history)
  • /trunk/fundcore/themes/fundcore/styles.css (added) (history)
  • /trunk/fundcore/themes/fundcore/template.php (modified) (history)

Diff [purge]

Index: trunk/fundcore/themes/fundcore/fundcore.js
@@ -0,0 +1,60 @@
 2+function xhr() {
 3+ var httpRequest;
 4+ if (window.XMLHttpRequest) { // Mozilla, Safari, ...
 5+ httpRequest = new XMLHttpRequest();
 6+ } else if (window.ActiveXObject) { // IE
 7+ httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
 8+ }
 9+ return httpRequest;
 10+}
 11+
 12+function story(s) {
 13+ var httpRequest = xhr();
 14+ if ( !httpRequest ) {
 15+ return;
 16+ }
 17+ var url = "story.php?s=" + s;
 18+ var storyContent = document.getElementById( 'storycontent' );
 19+ storyContent.innerHTML = '<tr><td align="center"><img src="images/spinner.gif"/></td></tr>';
 20+ httpRequest.onreadystatechange = function() {
 21+ if (httpRequest.readyState != 4) {
 22+ return;
 23+ }
 24+ var storyBox = document.getElementById( 'storybox' );
 25+ if (httpRequest.status != 200) {
 26+ storyBox.innerHTML = '<tr><td align="center">Error loading story</td></tr>';
 27+ } else {
 28+ storyBox.innerHTML = httpRequest.responseText;
 29+ }
 30+ }
 31+ httpRequest.open( 'GET', url, true );
 32+ httpRequest.send(null);
 33+}
 34+
 35+function tab(baseId, newIndex) {
 36+ if ( !document.getElementById ) {
 37+ return;
 38+ }
 39+ var header = document.getElementById( baseId );
 40+ header.style.display = 'inline';
 41+
 42+ for ( i = 0; i < 10; i++ ) {
 43+ var anchor = document.getElementById(baseId + '-a-' + i);
 44+ var pane = document.getElementById(baseId + '-pane-' + i);
 45+ if ( !anchor || !pane ) {
 46+ break;
 47+ }
 48+ if ( i == newIndex ) {
 49+ anchor.className = 'active';
 50+ anchor.href = 'javascript:;';
 51+ pane.style.display = 'block';
 52+ } else {
 53+ anchor.className = '';
 54+ anchor.href = 'javascript:tab("' + baseId + '", ' + i + ')';
 55+ pane.style.display = 'none';
 56+ }
 57+ }
 58+}
 59+
 60+
 61+
Property changes on: trunk/fundcore/themes/fundcore/fundcore.js
___________________________________________________________________
Added: svn:eol-style
162 + native
Index: trunk/fundcore/themes/fundcore/page.tpl.php
@@ -1,21 +1,25 @@
22 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 3+<?php $thp = base_path() . path_to_theme(); ?>
34 <html>
45 <head>
56 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
67 <title><?php print $head_title ?></title>
78 <?php print $head ?>
8 - <link rel="stylesheet" href="css/styles.css" type="text/css">
 9+ <?php print $styles ?>
 10+ <?php print $scripts ?>
 11+ <link rel="stylesheet" href="<?php print "$thp/styles.css";?>" type="text/css">
912 <style type="text/css">
1013 body {
1114 margin: 0px;
1215 padding: 0px;
13 - background-image:url(/sites/all/themes/fundcore/images/background.gif); background-repeat:repeat-y;
 16+ background-image:url(<?php print "$thp/images/background.gif";?>); background-repeat:repeat-y;
1417 background-position:center;
1518 background-color:#006699;
1619 font-family: Verdana, Arial, Sans-Serif;
1720 font-size: 10pt;
1821 }
1922 </style>
 23+ <script type="text/javascript" src="<?php print "$thp/fundcore.js"; ?>"></script>
2024 </head>
2125
2226 <body>
@@ -24,16 +28,16 @@
2529
2630 <table border="0" cellspacing="0" cellpadding="0" style="table-layout:fixed;">
2731 <tr>
28 - <td width="886" height="123" valign="middle" style="background-image:url(/sites/all/themes/fundcore/images/header-logos.jpg);">
 32+ <td width="886" height="123" valign="middle" style="background-image:url(<?php print "$thp/images/header-logos.jpg";?>);">
2933 <div style="margin-left:160px; font-size:22px; font-weight:bold; color:#484848; text-align:left;">
3034
31 - You can help Wikipedia<br>change the world
 35+ <?php echo t("You can help Wikipedia<br>change the world"); ?>
3236
3337 </div>
3438 </td>
3539 </tr>
3640 <tr>
37 - <td width="886" height="15" style="background-image:url(/sites/all/themes/fundcore/images/header-border.gif); background-repeat:repeat-x;">
 41+ <td width="886" height="15" style="background-image:url(<?php print "$thp/images/header-border.gif";?>); background-repeat:repeat-x;">
3842 </td>
3943 </tr>
4044 </table>
Index: trunk/fundcore/themes/fundcore/template.php
@@ -17,4 +17,4 @@
1818 if (count($breadcrumb) > 1) {
1919 return theme_breadcrumb($breadcrumb);
2020 }
21 -}
\ No newline at end of file
 21+}
Index: trunk/fundcore/themes/fundcore/styles.css
@@ -0,0 +1,182 @@
 2+
 3+a:link { color:#990000; text-decoration:none; }
 4+a:visited { color:#990000; text-decoration:none; }
 5+a:focus { color:#990000; text-decoration:none; }
 6+a:hover { color:#990000; text-decoration:none; }
 7+a:active { color:#990000; text-decoration:none; }
 8+
 9+p {
 10+ margin-top: 0em;
 11+ margin-bottom: 0.5em;
 12+ text-align: left;
 13+}
 14+
 15+ul {
 16+ margin-bottom: 0em;
 17+}
 18+
 19+.story {
 20+ font-family: Verdana, Arial, Sans-Serif;
 21+ font-size: 9pt;
 22+ line-height: 1.5em;
 23+ color:#484848;
 24+}
 25+
 26+#videooptions {
 27+ font-family: Verdana, Arial, Sans-Serif;
 28+ font-size: 8pt;
 29+ color:#999999;
 30+}
 31+
 32+#videooptions a {
 33+ font-family: Verdana, Arial, Sans-Serif;
 34+ font-size: 8pt;
 35+ color:#484848;
 36+ font-weight: bold;
 37+}
 38+
 39+.whatweneed {
 40+ font-family: Verdana, Arial, Sans-Serif;
 41+ font-size: 9pt;
 42+ line-height: 1.5em;
 43+ color:#484848;
 44+}
 45+
 46+.morestories {
 47+ font-family: Verdana, Arial, Sans-Serif;
 48+ font-size: 9pt;
 49+ font-style:italic;
 50+ text-align: center;
 51+ color:#999999;
 52+}
 53+
 54+.tax-exemption {
 55+ font-family: Verdana, Arial, Sans-Serif;
 56+ font-size: 9pt;
 57+ line-height: 1.5em;
 58+ color:#666666;
 59+}
 60+
 61+.otherbox, .otherbox * {
 62+ margin: 0px !important;
 63+ text-align: left;
 64+}
 65+
 66+.tabmenu {
 67+ font-size: 8pt;
 68+ font-weight: normal;
 69+ color: #666666;
 70+ border-bottom: 1px solid #edb571;
 71+ margin: 0px;
 72+ padding: 0px;
 73+ z-index: 1;
 74+ padding-left: 10px;
 75+ text-align: left;
 76+}
 77+
 78+.tabmenu li {
 79+ display: inline;
 80+ overflow: hidden;
 81+ list-style-type: none;
 82+}
 83+
 84+.tabmenu a, a.active {
 85+ color: #000000;
 86+ background: #f2e3d2;
 87+ font: normal 1em Verdana, Arial, sans-serif;
 88+ border: 1px solid #e9a95e;
 89+ padding: 0px 5px 0px 5px;
 90+ margin: 0;
 91+ text-decoration: none;
 92+}
 93+
 94+.tabmenu a.active {
 95+ font-weight: bold;
 96+ background: #f8e5bb;
 97+ border-bottom: 1px solid #f8e5bb;
 98+}
 99+
 100+.tabmenu a:hover {
 101+ color: #ffffff;
 102+ background: #e9a85e;
 103+}
 104+
 105+.tabmenu a:visited {
 106+ color: #000000;
 107+}
 108+
 109+.tabmenu a.active:hover {
 110+ background: #f8e5bb;
 111+ color: #000000;
 112+}
 113+
 114+.tabmenu-pane {
 115+ font-family: Verdana, Arial, Sans-Serif;
 116+ font-size: 9pt;
 117+ line-height: 1.5em;
 118+ color:#484848;
 119+ background: #f8e5bb;
 120+ padding: 20px;
 121+ border: 1px solid #e9a95e;
 122+ border-top: none;
 123+ z-index: 2;
 124+}
 125+
 126+.tabmenu-pane a {
 127+ text-decoration: none;
 128+ color: #f8e5bb;
 129+}
 130+
 131+.tabmenu-pane a:hover {
 132+ background: #f8e5bb;
 133+}
 134+
 135+#lastline {
 136+ text-decoration: none;
 137+ color: #006699;
 138+}
 139+
 140+#lastline a {
 141+ text-decoration: none;
 142+ color: #006699;
 143+}
 144+/*
 145+.round-container div {
 146+ padding: 0;
 147+ margin: 0;
 148+}
 149+.corner-1 {
 150+ background: url(images/corner-1.png) top left no-repeat;
 151+ width: 8px;
 152+ height: 8px;
 153+ float: left;
 154+ position: relative;
 155+ top: 0px;
 156+}
 157+.corner-2 {
 158+ background: url(images/corner-2.png) top right no-repeat;
 159+ width: 8px;
 160+ height: 8px;
 161+ float: right;
 162+ position: relative;
 163+ top: 0px;
 164+}
 165+.corner-3 {
 166+ background: url(images/corner-3.png) top right no-repeat;
 167+ width: 8px;
 168+ height: 8px;
 169+ float: right;
 170+ z-index: 1;
 171+ position: relative;
 172+ top: 0px;
 173+}
 174+.corner-4 {
 175+ background: url(images/corner-4.png) top left no-repeat;
 176+ width: 8px;
 177+ height: 8px;
 178+ float: left;
 179+ z-index: 1;
 180+ position: relative;
 181+ top: 0px;
 182+}*/
 183+
Property changes on: trunk/fundcore/themes/fundcore/styles.css
___________________________________________________________________
Added: svn:eol-style
1184 + native

Status & tagging log