4import Data.Foldable (for_)
5import Data.Nullable (null)
7import Effect.Uncurried (runEffectFn1)
9import React.Basic.DOM as R
10import React.Basic.Emotion as E
11import React.Basic.Events (handler_)
12import React.Basic.Hooks (ReactComponent, reactComponent, readRefMaybe, useRef)
13import React.Basic.Hooks as React
14import Unsafe.Coerce (unsafeCoerce)
15import Web.HTML (window)
16import Web.HTML.HTMLElement (getBoundingClientRect)
17import Web.HTML.HTMLElement as HTMLElement
18import Yoga ((/>), (</*), (</*>), (</>))
19import Yoga.Block as Block
20import Yoga.Block.Atom.Button.Types as ButtonType
21import Yoga.Block.Container.Style (colour)
22import Yoga.SVG.Image (mkLandingPageBackground)
23import Yoga.Scroll.Hook (useScrollYPosition)
28 { width: E.str "100vw"
29 , height: E.str "100vh"
30 , gridArea: E.str "landing"
34 { position: E.str "absolute"
36 , height: E.str "100%"
42 , display: E.str "flex"
43 , flexDirection: E.str "row"
44 , height: E.str "90px"
45 , justifyContent: E.str "center"
46 , alignItems: E.str "space-around"
50 { fill: E.str colour.text
52 , height: E.str "50px"
53 , marginTop: E.str "33px"
57 { fontSize: E.str "36pt"
58 , marginTop: E.str "33px"
59 , marginLeft: E.str "5vw"
63 { fontSize: E.str "22pt"
64 , marginTop: E.str "20px"
65 , marginLeft: E.str "5vw"
66 , maxWidth: E.str "400px"
70 { marginLeft: E.str "5vw"
71 , display: E.str "flex"
75 { paddingLeft: E.str "10px"
76 , paddingRight: E.str "10px"
80 { position: E.str "absolute"
81 , maxWidth: E.str "none"
83 , height: E.str "100%"
87mkLandingPage ∷ Effect (ReactComponent {})
89 backgroundImage <- mkLandingPageBackground
90 reactComponent "LandingPage" \{} -> React.do
92 scrollY <- useScrollYPosition
96 , css: classes.landing
97 , className: "landing-page"
99 [ E.element backgroundImage { className: "landing-image", css: classes.landingImage }
101 { className: "text-layer"
102 , css: classes.textLayer
105 { className: "top-bar"
106 , css: classes.topBar
107 , children: [ Block.icon </*> { className: "logo", css: E.css { marginTop: E.var "--s0" }, size: E.var "--s3", icon: logo } ]
109 , E.element R.div' { className: "welcome-text", css: classes.welcomeText, children: [ R.text welcomeText ] }
110 , E.element R.div' { className: "welcome-copy", css: classes.welcomeCopy, children: [ R.text copyText ] }
112 { css: classes.actionButton
113 , className: "action-button"
118 maybeNode <- readRefMaybe ref
119 for_ (maybeNode >>= HTMLElement.fromNode) \n -> do
120 height <- getBoundingClientRect n <#> _.height
122 runEffectFn1 ((unsafeCoerce win).scrollTo)
123 { top: height, left: 0, behavior: "smooth" }
124 , buttonType: ButtonType.Primary
125 , css: classes.actualActionButton
126 , className: "Heinzer"
128 /> [ R.text buttonText ]
137welcomeText = "Enter the college of Kleisli"
140copyText = "Learn how to tame and harness the compiler, whether you're a λ or a Λ"
143buttonText = "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