Commit f7382ae authored and committed Aug 22, 2019
1 parent 3299192 commit f7382ae Copy full SHA for f7382ae
File tree 2 files changed +66
-0
lines changed
2 files changed +66
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import StarterHeader from "../views/starter/header"
9
9
import StarterMeta from "../views/starter/meta"
10
10
import StarterScreenshot from "../views/starter/screenshot"
11
11
import StarterSource from "../views/starter/source"
12
+ import StarterInstallation from "../views/starter/installation"
12
13
import StarterDetails from "../views/starter/details"
13
14
import FooterLinks from "../components/shared/footer-links"
14
15
@@ -115,6 +116,7 @@ class StarterTemplate extends React.Component {
115
116
< StarterScreenshot imageSharp = { screenshot } repoName = { repoName } />
116
117
</ div >
117
118
< StarterSource repoUrl = { repoUrl } startersYaml = { startersYaml } />
119
+ < StarterInstallation repoName = { repoName } repoUrl = { repoUrl } />
118
120
< StarterDetails
119
121
startersYaml = { startersYaml }
120
122
allDeps = { allDeps }
Original file line number Diff line number Diff line change
1
+ import React from "react"
2
+ import Copy from "../../components/copy"
3
+ import {
4
+ colors ,
5
+ space ,
6
+ radii ,
7
+ mediaQueries ,
8
+ fontSizes ,
9
+ } from "../../utils/presets"
10
+
11
+ const StarterInstallation = ( { repoName, repoUrl } ) => {
12
+ const content = `gatsby new ${ repoName || `my-gatsby-project` } ${ repoUrl } `
13
+ return (
14
+ < div
15
+ css = { {
16
+ padding : `0px ${ space [ 6 ] } ` ,
17
+ [ mediaQueries . lg ] : {
18
+ padding : `0px ${ space [ 8 ] } ` ,
19
+ display : `grid` ,
20
+ gridTemplateRows : `auto auto` ,
21
+ gridRowGap : space [ 2 ] ,
22
+ } ,
23
+ } }
24
+ >
25
+ < div css = { { fontSize : fontSizes [ 1 ] , color : colors . text . secondary } } >
26
+ Install this starter locally:
27
+ </ div >
28
+ < pre
29
+ css = { {
30
+ padding : 0 ,
31
+ background : colors . code . bg ,
32
+ } }
33
+ >
34
+ < code
35
+ css = { {
36
+ display : `flex` ,
37
+ alignItems : `center` ,
38
+ justifyContent : `space-between` ,
39
+ padding : space [ 2 ] ,
40
+ overflowWrap : `break-word` ,
41
+ [ mediaQueries . lg ] : {
42
+ padding : space [ 3 ] ,
43
+ } ,
44
+ "&:before" : {
45
+ display : `none` ,
46
+ } ,
47
+ "&:after" : {
48
+ display : `none` ,
49
+ } ,
50
+ } }
51
+ >
52
+ { content }
53
+ < Copy
54
+ fileName = "Install command"
55
+ content = { content }
56
+ css = { { borderRadius : `${ radii [ 1 ] } px` } }
57
+ />
58
+ </ code >
59
+ </ pre >
60
+ </ div >
61
+ )
62
+ }
63
+
64
+ export default StarterInstallation
You can’t perform that action at this time.
0 commit comments