@@ -15,8 +15,9 @@ marked.setOptions({
15
15
} ) ;
16
16
17
17
getCategories ( ) . then ( ( categories ) => {
18
+ var versions = process . argv [ 2 ] . split ( '\n' ) ;
18
19
var html = React . renderToStaticMarkup (
19
- React . createElement ( Page , { categories } )
20
+ React . createElement ( Page , { categories, versions } )
20
21
) ;
21
22
console . log ( '<!doctype html>' + html ) ;
22
23
} ) ;
@@ -63,14 +64,14 @@ class Page extends React.Component {
63
64
< head >
64
65
< meta charSet = "utf-8" />
65
66
< title > React Router Documentation</ title >
66
- < link rel = "stylesheet" href = ". /styles.css" />
67
- < link rel = "stylesheet" href = ". /syntax.css" />
67
+ < link rel = "stylesheet" href = "/styles.css" />
68
+ < link rel = "stylesheet" href = "/syntax.css" />
68
69
</ head >
69
70
< body >
70
71
< main className = "Main" >
71
72
< div className = "Main__Content" >
72
73
< center >
73
- < img src = ". /img/vertical.png" width = "367" style = { { marginBottom : 40 } } />
74
+ < img src = "/img/vertical.png" width = "367" style = { { marginBottom : 40 } } />
74
75
</ center >
75
76
< p >
76
77
React Router is a complete routing solution designed specifically
@@ -100,8 +101,14 @@ class Page extends React.Component {
100
101
</ div >
101
102
</ main >
102
103
< nav className = "Nav" >
103
- < img src = "./img/horizontal.png" width = "100%" />
104
- < br />
104
+ < img src = "/img/horizontal.png" width = "100%" />
105
+ < p >
106
+ version: < select id = "version" >
107
+ { this . props . versions . map ( ( version ) => (
108
+ < option > { version } </ option >
109
+ ) ) }
110
+ </ select >
111
+ </ p >
105
112
{ this . props . categories . map ( ( category ) => (
106
113
< div className = "Category" >
107
114
< div className = "Category__Name" > { category . name } </ div >
@@ -117,7 +124,7 @@ class Page extends React.Component {
117
124
</ div >
118
125
) ) }
119
126
</ nav >
120
- < script src = "app.js" > </ script >
127
+ < script src = "/ app.js" > </ script >
121
128
</ body >
122
129
</ html >
123
130
) ;
0 commit comments