https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114263
Revision: 114263 Author: jdlrobson Date: 2012-03-20 13:38:09 +0000 (Tue, 20 Mar 2012) Log Message: ----------- 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 trunk/extensions/MobileFrontend/stylesheets/beta_common.css trunk/extensions/MobileFrontend/templates/FooterTemplate.php Modified: trunk/extensions/MobileFrontend/MobileFrontend.body.php =================================================================== --- trunk/extensions/MobileFrontend/MobileFrontend.body.php 2012-03-20 13:34:22 UTC (rev 114262) +++ trunk/extensions/MobileFrontend/MobileFrontend.body.php 2012-03-20 13:38:09 UTC (rev 114263) @@ -31,7 +31,7 @@ public static $displayNoticeId; public static $leaveFeedbackURL; public static $mobileRedirectFormAction; - public static $isBetaGroupMember = false; + public static $isBetaGroupMember = true; public static $minifyJS = true; public static $hideSearchBox = false; public static $hideLogo = false; @@ -1104,6 +1104,7 @@ } public function getFooterTemplate() { + global $wgExtensionAssetsPath; wfProfileIn( __METHOD__ ); $footerTemplate = new FooterTemplate(); $logoutHtml = ( self::$logoutHtml ) ? self::$logoutHtml : ''; @@ -1119,6 +1120,7 @@ 'loginHtml' => $loginHtml, 'code' => self::$code, 'hideFooter' => self::$hideFooter, + 'wgExtensionAssetsPath' => $wgExtensionAssetsPath, 'isBetaGroupMember' => self::$isBetaGroupMember, ); $footerTemplate->setByArray( $options ); Modified: trunk/extensions/MobileFrontend/stylesheets/beta_common.css =================================================================== --- trunk/extensions/MobileFrontend/stylesheets/beta_common.css 2012-03-20 13:34:22 UTC (rev 114262) +++ trunk/extensions/MobileFrontend/stylesheets/beta_common.css 2012-03-20 13:38:09 UTC (rev 114263) @@ -155,14 +155,6 @@ -webkit-appearance: none; } -ul#footer-info { - list-style: none; - list-style-image: none; - list-style-type: none; - margin: 0; - padding: 0; -} - .divclearable { display: block; zoom: 1; @@ -488,11 +480,6 @@ color: blue; } -.links { - float: left; - padding: 10px; -} - #contentSub, .dablink { margin-bottom: 10px; @@ -590,11 +577,6 @@ margin: 0; } -#footer { - margin: 0 8px; - clear: both; -} - #logo { position: absolute; height: 22px; @@ -734,20 +716,7 @@ margin: 8px 0 8px -3px; } -#footer { - padding-top: 1em; -} -#footer #perm { - padding-top: 2em; - font-size: 90%; -} - -#footer #copyright { - padding: 1em 0; - font-size: 80%; -} - ol.references > li:target, sup.reference:target, span.citation:target, @@ -889,6 +858,121 @@ display: none !important; } +/* FOOTER */ +#footer { + -webkit-box-shadow: 0px -20px 10px -16px #ddd; + -moz-box-shadow: 0px -20px 10px -16px #ddd; + -o-box-shadow: 0px -20px 10px -16px #ddd; + box-shadow: 0px -20px 10px -16px #ddd; + padding: 12px 22px; /* see content_wrapper margin */ + border-top: solid 1px #aaa; + line-height: 24px; + position: relative; + clear: both; /* cancel any floating in the content */ +} + +#footer ul { + text-align: center; + width: 100%; + padding: 0; + list-style: none; +} + +#footer img { + height: 23px; + float: left; + margin-right: 4px; +} + +#footer .toggleCopyright, +#footer .license { + font-weight: bold; + font-size: 1em; + line-height: 24px; +} + +#footer .toggleCopyright { + float: right; + margin: 0; + padding: 0; + position: relative; + padding-right: 32px; +} + +.toggleCopyright .hide, +.toggleCopyright .show { + position: absolute; + top: 0; + right: 0; + height: 22px; +} + +/* +disable animations in footer +this is so that toggling can scroll it into view +*/ +.togglingEnabled #footer .content_block { + -webkit-transition: none; + -moz-transition: none; + -o-transition: none; + transition: none; +} + +.copyrightNotice { + padding-top: 8px; + line-height: 1.2em; + margin-bottom: 12px; +} + +#content_footer { + text-align: center; + font-size: 0.9em; +} + +#footer .links { + margin: 0; +} + +#footer .links li { + display: block; + width: 25%; + font-size: 0.8em; + float: left; + text-align: center; +} + +#footer .links li:first-child { + text-align: left; +} + +#footer .links li:last-child { + text-align: right; +} + +#footer .links:after { + content: ""; + clear: both; + position: relative; + display: block; +} + +.togglingEnabled #footer .more, +.togglingEnabled #footer .openSection .less { + display: block; +} + +#footer .more, /* no javascript */ +#footer .less, +#footer .openSection .more { + display: none; +} + +@media all and (min-width: 500px) { + #footer .links li { + font-size: 1.2em; + } +} + #mf-references { -webkit-transition: bottom 0.1s ease-in-out; -moz-transition: bottom 0.1s ease-in-out; Modified: trunk/extensions/MobileFrontend/templates/FooterTemplate.php =================================================================== --- trunk/extensions/MobileFrontend/templates/FooterTemplate.php 2012-03-20 13:34:22 UTC (rev 114262) +++ trunk/extensions/MobileFrontend/templates/FooterTemplate.php 2012-03-20 13:38:09 UTC (rev 114263) @@ -28,19 +28,53 @@ $logoutLink = ( $this->data['logoutHtml'] ) ? ' | ' . $this->data['logoutHtml'] : ''; $logoutLink = ( $this->data['loginHtml'] ) ? ' | ' . $this->data['loginHtml'] : $logoutLink; - $feedbackLink = ( $this->data['code'] == 'en' && $this->data['isBetaGroupMember'] ) ? "| <a href=\"{$leaveFeedbackURL}\">{$leaveFeedback}</a>" : ''; + $feedbackLink = ( $this->data['code'] == 'en' && $this->data['isBetaGroupMember'] ) ? "<a href=\"{$leaveFeedbackURL}\">{$leaveFeedback}</a>" : ''; $footerDisplayNone = ( $this->data['hideFooter'] ) ? ' style="display: none;" ' : ''; - $footerHtml = <<<HTML - <div id='footer' {$footerDisplayNone}> - <div class='nav' id='footmenu'> + $skin = RequestContext::getMain()->getSkin(); + $disclaimerLink = $skin->disclaimerLink(); + $privacyLink = $skin->privacyLink(); + $aboutLink = $skin->aboutLink(); + + $normalFooter = <<<HTML + <div class='nav' id='footmenu'> <div class='mwm-notice'> <a href="{$viewNormalSiteURL}" id="mf-display-toggle">{$regularSite}</a> | <a href="{$imagesURL}">{$imagesToggle}</a> {$feedbackLink} {$logoutLink} </div> </div> <div id='copyright'>{$copyright}</div> +HTML; + $betaFooter = <<<HTML + <!-- TODO: make license icon and text dynamic --> + <img src="{$this->data['wgExtensionAssetsPath']}/MobileFrontend/stylesheets/images/ccommons.png" alt="creative commons" + class='license' /> + <a href="http://creativecommons.org/licenses/by-sa/3.0/" class="license">by SA 3.0</a> + <a href="#content_footer" class="toggleCopyright section_heading" id="section_footer"> + <span class="more">more information</span><span class="less">less information</span> + </a> + <div class="content_block" id="content_footer"> + <div class="copyrightNotice"> + {$copyright} </div> + <ul class='links'> + <li> + <a href="{$this->data['leaveFeedbackURL']}">Contact</a> + </li><li> + {$privacyLink} + </li><li> + {$aboutLink} + </li><li> + {$disclaimerLink} + </li> + </ul> + </div> +HTML; + $footer = ( $this->data['isBetaGroupMember'] ) ? $betaFooter : $normalFooter; + $footerHtml = <<<HTML + <div id='footer' {$footerDisplayNone}> + {$footer} + </div> HTML; return $footerHtml; _______________________________________________ MediaWiki-CVS mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
