Gentoo Archives: www-redesign

From: Thomas de Grenier de Latour <degrenier@×××××××××××.fr>
To: www-redesign@l.g.o
Subject: [www-redesign] Search bar proposal
Date: Tue, 29 Nov 2005 12:46:16
Message-Id: 20051129134838.703be09d@eusebe
Seen Curtis' blog today... nice to hear there will finally be a
search thing on the redesign.

So, i have some code to propose for that feature, that i had
already mentionned on getoo-dev@ last time it was discussed, but
that i have reworked a bit since. It is here in action:
With the code actually in a JS file:

The idea is to have a text search field (sure...) plus two levels
of select menus to target the search. The second level depends on
what was selected on the first:
 * Website (using Google):
   -> All
   -> Documentation
   -> Projects pages
   -> GWN: Weekly News
   -> GLEP: Enhanc. Prop.
   -> GLSA: Security Ann.
   -> Dev. Handbook
   -> The Doc
   -> Dev. pages
 * Forums (using phpBB):
   -> All
   -> ...each individual forum...
 * Mailing Lists (using GMane):
   -> All
   -> ...each ML which has GMane archives...
 * Bugs (using the bugs.g.o):
   -> All bugs
   -> Open bugs
   -> Closed bugs
 * Packages (using packages.g.o):
   -> All  (there is not much to refine here)
 * Wiki (using
   -> English wiki

It now has support for I18N, which allows adding/removing/renaming
some options of the 2nd select menu depending on the browser
language. For now, i've used that for french only, in order to:
 - rename some entries, like "All" becoming "Tous"
 - for "Website", add a search for all french pages of www.g.o, one
for french documentation, one for french GWN, and one for french
dev handbook.
 - for "Forums", bump the French forum higher in the list
 - for "Wiki", add search on

The code is now all in the JS file, and only requires an onload
event in the HTML page. I had made this change because i was
thinking to make it a GreaseMonkey script at the end if there was
finally no search form on wwwredesign, but anyway it also has the
benefit to show the form only in JS-enabled browsers, which is good
since it is required (sure we could think of having a simpler form
for non-JS browsers).

I think it is now a bit cleaner that it used to be, and would only
require little modification to be usable on wwwredesign. If you
think it worths it, feel free to do whatever is needed for
copyright or license (i've put that code in public domain). And
sure i'm available for questions/requests.

Hope that helps,

www-redesign@g.o mailing list