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
-- Layout |
layoutHome :: forall props eff . Lang -> Spec ( console :: CONSOLE
layoutLanding :: 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
------------------------------------------------------------------------
layoutHome' :: forall props eff . HomeData -> Spec ( console :: CONSOLE
layoutLanding' :: forall props eff . LandingData -> Spec ( console :: CONSOLE
, ajax :: AJAX
, dom :: DOM
| eff
) State props Action
layoutHome' hd = simpleSpec performAction render
layoutLanding' hd = simpleSpec performAction render
where
render :: Render State props Action
render dispatch _ state _ =
......@@ -89,8 +88,8 @@ layoutHome' hd = simpleSpec performAction render
]
------------------------------------------------------------------------
blocksRandomText' :: HomeData -> ReactElement
blocksRandomText' (HomeData hd) = blocksRandomText hd.blockTexts
blocksRandomText' :: LandingData -> ReactElement
blocksRandomText' (LandingData 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 :: HomeData -> Boolean -> ReactElement
jumboTitle (HomeData hd) b = div jumbo
jumboTitle :: LandingData -> Boolean -> ReactElement
jumboTitle (LandingData 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"]
[]
]
]
......@@ -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
[ -- ===========================================================
......
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