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
7466845d
Commit
7466845d
authored
Mar 25, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Landing] mv name home to landing.
parent
f1e65b24
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
27 deletions
+21
-27
Landing.purs
src/Landing.purs
+20
-25
Navigation.purs
src/Navigation.purs
+1
-2
No files found.
src/Landing.purs
View file @
7466845d
...
@@ -63,23 +63,22 @@ performAction SignUp _ _ = void do
...
@@ -63,23 +63,22 @@ performAction SignUp _ _ = void do
-- Layout |
-- Layout |
layoutHome :: forall props eff . Lang -> Spec ( console :: CONSOLE
layoutLanding :: forall props eff . Lang -> Spec ( console :: CONSOLE
, ajax :: AJAX
, ajax :: AJAX
, dom :: DOM
, dom :: DOM
| eff
| eff
) State props Action
) State props Action
layoutHome FR = layoutHome' Fr.homeData
layoutLanding FR = layoutLanding' Fr.landingData
layoutHome EN = layoutHome' En.homeData
layoutLanding EN = layoutLanding' En.landingData
------------------------------------------------------------------------
------------------------------------------------------------------------
layout
Home' :: forall props eff . Home
Data -> Spec ( console :: CONSOLE
layout
Landing' :: forall props eff . Landing
Data -> Spec ( console :: CONSOLE
, ajax :: AJAX
, ajax :: AJAX
, dom :: DOM
, dom :: DOM
| eff
| eff
) State props Action
) State props Action
layout
Home
' hd = simpleSpec performAction render
layout
Landing
' hd = simpleSpec performAction render
where
where
render :: Render State props Action
render :: Render State props Action
render dispatch _ state _ =
render dispatch _ state _ =
...
@@ -89,8 +88,8 @@ layoutHome' hd = simpleSpec performAction render
...
@@ -89,8 +88,8 @@ layoutHome' hd = simpleSpec performAction render
]
]
------------------------------------------------------------------------
------------------------------------------------------------------------
blocksRandomText' ::
Home
Data -> ReactElement
blocksRandomText' ::
Landing
Data -> ReactElement
blocksRandomText' (
Home
Data hd) = blocksRandomText hd.blockTexts
blocksRandomText' (
Landing
Data hd) = blocksRandomText hd.blockTexts
blocksRandomText :: BlockTexts -> ReactElement
blocksRandomText :: BlockTexts -> ReactElement
...
@@ -102,13 +101,12 @@ blocksRandomText (BlockTexts bt) =
...
@@ -102,13 +101,12 @@ blocksRandomText (BlockTexts bt) =
div [ className "col-md-4 content" ]
div [ className "col-md-4 content" ]
[ h3 [] [ a [ href b.href, title b.title]
[ h3 [] [ a [ href b.href, title b.title]
[ i [className b.icon] []
[ i [className b.icon] []
, text
b.titleText
, text
(" " <> b.titleText)
]
]
]
]
, p [] [ text b.text ]
, p [] [ text b.text ]
]
]
docButton :: Button -> ReactElement
docButton :: Button -> ReactElement
docButton (Button b) = a [ className "btn btn-success btn-lg spacing-class"
docButton (Button b) = a [ className "btn btn-success btn-lg spacing-class"
, href b.href
, href b.href
...
@@ -120,8 +118,8 @@ docButton (Button b) = a [ className "btn btn-success btn-lg spacing-class"
...
@@ -120,8 +118,8 @@ docButton (Button b) = a [ className "btn btn-success btn-lg spacing-class"
, text b.text
, text b.text
]
]
jumboTitle ::
Home
Data -> Boolean -> ReactElement
jumboTitle ::
Landing
Data -> Boolean -> ReactElement
jumboTitle (
Home
Data hd) b = div jumbo
jumboTitle (
Landing
Data hd) b = div jumbo
[ div [className "row" ]
[ div [className "row" ]
[ div [className "col-md-4 content"]
[ div [className "col-md-4 content"]
[ h1 [] [ text hd.name]
[ h1 [] [ text hd.name]
...
@@ -146,9 +144,8 @@ jumboTitle (HomeData hd) b = div jumbo
...
@@ -146,9 +144,8 @@ jumboTitle (HomeData hd) b = div jumbo
true -> [className "jumbotron"]
true -> [className "jumbotron"]
false -> []
false -> []
imageEnter :: LandingData -> Props -> ReactElement
imageEnter :: HomeData -> Props -> ReactElement
imageEnter (LandingData hd) action = div [className "row"]
imageEnter (HomeData hd) action = div [className "row"]
[ div [className "col-md-offset-5 col-md-6 content"]
[ div [className "col-md-offset-5 col-md-6 content"]
[ img [ src "images/Gargantextuel-212x300.jpg"
[ img [ src "images/Gargantextuel-212x300.jpg"
, _id "funnyimg"
, _id "funnyimg"
...
@@ -158,5 +155,3 @@ imageEnter (HomeData hd) action = div [className "row"]
...
@@ -158,5 +155,3 @@ imageEnter (HomeData hd) action = div [className "row"]
[]
[]
]
]
]
]
src/Navigation.purs
View file @
7466845d
...
@@ -167,7 +167,7 @@ pagesComponent s =
...
@@ -167,7 +167,7 @@ pagesComponent s =
| eff
| eff
) AppState props Action
) AppState props Action
selectSpec Login = focus _loginState _loginAction LN.renderSpec
selectSpec Login = focus _loginState _loginAction LN.renderSpec
selectSpec Home
= layout0 $ focus _landingState _landingAction (L.layoutHome
EN)
selectSpec Home
= layout0 $ focus _landingState _landingAction (L.layoutLanding
EN)
selectSpec AddCorpus = layout0 $ focus _addCorpusState _addCorpusAction AC.layoutAddcorpus
selectSpec AddCorpus = layout0 $ focus _addCorpusState _addCorpusAction AC.layoutAddcorpus
selectSpec DocView = layout0 $ focus _docViewState _docViewAction DV.layoutDocview
selectSpec DocView = layout0 $ focus _docViewState _docViewAction DV.layoutDocview
selectSpec UserPage = layout0 $ focus _userPageState _userPageAction UP.layoutUser
selectSpec UserPage = layout0 $ focus _userPageState _userPageAction UP.layoutUser
...
@@ -276,7 +276,6 @@ menuButton (LiNav { title : title'
...
@@ -276,7 +276,6 @@ menuButton (LiNav { title : title'
]
]
-- | WYSIWYG example in Pure React ?
menuElements' :: ReactElement
menuElements' :: ReactElement
menuElements' = menuElements-- title, icon, text
menuElements' = menuElements-- title, icon, 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