r114263 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114262‎ | r114263 | r114264 >
Date:13:38, 20 March 2012
Author:jdlrobson
Status:resolved (Comments)
Tags:
Comment:
first pass of footer redesign

following designs here http://www.mediawiki.org/wiki/Mobile_design/Footer
Note the TODO that the copyright icon is currently not configurable
and the original site retains the old footer
Modified paths:
  • /trunk/extensions/MobileFrontend/MobileFrontend.body.php (modified) (history)
  • /trunk/extensions/MobileFrontend/stylesheets/beta_common.css (modified) (history)
  • /trunk/extensions/MobileFrontend/templates/FooterTemplate.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/MobileFrontend.body.php
@@ -31,7 +31,7 @@
3232 public static $displayNoticeId;
3333 public static $leaveFeedbackURL;
3434 public static $mobileRedirectFormAction;
35 - public static $isBetaGroupMember = false;
 35+ public static $isBetaGroupMember = true;
3636 public static $minifyJS = true;
3737 public static $hideSearchBox = false;
3838 public static $hideLogo = false;
@@ -1104,6 +1104,7 @@
11051105 }
11061106
11071107 public function getFooterTemplate() {
 1108+ global $wgExtensionAssetsPath;
11081109 wfProfileIn( __METHOD__ );
11091110 $footerTemplate = new FooterTemplate();
11101111 $logoutHtml = ( self::$logoutHtml ) ? self::$logoutHtml : '';
@@ -1119,6 +1120,7 @@
11201121 'loginHtml' => $loginHtml,
11211122 'code' => self::$code,
11221123 'hideFooter' => self::$hideFooter,
 1124+ 'wgExtensionAssetsPath' => $wgExtensionAssetsPath,
11231125 'isBetaGroupMember' => self::$isBetaGroupMember,
11241126 );
11251127 $footerTemplate->setByArray( $options );
Index: trunk/extensions/MobileFrontend/stylesheets/beta_common.css
@@ -155,14 +155,6 @@
156156 -webkit-appearance: none;
157157 }
158158
159 -ul#footer-info {
160 - list-style: none;
161 - list-style-image: none;
162 - list-style-type: none;
163 - margin: 0;
164 - padding: 0;
165 -}
166 -
167159 .divclearable {
168160 display: block;
169161 zoom: 1;
@@ -488,11 +480,6 @@
489481 color: blue;
490482 }
491483
492 -.links {
493 - float: left;
494 - padding: 10px;
495 -}
496 -
497484 #contentSub,
498485 .dablink {
499486 margin-bottom: 10px;
@@ -590,11 +577,6 @@
591578 margin: 0;
592579 }
593580
594 -#footer {
595 - margin: 0 8px;
596 - clear: both;
597 -}
598 -
599581 #logo {
600582 position: absolute;
601583 height: 22px;
@@ -734,20 +716,7 @@
735717 margin: 8px 0 8px -3px;
736718 }
737719
738 -#footer {
739 - padding-top: 1em;
740 -}
741720
742 -#footer #perm {
743 - padding-top: 2em;
744 - font-size: 90%;
745 -}
746 -
747 -#footer #copyright {
748 - padding: 1em 0;
749 - font-size: 80%;
750 -}
751 -
752721 ol.references > li:target,
753722 sup.reference:target,
754723 span.citation:target,
@@ -889,6 +858,121 @@
890859 display: none !important;
891860 }
892861
 862+/* FOOTER */
 863+#footer {
 864+ -webkit-box-shadow: 0px -20px 10px -16px #ddd;
 865+ -moz-box-shadow: 0px -20px 10px -16px #ddd;
 866+ -o-box-shadow: 0px -20px 10px -16px #ddd;
 867+ box-shadow: 0px -20px 10px -16px #ddd;
 868+ padding: 12px 22px; /* see content_wrapper margin */
 869+ border-top: solid 1px #aaa;
 870+ line-height: 24px;
 871+ position: relative;
 872+ clear: both; /* cancel any floating in the content */
 873+}
 874+
 875+#footer ul {
 876+ text-align: center;
 877+ width: 100%;
 878+ padding: 0;
 879+ list-style: none;
 880+}
 881+
 882+#footer img {
 883+ height: 23px;
 884+ float: left;
 885+ margin-right: 4px;
 886+}
 887+
 888+#footer .toggleCopyright,
 889+#footer .license {
 890+ font-weight: bold;
 891+ font-size: 1em;
 892+ line-height: 24px;
 893+}
 894+
 895+#footer .toggleCopyright {
 896+ float: right;
 897+ margin: 0;
 898+ padding: 0;
 899+ position: relative;
 900+ padding-right: 32px;
 901+}
 902+
 903+.toggleCopyright .hide,
 904+.toggleCopyright .show {
 905+ position: absolute;
 906+ top: 0;
 907+ right: 0;
 908+ height: 22px;
 909+}
 910+
 911+/*
 912+disable animations in footer
 913+this is so that toggling can scroll it into view
 914+*/
 915+.togglingEnabled #footer .content_block {
 916+ -webkit-transition: none;
 917+ -moz-transition: none;
 918+ -o-transition: none;
 919+ transition: none;
 920+}
 921+
 922+.copyrightNotice {
 923+ padding-top: 8px;
 924+ line-height: 1.2em;
 925+ margin-bottom: 12px;
 926+}
 927+
 928+#content_footer {
 929+ text-align: center;
 930+ font-size: 0.9em;
 931+}
 932+
 933+#footer .links {
 934+ margin: 0;
 935+}
 936+
 937+#footer .links li {
 938+ display: block;
 939+ width: 25%;
 940+ font-size: 0.8em;
 941+ float: left;
 942+ text-align: center;
 943+}
 944+
 945+#footer .links li:first-child {
 946+ text-align: left;
 947+}
 948+
 949+#footer .links li:last-child {
 950+ text-align: right;
 951+}
 952+
 953+#footer .links:after {
 954+ content: "";
 955+ clear: both;
 956+ position: relative;
 957+ display: block;
 958+}
 959+
 960+.togglingEnabled #footer .more,
 961+.togglingEnabled #footer .openSection .less {
 962+ display: block;
 963+}
 964+
 965+#footer .more, /* no javascript */
 966+#footer .less,
 967+#footer .openSection .more {
 968+ display: none;
 969+}
 970+
 971+@media all and (min-width: 500px) {
 972+ #footer .links li {
 973+ font-size: 1.2em;
 974+ }
 975+}
 976+
