1
1
import React from 'react'
2
2
import { LinkedNode , Sitemap , getAbsoluteUrl } from './sitemap'
3
- import { Navbar , Footer , Layout } from './layout'
3
+ import { Navbar , Footer , Layout } from './layout'
4
4
import { Image , CSSBundle } from './assets'
5
5
import { renderToStaticMarkup } from 'react-dom/server'
6
6
@@ -10,46 +10,49 @@ export const Details = {
10
10
seoTitle : 'Oops! Not found' ,
11
11
title : 'Not Found' ,
12
12
description : 'We are sorry but he page you tried to visit does not exist' ,
13
- openGraphImage : Image ( { url : 'assets/open_graph_preview.png' , description : 'Learnk8s preview' } ) ,
13
+ openGraphImage : Image ( { url : 'assets/open_graph_preview.png' , description : 'Learnk8s preview' } ) ,
14
14
}
15
15
16
16
function identity < T > ( value : T ) : T {
17
17
return value
18
18
}
19
19
20
20
export function render ( website : Sitemap , currentNode : LinkedNode < typeof Details > , siteUrl : string ) : string {
21
- return renderToStaticMarkup ( < Layout
22
- website = { website }
23
- seoTitle = { currentNode . payload . seoTitle }
24
- title = { currentNode . payload . title }
25
- description = { currentNode . payload . description }
26
- openGraphImage = { currentNode . payload . openGraphImage }
27
- absoluteUrl = { getAbsoluteUrl ( currentNode , siteUrl ) }
28
- cssBundle = { CSSBundle ( {
29
- paths : [
30
- 'node_modules/tachyons/css/tachyons.css' ,
31
- 'assets/style.css' ,
32
- ] ,
33
- } ) } >
34
-
35
- < div className = 'trapezoid-1 white pt3 pt0-ns pb2 pb4-ns' >
36
-
37
- < Navbar root = { website } />
38
-
39
- < section className = 'ph5-l' >
40
- < div className = 'w-100' >
41
- < h1 className = 'f1 pl3 pl4-ns f-subheadline-l' > Oops!</ h1 >
42
- < h2 className = 'f4 normal measure-narrow lh-copy ph3 ph4-ns f3-l pb4' > Something went wrong!</ h2 >
43
- </ div >
21
+ return renderToStaticMarkup (
22
+ < Layout
23
+ website = { website }
24
+ seoTitle = { currentNode . payload . seoTitle }
25
+ title = { currentNode . payload . title }
26
+ description = { currentNode . payload . description }
27
+ openGraphImage = { currentNode . payload . openGraphImage }
28
+ absoluteUrl = { getAbsoluteUrl ( currentNode , siteUrl ) }
29
+ cssBundle = { CSSBundle ( {
30
+ paths : [ 'node_modules/tachyons/css/tachyons.css' , 'assets/style.css' ] ,
31
+ } ) }
32
+ >
33
+ < div className = "trapezoid-1 white pt3 pt0-ns pb2 pb4-ns" >
34
+ < Navbar root = { website } />
35
+
36
+ < section className = "ph5-l" >
37
+ < div className = "w-100" >
38
+ < h1 className = "f1 pl3 pl4-ns f-subheadline-l" > Oops!</ h1 >
39
+ < h2 className = "f4 normal measure-narrow lh-copy ph3 ph4-ns f3-l pb4" > Something went wrong!</ h2 >
40
+ </ div >
41
+ </ section >
42
+ </ div >
43
+
44
+ < section className = "ph3 measure-wide pv4 center" >
45
+ < h3 className = "f3 f2-l navy" > Are we missing something?</ h3 >
46
+ < p className = "lh-copy black-70" >
47
+ Please get in touch{ ' ' }
48
+ < a href = "mailto:[email protected] " className = "link navy underline" >
49
+
50
+ </ a >
51
+ .
52
+ </ p >
44
53
</ section >
45
54
46
- </ div >
47
-
48
- < section className = 'ph3 measure-wide pv4 center' >
49
- < h3 className = 'f3 f2-l navy' > Are we missing something?</ h3 >
50
- < p className = 'lh-copy black-70' > Please get in touch
< a href = 'mailto:[email protected] ' className = 'link navy underline' > [email protected] </ a > .
</ p >
51
- </ section >
52
-
53
- < Footer root = { website } />
54
- </ Layout > )
55
- }
55
+ < Footer root = { website } />
56
+ </ Layout > ,
57
+ )
58
+ }
0 commit comments