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
d89c75de
Commit
d89c75de
authored
May 27, 2019
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SearchField: some styling added
parent
5b18d623
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
12 deletions
+14
-12
context-menu.css
dist/styles/context-menu.css
+5
-4
SearchField.purs
src/Gargantext/Components/Search/SearchField.purs
+4
-5
Specs.purs
src/Gargantext/Pages/Layout/Specs.purs
+5
-3
No files found.
dist/styles/context-menu.css
View file @
d89c75de
...
@@ -29,13 +29,14 @@
...
@@ -29,13 +29,14 @@
}
}
.search-bar-container
{
.search-bar-container
{
text-align
:
center
;
text-align
:
center
;
max-width
:
800px
;
float
:
left
;
}
}
.search-bar-toggle
{
.search-bar-toggle
{
padding
:
3
px
;
padding
:
2
px
;
border
:
0
;
border
:
0
;
}
}
.search-field
{
.search-field
{
display
:
grid
;
/* display: grid; */
grid-template-columns
:
auto
auto
auto
;
/* grid-template-columns: auto auto auto; */
}
}
src/Gargantext/Components/Search/SearchField.purs
View file @
d89c75de
...
@@ -49,7 +49,7 @@ searchFieldComponent = R.memo (R.hooksComponent "SearchField" cpt) hasChanged
...
@@ -49,7 +49,7 @@ searchFieldComponent = R.memo (R.hooksComponent "SearchField" cpt) hasChanged
term <- R.useState $ \_ -> pure search.term
term <- R.useState $ \_ -> pure search.term
db <- R.useState $ \_ -> pure Nothing
db <- R.useState $ \_ -> pure Nothing
pure $
pure $
div { className: "search-field form-
row
" }
div { className: "search-field form-
inline
" }
[ databaseInput db props.databases
[ databaseInput db props.databases
, searchInput term
, searchInput term
, submitButton db term props.search
, submitButton db term props.search
...
@@ -58,17 +58,16 @@ searchFieldComponent = R.memo (R.hooksComponent "SearchField" cpt) hasChanged
...
@@ -58,17 +58,16 @@ searchFieldComponent = R.memo (R.hooksComponent "SearchField" cpt) hasChanged
databaseInput :: R.State (Maybe Database) -> Array Database -> R.Element
databaseInput :: R.State (Maybe Database) -> Array Database -> R.Element
databaseInput (db /\ setDB) dbs =
databaseInput (db /\ setDB) dbs =
div { className: "
col-auto
" } [ select { className: "database form-control", onChange } (item <$> dbs) ]
div { className: "
form-group
" } [ select { className: "database form-control", onChange } (item <$> dbs) ]
where
where
onChange = mkEffectFn1 $ \e -> setDB (readDatabase (e .. "target" .. "value"))
onChange = mkEffectFn1 $ \e -> setDB (readDatabase (e .. "target" .. "value"))
item db = option { value: (show db) } [ text (show db) ]
item db = option { value: (show db) } [ text (show db) ]
searchInput :: R.State String -> R.Element
searchInput :: R.State String -> R.Element
searchInput (term /\ setTerm) =
searchInput (term /\ setTerm) =
div { className: "
col-auto
" } [ input { defaultValue: term
div { className: "
form-group
" } [ input { defaultValue: term
, className: "form-control"
, className: "form-control"
, type: "text"
, type: "text"
, style: { maxWidth: "110px" }
, onChange
, onChange
, placeholder } ]
, placeholder } ]
where onChange = mkEffectFn1 $ \e -> setTerm $ e .. "target" .. "value"
where onChange = mkEffectFn1 $ \e -> setTerm $ e .. "target" .. "value"
...
@@ -76,7 +75,7 @@ searchInput (term /\ setTerm) =
...
@@ -76,7 +75,7 @@ searchInput (term /\ setTerm) =
submitButton :: R.State (Maybe Database) -> R.State String -> R.State (Maybe Search) -> R.Element
submitButton :: R.State (Maybe Database) -> R.State String -> R.State (Maybe Search) -> R.Element
submitButton (database /\ _) (term /\ _) (_ /\ setSearch) =
submitButton (database /\ _) (term /\ _) (_ /\ setSearch) =
div { className: "
col-auto
" } [ button { className: "btn", onClick: click } [ text "Search" ] ]
div { className: "
form-group
" } [ button { className: "btn", onClick: click } [ text "Search" ] ]
where
where
click = mkEffectFn1 $ \_ -> do
click = mkEffectFn1 $ \_ -> do
case term of
case term of
...
...
src/Gargantext/Pages/Layout/Specs.purs
View file @
d89c75de
...
@@ -76,7 +76,8 @@ layout0 :: Spec AppState {} Action
...
@@ -76,7 +76,8 @@ layout0 :: Spec AppState {} Action
-> Spec AppState {} Action
-> Spec AppState {} Action
layout0 layout =
layout0 layout =
fold
fold
[ outerLayout
[ searchBar
, outerLayout
, layoutFooter
, layoutFooter
]
]
where
where
...
@@ -124,7 +125,8 @@ layout1 :: Spec AppState {} Action
...
@@ -124,7 +125,8 @@ layout1 :: Spec AppState {} Action
-> Spec AppState {} Action
-> Spec AppState {} Action
layout1 layout =
layout1 layout =
fold
fold
[ layout
[ searchBar
, layout
-- , outerLayout
-- , outerLayout
, layoutFooter
, layoutFooter
]
]
...
...
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