893977 #mf-references {
894978 -webkit-transition: bottom 0.1s ease-in-out;
895979 -moz-transition: bottom 0.1s ease-in-out;
Index: trunk/extensions/MobileFrontend/templates/FooterTemplate.php
@@ -28,19 +28,53 @@
2929 $logoutLink = ( $this->data['logoutHtml'] ) ? ' | ' . $this->data['logoutHtml'] : '';
3030 $logoutLink = ( $this->data['loginHtml'] ) ? ' | ' . $this->data['loginHtml'] : $logoutLink;
3131
32 - $feedbackLink = ( $this->data['code'] == 'en' && $this->data['isBetaGroupMember'] ) ? "| <a href=\"{$leaveFeedbackURL}\">{$leaveFeedback}</a>" : '';
 32+ $feedbackLink = ( $this->data['code'] == 'en' && $this->data['isBetaGroupMember'] ) ? "<a href=\"{$leaveFeedbackURL}\">{$leaveFeedback}</a>" : '';
3333
3434 $footerDisplayNone = ( $this->data['hideFooter'] ) ? ' style="display: none;" ' : '';
3535
36 - $footerHtml = <<<HTML
37 - <div id='footer' {$footerDisplayNone}>
38 - <div class='nav' id='footmenu'>
 36+ $skin = RequestContext::getMain()->getSkin();
 37+ $disclaimerLink = $skin->disclaimerLink();
 38+ $privacyLink = $skin->privacyLink();
 39+ $aboutLink = $skin->aboutLink();
 40+
 41+ $normalFooter = <<<HTML
 42+ <div class='nav' id='footmenu'>
3943 <div class='mwm-notice'>
4044 <a href="{$viewNormalSiteURL}" id="mf-display-toggle">{$regularSite}</a> | <a href="{$imagesURL}">{$imagesToggle}</a> {$feedbackLink} {$logoutLink}
4145 </div>
4246 </div>
4347 <div id='copyright'>{$copyright}</div>
 48+HTML;
 49+ $betaFooter = <<<HTML
 50+ <!-- TODO: make license icon and text dynamic -->
 51+ <img src="{$this->data['wgExtensionAssetsPath']}/MobileFrontend/stylesheets/images/ccommons.png" alt="creative commons"
 52+ class='license' />
 53+ <a href="http://creativecommons.org/licenses/by-sa/3.0/" class="license">by SA 3.0</a>
 54+ <a href="#content_footer" class="toggleCopyright section_heading" id="section_footer">
 55+ <span class="more">more information</span><span class="less">less information</span>
 56+ </a>
 57+ <div class="content_block" id="content_footer">
 58+ <div class="copyrightNotice">
 59+ {$copyright}
4460 </div>
 61+ <ul class='links'>
 62+ <li>
 63+ <a href="{$this->data['leaveFeedbackURL']}">Contact</a>
 64+ </li><li>
 65+ {$privacyLink}
 66+ </li><li>
 67+ {$aboutLink}
 68+ </li><li>
 69+ {$disclaimerLink}
 70+ </li>
 71+ </ul>
 72+ </div>
 73+HTML;
 74+ $footer = ( $this->data['isBetaGroupMember'] ) ? $betaFooter : $normalFooter;
 75+ $footerHtml = <<<HTML
 76+ <div id='footer' {$footerDisplayNone}>
 77+ {$footer}
 78+ </div>
4579
4680 HTML;
4781 return $footerHtml;

Follow-up revisions

RevisionCommit summaryAuthorDate
r114264follow up to r114263...jdlrobson13:39, 20 March 2012
r114286follow up to r114263...jdlrobson17:31, 20 March 2012

Comments

#Comment by Preilly (talk | contribs)   17:44, 20 March 2012

Why is BETA now the default?

#Comment by Jdlrobson (talk | contribs)   18:05, 20 March 2012

See r114264 follow up

#Comment by Jdlrobson (talk | contribs)   18:06, 20 March 2012

(mistake :-S)

Status & tagging log