1module Container.Landing where
5import Button.Component (ButtonType(..), mkButton)
6import CSS.Safer (cssSafer)
7import Data.Foldable (for_)
8import Data.Nullable (null)
10import Effect.Uncurried (runEffectFn1)
11import React.Basic.DOM as R
12import React.Basic.Events (handler_)
13import React.Basic.Hooks (ReactComponent, component, element, readRefMaybe, useRef)
14import React.Basic.Hooks as React
15import SVG.Icon (trianglelogoIcon)
16import SVG.Image (landingPageDark, landingPageLight)
17import Theme.Styles (makeStyles, useTheme)
18import Theme.Types (CSSTheme)
19import Typography.Header (mkH)
20import Unsafe.Coerce (unsafeCoerce)
21import Web.HTML (window)
22import Web.HTML.HTMLElement (getBoundingClientRect)
23import Web.HTML.HTMLElement as HTMLElement
25mkLandingPage ∷ Effect (ReactComponent {})
28 makeStyles \(theme ∷ CSSTheme) ->
37 { position: "absolute"
46 , flexDirection: "row"
48 , justifyContent: "center"
49 , alignItems: "space-around"
53 { fill: theme.textColour
78 { position: "absolute"
85 component "LandingPage" \{ } -> React.do
98 , className: classes.landing
100 [ element backgroundImage { className: classes.landingImage }
102 { className: classes.textLayer
105 { className: classes.topBar
106 , children: [ element trianglelogoIcon { className: classes.logo } ]
108 , R.div { className: classes.welcomeText, children: [ R.text welcomeText ] }
109 , R.div { className: classes.welcomeCopy, children: [ R.text copyText ] }
111 { className: classes.actionButton
115 { onClick: handler_ do
116 maybeNode <- readRefMaybe ref
117 for_ (maybeNode >>= HTMLElement.fromNode) \n -> do
118 height <- getBoundingClientRect n <#> _.height
120 runEffectFn1 ((unsafeCoerce win).scrollTo)
121 { top: height, left: 0, behavior: "smooth"}
123 , buttonType: HighlightedButton
124 , children: [ R.text buttonText ]
134welcomeText = "Enter the college of Kleisli"
137copyText = "Learn how to tame and harness the compiler, whether you're a λ or a Λ"
140buttonText = "I can't wait, let's go!"
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list