[Experiment with putting the search in the main navigation bar Duncan Coutts **20130705195901 Ignore-this: 47f192287a2b3f6b3e5dbde79ce9dca5 ] { hunk ./Distribution/Server/Pages/Template.hs 8 -import Text.XHtml.Strict hiding ( p, name ) +import Text.XHtml.Strict hunk ./Distribution/Server/Pages/Template.hs 32 - -- if NameSearch is enabled - , thelink ! [ rel "search", href "/opensearch.xml" + -- if Search is enabled + , thelink ! [ rel "search", href "/packages/opensearch.xml" hunk ./Distribution/Server/Pages/Template.hs 39 - docHeader = [ menubar + docHeader = [ navigationBar hunk ./Distribution/Server/Pages/Template.hs 41 - menubar = ulist ! [theclass "links", identifier "page-menu"] - << [ li << (anchor ! [href url] << lab) - | (lab, url) <- navigationBar] hunk ./Distribution/Server/Pages/Template.hs 42 -navigationBar :: [(String, URL)] +navigationBar :: Html hunk ./Distribution/Server/Pages/Template.hs 44 - [ ("Introduction", introductionURL) - , ("Packages", pkgListURL) - -- , ("Search", searchURL) - , ("What's new", recentAdditionsURL) - , ("Upload", uploadURL) - , ("User accounts", accountsURL) - , ("Admin", adminURL) - ] + ulist ! [theclass "links", identifier "page-menu"] + << map (li <<) + [ anchor ! [href introductionURL] << "Home" + , form ! [action "/packages/search", theclass "search", method "get"] + << [ button ! [thetype "submit"] << "Search" + , input ! [thetype "text", name "terms" ] ] + , anchor ! [href pkgListURL] << "Browse" + , anchor ! [href recentAdditionsURL] << "What's new" + , anchor ! [href uploadURL] << "Upload" + , anchor ! [href accountsURL] << "User accounts" + , anchor ! [href adminURL] << "Admin" + ] hunk ./datafiles/static/hackage.css 130 -ul.links li a { +ul.links li a, ul.links li form { hunk ./datafiles/static/hackage.css 282 +/* @search box */ + +ul.links li form { + display: inline; +} +ul.links li form input { + border:0px; + padding:1px; + width: 8em; + background: rgb(235,235,235); /* url('/static/search.png') no-repeat 3px 4px; */ +} + +ul.links li form button { + border:0px; + cursor:pointer; + color: white; + background: rgb(41,56,69); +} +ul.links li form button:hover { + background: rgb(78,98,114); +} + +/* @end */ + hunk ./datafiles/templates/hackagePageHeader.st 3 -
  • Introduction
  • -
  • Packages
  • -
  • What's new
  • -
  • Upload
  • -
  • User accounts
  • -
  • Admin
  • +
  • Home
  • Browse
  • What's new
  • Upload
  • User accounts
  • Admin
  • }