@@ -88,65 +88,71 @@ let make = (~pageData) => {
8888 ++ pageData. id
8989 ++ ".md" ;
9090 <SpacedView style= styles##container vertical= SpacedView . L >
91- <View >
92- <Text style= styles##titleText> pageData.title-> React . string </Text >
93- {officialDocHref
94- -> Option . map(officialDocHref =>
95- <TextLink style= styles##officialDocLink href= officialDocHref>
96- <SVGExternalLink
97- width= {14 .-> ReactFromSvg . Size . pt}
98- height= {14 .-> ReactFromSvg . Size . pt}
99- fill= Consts . Colors . accent
100- />
101- {| Official documentation |} -> React . string
102- </TextLink >
91+ <main >
92+ <header >
93+ <View >
94+ <h1 >
95+ <Text style= styles##titleText> pageData.title-> React . string </Text >
96+ </h1 >
97+ {officialDocHref
98+ -> Option . map(officialDocHref =>
99+ <TextLink style= styles##officialDocLink href= officialDocHref>
100+ <SVGExternalLink
101+ width= {14 .-> ReactFromSvg . Size . pt}
102+ height= {14 .-> ReactFromSvg . Size . pt}
103+ fill= Consts . Colors . accent
104+ />
105+ {| Official documentation |} -> React . string
106+ </TextLink >
107+ )
108+ -> Option . getWithDefault(React . null)}
109+ </View >
110+ <Spacer />
111+ <Row . SpaceBetween >
112+ <TextLight >
113+ {pageData. date
114+ -> Option . map(date => date-> React . string)
115+ -> Option . getWithDefault(React . null)}
116+ {pageData. date-> Option . isSome && pageData. author-> Option . isSome
117+ ? " | " -> React . string : React . null}
118+ {pageData. author
119+ -> Option . map(author => ("By @" ++ author)-> React . string)
120+ -> Option . getWithDefault(React . null)}
121+ </TextLight >
122+ <TextLink href= editHref style= styles##editLink>
123+ <SpacedView vertical= SpacedView . XS horizontal= SpacedView . XS >
124+ <Text style= styles##editLinkText> {| Edit|} -> React . string </Text >
125+ </SpacedView >
126+ </TextLink >
127+ </Row . SpaceBetween >
128+ </header >
129+ <Spacer />
130+ {pageData. wip
131+ -> Option . flatMap(wip =>
132+ if (wip) {
133+ Some (
134+ <>
135+ <Spacer />
136+ <SpacedView style= styles##wip>
137+ <Text style= styles##wipText>
138+ {| This module below has been implemented but not properly documented. You may find below partial documentation or just raw code to show you requirements for its usage.
139+ If you want you can help us to improve the situation by |}
140+ -> React . string
141+ <TextLink style= styles##wipEditLink href= editHref>
142+ {| editing this file|} -> React . string
143+ </TextLink >
144+ {| .|} -> React . string
145+ </Text >
146+ </SpacedView >
147+ <Spacer size= Spacer . L />
148+ </>,
149+ );
150+ } else {
151+ None ;
152+ }
103153 )
104154 -> Option . getWithDefault(React . null)}
105- </View >
106- <Spacer />
107- <Row . SpaceBetween >
108- <TextLight >
109- {pageData. date
110- -> Option . map(date => date-> React . string)
111- -> Option . getWithDefault(React . null)}
112- {pageData. date-> Option . isSome && pageData. author-> Option . isSome
113- ? " | " -> React . string : React . null}
114- {pageData. author
115- -> Option . map(author => ("By @" ++ author)-> React . string)
116- -> Option . getWithDefault(React . null)}
117- </TextLight >
118- <TextLink href= editHref style= styles##editLink>
119- <SpacedView vertical= SpacedView . XS horizontal= SpacedView . XS >
120- <Text style= styles##editLinkText> {| Edit|} -> React . string </Text >
121- </SpacedView >
122- </TextLink >
123- </Row . SpaceBetween >
124- <Spacer />
125- {pageData. wip
126- -> Option . flatMap(wip =>
127- if (wip) {
128- Some (
129- <>
130- <Spacer />
131- <SpacedView style= styles##wip>
132- <Text style= styles##wipText>
133- {| This module below has been implemented but not properly documented. You may find below partial documentation or just raw code to show you requirements for its usage.
134- If you want you can help us to improve the situation by |}
135- -> React . string
136- <TextLink style= styles##wipEditLink href= editHref>
137- {| editing this file|} -> React . string
138- </TextLink >
139- {| .|} -> React . string
140- </Text >
141- </SpacedView >
142- <Spacer size= Spacer . L />
143- </>,
144- );
145- } else {
146- None ;
147- }
148- )
149- -> Option . getWithDefault(React . null)}
150- <JsonBodyRenderer body= {pageData. body} />
155+ <JsonBodyRenderer body= {pageData. body} />
156+ </main >
151157 </SpacedView >;
152158};
0 commit comments