Commit d0abf901 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIXME] search bar in the navbar.

parent 5d69cae0
...@@ -14,7 +14,7 @@ import Network.HTTP.Affjax (AJAX) ...@@ -14,7 +14,7 @@ import Network.HTTP.Affjax (AJAX)
import PageRouter (Routes(..)) import PageRouter (Routes(..))
import Prelude (class Applicative, class Bind, Unit, bind, id, map, negate, pure, unit, void, ($), (<>)) import Prelude (class Applicative, class Bind, Unit, bind, id, map, negate, pure, unit, void, ($), (<>))
import React (ReactElement) import React (ReactElement)
import React.DOM (a, div, img, li, span, text, ul, input) import React.DOM (a, div, img, li, span, text, ul, input, button)
import React.DOM.Props (_data, _id, aria, className, href, name, placeholder, _type, role, src, style, tabIndex, target, title) import React.DOM.Props (_data, _id, aria, className, href, name, placeholder, _type, role, src, style, tabIndex, target, title)
import Thermite (PerformAction, Render, Spec, _render, defaultRender, focus, modifyState, simpleSpec, withState) import Thermite (PerformAction, Render, Spec, _render, defaultRender, focus, modifyState, simpleSpec, withState)
import DocView as DV import DocView as DV
...@@ -227,7 +227,7 @@ sidebarnavSpec = simpleSpec performAction render ...@@ -227,7 +227,7 @@ sidebarnavSpec = simpleSpec performAction render
-- here is divDropDowLeft-------------------------------------------------- -- here is divDropDowLeft--------------------------------------------------
-- FIXME : divDropDownLeft and divDropDownRight seems to be intricated in dropdown? -- FIXME : divDropDownLeft and divDropDownRight seems to be intricated in dropdown?
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
, div [className "navbar-collapse collapse"] , div [ className "navbar-collapse collapse"]
[ ul [className "nav navbar-nav"] [ ul [className "nav navbar-nav"]
[ ul [className "nav navbar-nav pull-left"] [ ul [className "nav navbar-nav pull-left"]
[ li [className "dropdown"] [ li [className "dropdown"]
...@@ -281,12 +281,14 @@ sidebarnavSpec = simpleSpec performAction render ...@@ -281,12 +281,14 @@ sidebarnavSpec = simpleSpec performAction render
] ]
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
-- TODO put the search form in the center of the navBar -- TODO put the search form in the center of the navBar
-- , ul [ className "nav navbar-nav"] , ul [ className "nav navbar-nav"]
-- [ input [ className "form-control" [ input [ className "form-control"
-- , placeholder "Query, URL or FILE (optimized experience with Firefox or Chromium browsers)" , placeholder "Query, URL or FILE (works with Firefox or Chromium browsers)"
-- , _type "text" , _type "text"
-- ] [] ] []
-- ] -- TODO add button in navbar (and "enter" execution)
-- , div [] [button [][]]
]
, divDropdownRight , divDropdownRight
] ]
] ]
......
...@@ -67,7 +67,7 @@ searchSpec = simpleSpec performAction render ...@@ -67,7 +67,7 @@ searchSpec = simpleSpec performAction render
[ input [ className "form-control" [ input [ className "form-control"
, _id "id_password" , _id "id_password"
, name "query" , name "query"
, placeholder "Query, URL or FILE (optimized experience with Firefox or Chromium browsers)" , placeholder "Query, URL or FILE (works best with Firefox or Chromium browsers)"
, _type "text" , _type "text"
, value state.query , value state.query
, onInput \e -> dispatch (SetQuery (unsafeEventValue e)) , onInput \e -> dispatch (SetQuery (unsafeEventValue e))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment