Commit 6180e41c authored by Abinaya Sudhir's avatar Abinaya Sudhir

Search bar included in sidebar

parent e79d4155
...@@ -24,7 +24,6 @@ import SearchForm as S ...@@ -24,7 +24,6 @@ import SearchForm as S
import Thermite (PerformAction, Render, Spec, _render, defaultRender, focus, modifyState, simpleSpec, withState) import Thermite (PerformAction, Render, Spec, _render, defaultRender, focus, modifyState, simpleSpec, withState)
import UserPage as UP import UserPage as UP
import AnnotationDocumentView as D import AnnotationDocumentView as D
import Gargantext.Data.Lang import Gargantext.Data.Lang
type E e = (dom :: DOM, ajax :: AJAX, console :: CONSOLE | e) type E e = (dom :: DOM, ajax :: AJAX, console :: CONSOLE | e)
...@@ -188,7 +187,9 @@ layout0 layout = ...@@ -188,7 +187,9 @@ layout0 layout =
[ layoutSidebar [ layoutSidebar
-- TODO Add layoutTree -- TODO Add layoutTree
--, exampleTree' --, exampleTree'
, divSearchBar
, innerLayout $ layout , innerLayout $ layout
, layoutFooter , layoutFooter
] ]
where where
...@@ -221,7 +222,7 @@ layoutSidebar = simpleSpec performAction render ...@@ -221,7 +222,7 @@ layoutSidebar = simpleSpec performAction render
[ divLogo [ divLogo
, div [ className "collapse navbar-collapse"] , div [ className "collapse navbar-collapse"]
[ divDropdownLeft [ divDropdownLeft
, divSearchBar -- , divSearchBar
, divDropdownRight , divDropdownRight
] ]
] ]
...@@ -354,9 +355,14 @@ liNav (LiNav { title : title' ...@@ -354,9 +355,14 @@ liNav (LiNav { title : title'
-- TODO put the search form in the center of the navBar -- TODO put the search form in the center of the navBar
divSearchBar :: ReactElement divSearchBar :: forall props eff. Spec (dom :: DOM |eff) AppState props Action
divSearchBar = ul [ className "nav navbar-nav" divSearchBar = simpleSpec performAction render
, style { "margin-left" : "146px"} where
render :: Render AppState props Action
render dispatch _ state _ = [div [ className "" ] [ searchbar']]
where
searchbar' = ul [ className "nav navbar-nav"
, style { "margin-left" : "79px"}
] [ div [className "navbar-form"] ] [ div [className "navbar-form"]
[ input [ className "search-query" [ input [ className "search-query"
, placeholder "Query, URL or FILE (works with Firefox or Chromium browsers)" , placeholder "Query, URL or FILE (works with Firefox or Chromium browsers)"
...@@ -372,6 +378,9 @@ divSearchBar = ul [ className "nav navbar-nav" ...@@ -372,6 +378,9 @@ divSearchBar = ul [ className "nav navbar-nav"
] ]
] ]
--divDropdownRight :: Render AppState props Action --divDropdownRight :: Render AppState props Action
divDropdownRight :: ReactElement divDropdownRight :: ReactElement
divDropdownRight = divDropdownRight =
......
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