com web/php: Some minor improvements to how the search results look.: include/results.inc styles/theme.css
| From: | Levi Morrison | Date: | Thu, 24 May 2012 22:55:08 +0000 |
| Subject: | com web/php: Some minor improvements to how the search results look.: include/results.inc styles/theme.css | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-13592@lists.php.net to get a copy of this message | ||
Commit: d62e2f82fd2fa8a7a5768ab0e0981ac01321684b
Author: Levi Morrison <levim@php.net> Thu, 24 May 2012 16:55:08 -0600
Parents: d6da00ef2872ed8bd334a4c9809fdf4e81d3eb3f
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=d62e2f82fd2fa8a7a5768ab0e0981ac01321684b
Log:
Some minor improvements to how the search results look.
Changed paths:
M include/results.inc
M styles/theme.css
Diff:
diff --git a/include/results.inc b/include/results.inc
index 427274e..d545c79 100644
--- a/include/results.inc
+++ b/include/results.inc
@@ -81,7 +81,13 @@ EOB;
if($start > $res['ResultSet']['totalResultsAvailable']) {
break;
}
- printf('<li><a
href="/results.php?q=%s&start=%d&p=%s&l=%s">%d</a></li>',
urlencode($q), $start, $profile, urlencode($l), $z);
+
+ $class = '';
+ if ($start == $start_result) {
+ $class = 'current';
+ }
+
+ printf('<li class="%s"><a
href="/results.php?q=%s&start=%d&p=%s&l=%s">%d</a></li>',
$class, urlencode($q), $start, $profile, urlencode($l), $z);
$start += $per_page;
}
echo '</ul></div>';
diff --git a/styles/theme.css b/styles/theme.css
index 0f57ec5..c2cd830 100755
--- a/styles/theme.css
+++ b/styles/theme.css
@@ -539,6 +539,33 @@ aside.tips p {
display: block;
}
+#search-results {
+ margin:10px 40px;
+}
+
+#search-results li {
+ padding:1em 0;
+ list-style: none;
+}
+
+#search-results li .result {
+ font-size: 1.2em
+}
+
+#results_nav_list {
+ margin:0;
+ padding:1em 0;
+}
+#results_nav_list li {
+ list-style: none;
+ display:inline-block;
+}
+#results_nav_list li a {
+ padding:.5em .66em;
+}
+#results_nav_list li.current {
+ font-weight: bold;
+}
/* Footer styling */
footer {