Commit 7466845d authored by Alexandre Delanoë's avatar Alexandre Delanoë

[Landing] mv name home to landing.

parent f1e65b24
...@@ -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
------------------------------------------------------------------------ ------------------------------------------------------------------------
layoutHome' :: forall props eff . HomeData -> Spec ( console :: CONSOLE layoutLanding' :: forall props eff . LandingData -> Spec ( console :: CONSOLE
, ajax :: AJAX , ajax :: AJAX
, dom :: DOM , dom :: DOM
| eff | eff
) State props Action ) State props Action
layoutHome' hd = simpleSpec performAction render layoutLanding' 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' :: HomeData -> ReactElement blocksRandomText' :: LandingData -> ReactElement
blocksRandomText' (HomeData hd) = blocksRandomText hd.blockTexts blocksRandomText' (LandingData 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 :: HomeData -> Boolean -> ReactElement jumboTitle :: LandingData -> Boolean -> ReactElement
jumboTitle (HomeData hd) b = div jumbo jumboTitle (LandingData 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"]
[] []
] ]
] ]
...@@ -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
[ -- =========================================================== [ -- ===========================================================
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment