lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Adds a site search to website and improves doc search (issue 4894053)


From: PhilEHolmes
Subject: Adds a site search to website and improves doc search (issue 4894053)
Date: Thu, 18 Aug 2011 16:59:08 +0000

Reviewers: Graham Percival,

Message:
Updates website search.  Please review.

Description:
See Issue 1405 - this allows users to search the site as
well as the docs, and improves the way that Google is
used to search for docs.  In the first instance this will
mean that the English site gets a different search from
translated sites. Once this is pushed, we will need to get
translations for the "Search site" and "Search docs"
phrases, and I will try to put the language phrase into
the search box automatically, rather than having a lot
of near identical search-box.ihtml files.

Please review this at http://codereview.appspot.com/4894053/

Affected files:
  M Documentation/css/lilypond-website.css
  M Documentation/search-box.ihtml


Index: Documentation/css/lilypond-website.css
diff --git a/Documentation/css/lilypond-website.css b/Documentation/css/lilypond-website.css index e5bf19280dd47d3533d0566051b95ebfe9b11206..4d0d73394ba71c112982a135806270280b4d7e64 100644
--- a/Documentation/css/lilypond-website.css
+++ b/Documentation/css/lilypond-website.css
@@ -108,13 +108,13 @@ div#tocframe {
 #tocframe > ul:first-child > li:first-child.toc_current a {
   text-indent: -999em;
   background: url(../pictures/lily-home-nav-active.png) no-repeat 50% 50%;
-  width: 9%;
+  width: 5%;
 }

 #tocframe > ul:first-child > li:first-child.toc_current a:hover {
   text-indent: -999em;
   background: url(../pictures/lily-home-nav-active.png) no-repeat 50% 50%;
-  width: 9%;
+  width: 5%;
 }

 #tocframe > ul:first-child > li:last-child {
@@ -132,7 +132,7 @@ div#tocframe {
 /* search box */
 #tocframe li form {
   float: left;
-  width: 17%;
+  width: 14%;
   background: #6aec7c url(../pictures/nav-bg.png);
   font-size: 100%;
   padding: 0.45em 0.8%;
@@ -165,7 +165,7 @@ div#tocframe {
 #tocframe li a {
   background: #6aec7c url(../pictures/nav-bg.png);
   float: left;
-  width: 18%;
+  width: 15%;
   text-align: center;
   font-weight: bold;
   padding: 0.68em 0;
Index: Documentation/search-box.ihtml
diff --git a/Documentation/search-box.ihtml b/Documentation/search-box.ihtml
index d789109484afc0dd0fb1d6a32302f5731205f468..51f5dcbef5ca4e95d1aced01594ffe39e2c8e2a5 100644
--- a/Documentation/search-box.ihtml
+++ b/Documentation/search-box.ihtml
@@ -1,13 +1,26 @@
 <form action="http://google.com/search";
       method="get"
-      name="search"
-      onSubmit="search.q.value='site:lilypond.org +v2.14 '
-               + search.brute_query.value"
-      onMouseMove="search.q.value='site:lilypond.org +v2.14 '
-                  + search.brute_query.value"
-      onKeyUp="search.q.value='site:lilypond.org +v2.14 '
-              + search.brute_query.value">
-  <input type="hidden" name="btnG" value="Google Search">
- <input type="text" name="brute_query" onfocus="this.value=''" value="Search">
+      name="searchDoc"
+      onSubmit="searchDoc.q.value='site:lilypond.org +v2.14 '
+               + search.doc_query.value"
+      onMouseMove="searchDoc.q.value='site:lilypond.org +v2.14 '
+                  + searchDoc.doc_query.value"
+      onKeyUp="searchDoc.q.value='site:lilypond.org +v2.14 '
+              + searchDoc.doc_query.value">
+ <input type="text" name="doc_query" onfocus="this.value=''" value="Search Docs">
   <input type="hidden" name="q" value="">
+  <input type="hidden" name="doc" value="doc">
+</form>
+<form action="http://google.com/search";
+      method="get"
+      name="searchSite"
+      onSubmit="searchSite.q.value='site:lilypond.org '
+               + searchSite.site_query.value"
+      onMouseMove="searchSite.q.value='site:lilypond.org '
+                  + searchSite.site_query.value"
+      onKeyUp="searchSite.q.value='site:lilypond.org '
+              + searchSite.site_query.value">
+ <input type="text" name="site_query" onfocus="this.value=''" value="Search Site">
+  <input type="hidden" name="q" value="">
+  <input type="hidden" name="site" value="site">
 </form>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]