r113900 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113899‎ | r113900 | r113901 >
Date:10:00, 15 March 2012
Author:jdlrobson
Status:ok
Tags:
Comment:
style search results for full screen search

this completes the first iteration of
http://www.mediawiki.org/wiki/Mobile_design/Full-screen_search

add box shadow to search box when active
use css transitions to fade into full screen search
move results element to under search form
Modified paths:
  • /trunk/extensions/MobileFrontend/stylesheets/beta_common.css (modified) (history)
  • /trunk/extensions/MobileFrontend/templates/SearchTemplate.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/stylesheets/beta_common.css
@@ -128,7 +128,6 @@
129129
130130 a.search-result-item {
131131 display: block;
132 - margin-right: 2em;
133132 }
134133
135134 /* TODO: support browsers which do not support data uris */
@@ -137,16 +136,6 @@
138137 padding-right: 13px;
139138 }
140139
141 -#results {
142 - display: none;
143 - background-color: #ffffff;
144 - border-top: none;
145 - z-index: 2;
146 - position: absolute;
147 - left: 53px;
148 - top: 35px;
149 -}
150 -
151140 .search_bar .search {
152141 -webkit-appearance: none;
153142 border-top-width: 0px;
@@ -725,16 +714,46 @@
726715 full screen search css
727716 */
728717 .full-screen-search #header {
 718+ -webkit-box-shadow: 3px 1px 8px #333;
 719+ -moz-box-shadow: 3px 1px 8px #333;
 720+ -o-box-shadow: 3px 1px 8px #333;
 721+ box-shadow: 3px 1px 8px #333;
 722+ z-index: 2;
729723 margin: 0;
 724+ background-color: white;
730725 }
731726
732 -.full-screen-search #content,
 727+#results,
 728+#content_wrapper {
 729+ transition: all 0.3s ease-in-out;
 730+ -webkit-transition: all 0.3s ease-in-out;
 731+ -moz-transition: all 0.3s ease-in-out;
 732+ -o-transition: all 0.3s ease-in-out;
 733+}
 734+
 735+#content_wrapper,
 736+.full-screen-search #results {
 737+ opacity: 1;
 738+ height: auto;
 739+}
 740+
 741+#results,
 742+.full-screen-search #content_wrapper {
 743+ height: 0;
 744+ overflow: hidden;
 745+ opacity: 0;
 746+}
 747+
733748 .full-screen-search #footer,
734749 .full-screen-search #zero-rated-banner-red,
735750 .full-screen-search #zero-rated-banner {
736751 display: none;
737752 }
738753
 754+#search::-webkit-search-decoration {
 755+ display: none;
 756+}
 757+
739758 #header,
740759 #search,
741760 #sq,
@@ -764,34 +783,32 @@
765784 .full-screen-search #results {
766785 left: 0px;
767786 width: 100% !important;
768 - min-height: 100%;
769 - border-bottom: none;
770 - border-left: none;
771 - border-right: none;
772 - border-top: 1px solid #A6A6A6;
 787+ max-height: 99999px;
 788+ border: none;
 789+ z-index: 1;
773790 background-color: #E6E6E6;
774 - display: block;
 791+ position: relative;
 792+ opacity: 1;
775793 }
776794
777795 .full-screen-search .suggestions-results {
778 - line-height: 2.6em;
779796 padding: 0;
780797 position: relative;
781 - border-bottom: solid 1px #999;
 798+ padding-bottom: 20px;
782799 font-size: 1.4em;
783800 cursor: pointer;
784801 margin: 0;
 802+ background-color: white;
785803 }
786804
787805 .full-screen-search .suggestions-result {
788 - line-height: 2.6em;
 806+ color: #666;
789807 border: none;
790 - color: black;
791 - margin: 0;
792 - line-height: 2.6em;
793 - padding: 0.01em 0.25em;
794808 position: relative;
795809 border-bottom: solid 1px #999999;
 810+ border-bottom: solid 1px #eee;
 811+ padding: 12px 56px;
 812+ font-size: 0.9em;
796813 }
797814
798815 .full-screen-search .suggestions-result a:visited {
@@ -819,10 +836,6 @@
820837 overflow: hidden;
821838 }
822839
823 -.full-screen-search #results {
824 - display: block !important;
825 -}
826 -
827840 .full-screen-search #remove-results {
828841 display: block;
829842 }
Index: trunk/extensions/MobileFrontend/templates/SearchTemplate.php
@@ -29,7 +29,6 @@
3030 $languageSelectionDiv = '<div id="languageselection">' . $languageSelectionText . $languageSelection . '</div>';
3131
3232 $searchWebkitHtml = <<<HTML
33 - {$openSearchResults}
3433 <div id='header'>
3534 <div id='searchbox' {$logoDisplayNone}>
3635 <img width="35" height="22" alt='Logo' id='logo' src='{$this->data['wgMobileFrontendLogo']}' {$logoDisplayNone} />
@@ -48,6 +47,7 @@
4948 <a href="{$randomPageUrl}" id="randomButton" class="button">{$randomButton}</a>
5049 </div>
5150 </div>
 51+ {$openSearchResults}
5252 HTML;
5353 return $searchWebkitHtml;
5454 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r114202MFT r113807, r113831, r113832, r113865, r113866, r113870, r113871, r113872, r...awjrichards22:23, 19 March 2012

Status & tagging log