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
a56c8af7
Commit
a56c8af7
authored
Mar 15, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TEMPLATE] adding footer to wrap function.
parent
acee709f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
35 deletions
+48
-35
Landing.purs
src/Landing.purs
+0
-21
Navigation.purs
src/Navigation.purs
+48
-14
No files found.
src/Landing.purs
View file @
a56c8af7
...
@@ -105,7 +105,6 @@ home = simpleSpec performAction render
...
@@ -105,7 +105,6 @@ home = simpleSpec performAction render
[ div [ className "container" ] [ jumboTitle true ]
[ div [ className "container" ] [ jumboTitle true ]
, div [ className "container" ] [ imageEnter (onClick \_ -> dispatch $ Enter)]
, div [ className "container" ] [ imageEnter (onClick \_ -> dispatch $ Enter)]
, div [ className "container" ] [ blocksRandomText ]
, div [ className "container" ] [ blocksRandomText ]
, div [ className "container" ] [ hr [] [], footerLegalInfo ]
]
]
blocksRandomText :: ReactElement
blocksRandomText :: ReactElement
...
@@ -152,24 +151,4 @@ blocksRandomText = div [ className "row" ]
...
@@ -152,24 +151,4 @@ blocksRandomText = div [ className "row" ]
]
]
footerLegalInfo :: ReactElement
footerLegalInfo = footer [] [ p [] [ text "Gargantext "
, span [className "glyphicon glyphicon-registration-mark" ] []
, text ", version 4.0"
, a [ href "http://www.cnrs.fr"
, target "blank"
, title "Project hosted by CNRS."
]
[ text ", Copyrights "
, span [ className "glyphicon glyphicon-copyright-mark" ] []
, text " CNRS 2017-Present"
]
, a [ href "http://gitlab.iscpif.fr/humanities/gargantext/blob/stable/LICENSE"
, target "blank"
, title "Legal instructions of the project."
]
[ text ", Licences aGPLV3 and CECILL variant Affero compliant" ]
, text "."
]
]
src/Navigation.purs
View file @
a56c8af7
...
@@ -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, button)
import React.DOM (a, div, img, li, span, text, ul, input, button
, footer, p, hr
)
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
...
@@ -35,7 +35,7 @@ type AppState =
...
@@ -35,7 +35,7 @@ type AppState =
initAppState :: AppState
initAppState :: AppState
initAppState =
initAppState =
{ currentRoute
: Just Home
{ currentRoute
: Just Home
, landingState : L.initialState
, landingState : L.initialState
, loginState : LN.initialState
, loginState : LN.initialState
, addCorpusState : AC.initialState
, addCorpusState : AC.initialState
...
@@ -44,7 +44,6 @@ initAppState =
...
@@ -44,7 +44,6 @@ initAppState =
, userPage : UP.initialState
, userPage : UP.initialState
}
}
data Action
data Action
= Initialize
= Initialize
| LandingA L.Action
| LandingA L.Action
...
@@ -100,7 +99,7 @@ _addCorpusAction = prism AddCorpusA \action ->
...
@@ -100,7 +99,7 @@ _addCorpusAction = prism AddCorpusA \action ->
_-> Left action
_-> Left action
_docViewState:: Lens' AppState DV.State
_docViewState
:: Lens' AppState DV.State
_docViewState = lens (\s -> s.docViewState) (\s ss -> s{docViewState = ss})
_docViewState = lens (\s -> s.docViewState) (\s ss -> s{docViewState = ss})
...
@@ -142,7 +141,11 @@ pagesComponent s =
...
@@ -142,7 +141,11 @@ pagesComponent s =
Nothing ->
Nothing ->
selectSpec Home
selectSpec Home
where
where
selectSpec :: Routes -> Spec (ajax :: AJAX, console :: CONSOLE, dom :: DOM | eff) AppState props Action
selectSpec :: Routes -> Spec ( ajax :: AJAX
, console :: CONSOLE
, dom :: DOM
| eff
) AppState props Action
selectSpec Login = focus _loginState _loginAction LN.renderSpec
selectSpec Login = focus _loginState _loginAction LN.renderSpec
selectSpec Home = wrap $ focus _landingState _landingAction L.home
selectSpec Home = wrap $ focus _landingState _landingAction L.home
selectSpec AddCorpus = wrap $ focus _addCorpusState _addCorpusAction AC.addcorpusviewSpec
selectSpec AddCorpus = wrap $ focus _addCorpusState _addCorpusAction AC.addcorpusviewSpec
...
@@ -157,14 +160,16 @@ wrap :: forall eff props. Spec (E eff) AppState props Action -> Spec (E eff) App
...
@@ -157,14 +160,16 @@ wrap :: forall eff props. Spec (E eff) AppState props Action -> Spec (E eff) App
wrap spec =
wrap spec =
fold
fold
[ sidebarnavSpec
[ sidebarnavSpec
--, tree
, innerContainer $ spec
, innerContainer $ spec
, footerLegalInfo
]
]
where
where
innerContainer :: Spec (E eff) AppState props Action -> Spec (E eff) AppState props Action
innerContainer :: Spec (E eff) AppState props Action -> Spec (E eff) AppState props Action
innerContainer = over _render \render d p s c ->
innerContainer = over _render \render d p s c ->
[ div [_id "page-wrapper"]
[ div [_id "page-wrapper"]
[
[
div[className "container-fluid"] (render d p s c)
div
[className "container-fluid"] (render d p s c)
]
]
]
]
...
@@ -255,15 +260,15 @@ sidebarnavSpec = simpleSpec performAction render
...
@@ -255,15 +260,15 @@ sidebarnavSpec = simpleSpec performAction render
)
)
<> [li [className "divider"] []] <>
<> [li [className "divider"] []] <>
(map liNav [ LiNav { title : "Interactive chat"
(map liNav [ LiNav { title : "Interactive chat"
, href : "https://chat.iscpif.fr/channel/gargantext"
, href : "https://chat.iscpif.fr/channel/gargantext"
, icon : "fab fa-rocketchat"
, icon : "fab fa-rocketchat"
, text : "Chat"
, text : "Chat"
}
}
, LiNav { title : "Asynchronous discussions"
, LiNav { title : "Asynchronous discussions"
, href : "https://discourse.iscpif.fr/c/gargantext"
, href : "https://discourse.iscpif.fr/c/gargantext"
, icon : "fab fa-discourse"
, icon : "fab fa-discourse"
, text : "Forum"
, text : "Forum"
}
}
]
]
)
)
<> [li [className "divider"] []] <>
<> [li [className "divider"] []] <>
...
@@ -366,3 +371,32 @@ dispatchAction dispatcher _ UserPage = do
...
@@ -366,3 +371,32 @@ dispatchAction dispatcher _ UserPage = do
_ <- dispatcher $ SetRoute $ UserPage
_ <- dispatcher $ SetRoute $ UserPage
_ <- dispatcher $ UserPageA $ UP.NoOp
_ <- dispatcher $ UserPageA $ UP.NoOp
pure unit
pure unit
footerLegalInfo :: forall props eff. Spec (dom :: DOM |eff) AppState props Action
footerLegalInfo = simpleSpec performAction render
where
render :: Render AppState props Action
render dispatch _ state _ = [div [ className "container" ] [ hr [] [], footerLegalInfo']]
where
footerLegalInfo' = footer [] [ p [] [ text "Gargantext "
, span [className "glyphicon glyphicon-registration-mark" ] []
, text ", version 4.0"
, a [ href "http://www.cnrs.fr"
, target "blank"
, title "Project hosted by CNRS."
]
[ text ", Copyrights "
, span [ className "glyphicon glyphicon-copyright-mark" ] []
, text " CNRS 2017-Present"
]
, a [ href "http://gitlab.iscpif.fr/humanities/gargantext/blob/stable/LICENSE"
, target "blank"
, title "Legal instructions of the project."
]
[ text ", Licences aGPLV3 and CECILL variant Affero compliant" ]
, text "."
]
]
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