Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Grégoire Locqueville
purescript-gargantext
Commits
8859246c
Commit
8859246c
authored
Apr 16, 2018
by
Sudhir Kumar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
search moved to top nav bar
parent
1ecdd6fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
26 deletions
+22
-26
index.html
dist/index.html
+1
-1
Navigation.purs
src/Navigation.purs
+21
-25
No files found.
dist/index.html
View file @
8859246c
...
...
@@ -5,7 +5,7 @@
<title>
CNRS GarganText
</title>
<link
href=
"https://fonts.googleapis.com/icon?family=Material+Icons"
rel=
"stylesheet"
>
<link
href=
"https://use.fontawesome.com/releases/v5.0.8/css/all.css"
rel=
"stylesheet"
>
<
link
href=
"css/login.min.css"
rel=
"stylesheet"
>
<
!-- < link href="css/login.min.css" rel="stylesheet" > --
>
<link
href=
"css/bootstrap.min.css"
rel=
"stylesheet"
>
<!-- <link href="css/lavish-bootstrap.css" rel="stylesheet"> -->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/menu.css"
/>
...
...
src/Navigation.purs
View file @
8859246c
...
...
@@ -2,9 +2,12 @@ module Navigation where
import DOM
import Gargantext.Data.Lang
import Prelude hiding (div)
import AddCorpusview as AC
import AnnotationDocumentView as D
import Control.Monad.Cont.Trans (lift)
import Control.Monad.Eff.Class (liftEff)
import Control.Monad.Eff.Console (CONSOLE)
import CorpusAnalysis as CA
import Data.Array (concat)
...
...
@@ -19,11 +22,11 @@ import Login as LN
import NTree as NT
import Network.HTTP.Affjax (AJAX)
import PageRouter (Routes(..))
import Prelude hiding (div)
import React (ReactElement)
import React.DOM (a, button, div, footer, form, hr, i, img, input, li, p, span, text, ul)
import React.DOM.Props (Props, _data, _id, _type, aria, className, href, name, onChange, onClick, placeholder, role, src, style, tabIndex, target, title)
import React.DOM.Props as RP
import Routing.Hash.Aff (setHash)
import SearchForm as S
import Tabview as TV
import Thermite (PerformAction, Render, Spec, _render, cotransform, defaultRender, focus, modifyState, simpleSpec, withState)
...
...
@@ -91,6 +94,7 @@ performAction (Search s) _ _ = void do
performAction Go _ _ = void do
_ <- lift $ setHash "/addCorpus"
modifyState id
...
...
@@ -246,7 +250,7 @@ layout0 :: forall eff props. Spec (E eff) AppState props Action
-> Spec (E eff) AppState props Action
layout0 layout =
fold
[ layoutSidebar
[ layoutSidebar
divSearchBar
, outerLayout
, layoutFooter
]
...
...
@@ -254,9 +258,8 @@ layout0 layout =
outerLayout :: Spec (E eff) AppState props Action
outerLayout =
cont $ fold
[ ls a
, rs b
]
[ ls as
, rs bs ]
ls = over _render \render d p s c ->
[div [className "col-md-3"] (render d p s c)]
rs = over _render \render d p s c ->
...
...
@@ -264,10 +267,9 @@ layout0 layout =
cont = over _render \render d p s c ->
[ div [ className "row" ] (render d p s c) ]
a = fold [ focus _treeState _treeAction NT.treeview
, divSearchBar
]
b = innerLayout $ layout
as = focus _treeState _treeAction NT.treeview
bs = innerLayout $ layout
innerLayout :: Spec (E eff) AppState props Action
-> Spec (E eff) AppState props Action
...
...
@@ -278,12 +280,9 @@ layout0 layout =
]
]
layoutSidebar :: forall props eff. Spec (dom :: DOM |eff) AppState props Action
layoutSidebar = simpleSpec performAction render
where
render :: Render AppState props Action
render dispatch _ state _ =
layoutSidebar :: forall props eff. Spec (E eff) AppState props Action
-> Spec (E eff) AppState props Action
layoutSidebar = over _render \render d p s c ->
[ div [ _id "dafixedtop"
, className "navbar navbar-inverse navbar-fixed-top"
, role "navigation"
...
...
@@ -291,9 +290,9 @@ layoutSidebar = simpleSpec performAction render
[ div [ className "navbar-inner" ]
[ divLogo
, div [ className "collapse navbar-collapse"]
[ divDropdownLeft
, divDropdownRight
]
$ [ divDropdownLeft]
<> render d p s c <>
[ divDropdownRight
]
]
]
]
...
...
@@ -430,24 +429,21 @@ divSearchBar = simpleSpec performAction render
render :: Render AppState props Action
render dispatch _ state _ = [div [ className "" ] [ searchbar']]
where
searchbar' = ul [ className "nav navbar-nav"
, style { "margin
-left" : "0px
"}
searchbar' = ul [ className "nav navbar-nav
col-md-6 col-md-offset-3
"
, style { "margin
Left" : "15%
"}
] [ div [className "navbar-form"]
[ input [ className "search-query"
, placeholder "Query, URL or FILE (works with Firefox or Chromium browsers)"
, _type "text"
, style { height: "35px"
, width: "400px"
}
, onChange \e -> dispatch $ Search (unsafeCoerce e).target.value
] []
, div []
[ button [onClick \e -> dispatch Go, className "btn btn-primary", style {marginTop : "10px"}] [text "Enter"] ]
, button [onClick \e -> dispatch Go, className "btn btn-primary"] [text "Enter"]
]
]
--divDropdownRight :: Render AppState props Action
divDropdownRight :: ReactElement
divDropdownRight =
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment