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
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
gargantext
purescript-gargantext
Commits
b9c0de51
Commit
b9c0de51
authored
Mar 13, 2018
by
Sudhir Kumar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Header part done in userpage
parent
3ed3feaf
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
109 additions
and
1 deletion
+109
-1
Login.css
dist/css/Login.css
+12
-0
corporate.jpg
dist/images/corporate.jpg
+0
-0
Navigation.purs
src/Navigation.purs
+22
-0
PageRouter.purs
src/PageRouter.purs
+7
-1
UserPage.purs
src/UserPage.purs
+68
-0
No files found.
dist/css/Login.css
View file @
b9c0de51
...
@@ -19,3 +19,15 @@
...
@@ -19,3 +19,15 @@
#funnyimg
{
#funnyimg
{
border
:
2px
solid
black
;
border
:
2px
solid
black
;
}
}
#page-wrapper
{
margin-top
:
56px
;
}
#user-page-header
{
border-bottom
:
1px
solid
black
;
}
#user-page-info
{
margin-top
:
38px
;
}
\ No newline at end of file
dist/images/corporate.jpg
0 → 100644
View file @
b9c0de51
20.1 KB
src/Navigation.purs
View file @
b9c0de51
...
@@ -21,6 +21,7 @@ import React.DOM.Props (_data, _id, aria, className, href, role, src, style, tab
...
@@ -21,6 +21,7 @@ import React.DOM.Props (_data, _id, aria, className, href, role, src, style, tab
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
import SearchForm as S
import SearchForm as S
import UserPage as UP
type E e = (dom :: DOM, ajax :: AJAX, console :: CONSOLE | e)
type E e = (dom :: DOM, ajax :: AJAX, console :: CONSOLE | e)
...
@@ -31,6 +32,7 @@ type AppState =
...
@@ -31,6 +32,7 @@ type AppState =
, addCorpusState :: AC.State
, addCorpusState :: AC.State
, docViewState :: DV.State
, docViewState :: DV.State
, searchState :: S.State
, searchState :: S.State
, userPage :: UP.State
}
}
initAppState :: AppState
initAppState :: AppState
...
@@ -41,6 +43,7 @@ initAppState =
...
@@ -41,6 +43,7 @@ initAppState =
, addCorpusState : AC.initialState
, addCorpusState : AC.initialState
, docViewState : DV.tdata
, docViewState : DV.tdata
, searchState : S.initialState
, searchState : S.initialState
, userPage : UP.initialState
}
}
...
@@ -52,6 +55,7 @@ data Action
...
@@ -52,6 +55,7 @@ data Action
| AddCorpusA AC.Action
| AddCorpusA AC.Action
| DocViewA DV.Action
| DocViewA DV.Action
| SearchA S.Action
| SearchA S.Action
| UserPageA UP.Action
performAction :: forall eff props. PerformAction (dom :: DOM |eff) AppState props Action
performAction :: forall eff props. PerformAction (dom :: DOM |eff) AppState props Action
...
@@ -122,6 +126,17 @@ _searchAction = prism SearchA \action ->
...
@@ -122,6 +126,17 @@ _searchAction = prism SearchA \action ->
_-> Left action
_-> Left action
_userPageState:: Lens' AppState UP.State
_userPageState = lens (\s -> s.userPage) (\s ss -> s{userPage = ss})
_userPageAction :: Prism' Action UP.Action
_userPageAction = prism UserPageA \action ->
case action of
UserPageA caction -> Right caction
_-> Left action
pagesComponent :: forall props eff. AppState -> Spec (E eff) AppState props Action
pagesComponent :: forall props eff. AppState -> Spec (E eff) AppState props Action
pagesComponent s =
pagesComponent s =
...
@@ -137,6 +152,7 @@ pagesComponent s =
...
@@ -137,6 +152,7 @@ pagesComponent s =
selectSpec AddCorpus = wrap $ focus _addCorpusState _addCorpusAction AC.addcorpusviewSpec
selectSpec AddCorpus = wrap $ focus _addCorpusState _addCorpusAction AC.addcorpusviewSpec
selectSpec DocView = wrap $ focus _docViewState _docViewAction DV.spec
selectSpec DocView = wrap $ focus _docViewState _docViewAction DV.spec
selectSpec SearchView = wrap $ focus _searchState _searchAction S.searchSpec
selectSpec SearchView = wrap $ focus _searchState _searchAction S.searchSpec
selectSpec UserPage = wrap $ focus _userPageState _userPageAction UP.userPageSpec
routingSpec :: forall props eff. Spec (dom :: DOM |eff) AppState props Action
routingSpec :: forall props eff. Spec (dom :: DOM |eff) AppState props Action
routingSpec = simpleSpec performAction defaultRender
routingSpec = simpleSpec performAction defaultRender
...
@@ -284,3 +300,9 @@ dispatchAction dispatcher _ SearchView = do
...
@@ -284,3 +300,9 @@ dispatchAction dispatcher _ SearchView = do
_ <- dispatcher $ SetRoute $ SearchView
_ <- dispatcher $ SetRoute $ SearchView
_ <- dispatcher $ SearchA $ S.NoOp
_ <- dispatcher $ SearchA $ S.NoOp
pure unit
pure unit
dispatchAction dispatcher _ UserPage = do
_ <- dispatcher $ SetRoute $ UserPage
_ <- dispatcher $ UserPageA $ UP.NoOp
pure unit
src/PageRouter.purs
View file @
b9c0de51
...
@@ -21,6 +21,8 @@ data Routes
...
@@ -21,6 +21,8 @@ data Routes
| AddCorpus
| AddCorpus
| DocView
| DocView
| SearchView
| SearchView
| UserPage
instance showRoutes :: Show Routes where
instance showRoutes :: Show Routes where
show Home = "Home"
show Home = "Home"
...
@@ -28,18 +30,22 @@ instance showRoutes :: Show Routes where
...
@@ -28,18 +30,22 @@ instance showRoutes :: Show Routes where
show AddCorpus = "AddCorpus"
show AddCorpus = "AddCorpus"
show DocView = "DocView"
show DocView = "DocView"
show SearchView = "SearchView"
show SearchView = "SearchView"
show UserPage = "UserPage"
int :: Match Int
int :: Match Int
int = floor <$> num
int = floor <$> num
routing :: Match Routes
routing :: Match Routes
routing =
routing =
loginRoute
loginRoute
<|> searchRoute
<|> userPageRoute
<|> searchRoute
<|> docviewRoute
<|> docviewRoute
<|> addcorpusRoute
<|> addcorpusRoute
<|> home
<|> home
where
where
userPageRoute = UserPage <$ route "userPage"
searchRoute = SearchView <$ route "search"
searchRoute = SearchView <$ route "search"
docviewRoute = DocView <$ route "docView"
docviewRoute = DocView <$ route "docView"
addcorpusRoute = AddCorpus <$ route "addCorpus"
addcorpusRoute = AddCorpus <$ route "addCorpus"
...
...
src/UserPage.purs
View file @
b9c0de51
module UserPage where
module UserPage where
import Prelude hiding (div)
import Prelude hiding (div)
import Control.Monad.Eff.Console (CONSOLE)
import DOM (DOM)
import Network.HTTP.Affjax (AJAX)
import React.DOM (a, div, h3, h5, img, span, text)
import React.DOM.Props (_id, className, src)
import Thermite (PerformAction, Render, Spec, modifyState, simpleSpec)
type State = String
initialState :: State
initialState =""
data Action
= NoOp
performAction :: forall eff props. PerformAction (console :: CONSOLE, ajax :: AJAX,dom::DOM | eff) State props Action
performAction NoOp _ _ = void do
modifyState id
userPageSpec :: forall props eff . Spec (console::CONSOLE, ajax::AJAX, dom::DOM | eff) State props Action
userPageSpec = simpleSpec performAction render
where
render :: Render State props Action
render dispatch _ state _ =
[ div [className "container-fluid"]
[ div [className "row", _id "user-page-header"]
[ div [className "col-md-2"]
[ h3 [] [text "UserName"]
]
, div [className "col-md-8"] []
, div [className "col-md-2"]
[ span [] [text "X"]
]
]
, div [className "row", _id "user-page-info"]
[
div [className "col-md-12"]
[ div [className "row"]
[ div [className "col-md-2"]
[ img [src "/images/corporate.jpg"] []
]
, div [className "col-md-8"]
[
div [className "list-group"]
[
a [className "list-group-item list-group-item-action flex-column align-items-start"]
[ div [className "d-flex w-100 justify-content-between"]
[ h5 [className "mb-1"] [ text "fonction"]
, h5 [] [text "Enseignent checheur"]
]
]
]
]
]
]
]
, div [className "row",_id "user-page-footer"]
[
]
]
]
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