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
Show 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
-- Layout |
layout
Home
:: forall props eff . Lang -> Spec ( console :: CONSOLE
layout
Landing
:: forall props eff . Lang -> Spec ( console :: CONSOLE
, ajax :: AJAX
, dom :: DOM
| eff
) State props Action
layoutHome FR = layoutHome' Fr.homeData
layoutHome EN = layoutHome' En.homeData
layoutLanding FR = layoutLanding' Fr.landingData
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
, dom :: DOM
| eff
) State props Action
layout
Home
' hd = simpleSpec performAction render
layout
Landing
' hd = simpleSpec performAction render
where
render :: Render State props Action
render dispatch _ state _ =
...
...
@@ -89,8 +88,8 @@ layoutHome' hd = simpleSpec performAction render
]
------------------------------------------------------------------------
blocksRandomText' ::
Home
Data -> ReactElement
blocksRandomText' (
Home
Data hd) = blocksRandomText hd.blockTexts
blocksRandomText' ::
Landing
Data -> ReactElement
blocksRandomText' (
Landing
Data hd) = blocksRandomText hd.blockTexts
blocksRandomText :: BlockTexts -> ReactElement
...
...
@@ -102,13 +101,12 @@ blocksRandomText (BlockTexts bt) =
div [ className "col-md-4 content" ]
[ h3 [] [ a [ href b.href, title b.title]
[ i [className b.icon] []
, text
b.titleText
, text
(" " <> b.titleText)
]
]
, p [] [ text b.text ]
]
docButton :: Button -> ReactElement
docButton (Button b) = a [ className "btn btn-success btn-lg spacing-class"
, href b.href
...
...
@@ -120,8 +118,8 @@ docButton (Button b) = a [ className "btn btn-success btn-lg spacing-class"
, text b.text
]
jumboTitle ::
Home
Data -> Boolean -> ReactElement
jumboTitle (
Home
Data hd) b = div jumbo
jumboTitle ::
Landing
Data -> Boolean -> ReactElement
jumboTitle (
Landing
Data hd) b = div jumbo
[ div [className "row" ]
[ div [className "col-md-4 content"]
[ h1 [] [ text hd.name]
...
...
@@ -146,9 +144,8 @@ jumboTitle (HomeData hd) b = div jumbo
true -> [className "jumbotron"]
false -> []
imageEnter :: HomeData -> Props -> ReactElement
imageEnter (HomeData hd) action = div [className "row"]
imageEnter :: LandingData -> Props -> ReactElement
imageEnter (LandingData hd) action = div [className "row"]
[ div [className "col-md-offset-5 col-md-6 content"]
[ img [ src "images/Gargantextuel-212x300.jpg"
, _id "funnyimg"
...
...
@@ -158,5 +155,3 @@ imageEnter (HomeData hd) action = div [className "row"]
[]
]
]
src/Navigation.purs
View file @
7466845d
...
...
@@ -167,7 +167,7 @@ pagesComponent s =
| eff
) AppState props Action
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 DocView = layout0 $ focus _docViewState _docViewAction DV.layoutDocview
selectSpec UserPage = layout0 $ focus _userPageState _userPageAction UP.layoutUser
...
...
@@ -276,7 +276,6 @@ menuButton (LiNav { title : title'
]
-- | WYSIWYG example in Pure React ?
menuElements' :: ReactElement
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