@@ -22,6 +22,7 @@ import React, { Component, Fragment } from 'react';
2222import { Route , Switch , withRouter } from 'react-router-dom' ;
2323import { Link } from 'react-router-dom' ;
2424import SideMenu from './side_menu.jsx' ;
25+ import WelcomePage from './welcome_page.jsx' ;
2526import VERSIONS from './versions.json' ;
2627import './css/app.css' ;
2728import './css/reset.css' ;
@@ -54,7 +55,7 @@ class App extends Component {
5455 super ( props ) ;
5556
5657 this . state = {
57- slideoutIsOpen : false ,
58+ slideoutIsOpen : true ,
5859 version : VERSIONS [ 0 ] ,
5960 packageTree : null ,
6061 packageResources : { }
@@ -89,7 +90,7 @@ class App extends Component {
8990 < nav className = "navbar" >
9091 { hasBenchmarks ? < Link to = { `/${ match . params . version } /docs/api/@stdlib/${ match . params . pkg } /benchmark.html` } > Benchmarks</ Link > : null }
9192 { hasTests ? < Link to = { `/${ match . params . version } /docs/api/@stdlib/${ match . params . pkg } /test.html` } > Tests</ Link > : null }
92- < a href = { `https://github.com/stdlib-js/stdlib/tree/${ match . params . version } /lib/node_modules/@stdlib/${ match . params . pkg } ` } > Source</ a >
93+ { resources ? < a href = { `https://github.com/stdlib-js/stdlib/tree/${ match . params . version } /lib/node_modules/@stdlib/${ match . params . pkg } ` } > Source</ a > : null }
9394 </ nav >
9495 < ReadmePage path = { match . url } />
9596 </ Fragment >
@@ -187,7 +188,7 @@ class App extends Component {
187188 < nav className = "navbar" >
188189 { hasBenchmarks ? < Link to = { `/${ match . params . version } /docs/api/@stdlib/${ match . params . pkg } /benchmark.html` } > Benchmarks</ Link > : null }
189190 { hasTests ? < Link to = { `/${ match . params . version } /docs/api/@stdlib/${ match . params . pkg } /test.html` } > Tests</ Link > : null }
190- < a href = { `https://github.com/stdlib-js/stdlib/tree/${ match . params . version } /lib/node_modules/@stdlib/${ match . params . pkg } ` } > Source</ a >
191+ { resources ? < a href = { `https://github.com/stdlib-js/stdlib/tree/${ match . params . version } /lib/node_modules/@stdlib/${ match . params . pkg } ` } > Source</ a > : null }
191192 </ nav >
192193 { iframe }
193194 </ Fragment >
@@ -212,7 +213,7 @@ class App extends Component {
212213 < nav className = "navbar" >
213214 { hasBenchmarks ? < Link to = { `/${ match . params . version } /docs/api/@stdlib/${ match . params . pkg } /benchmark.html` } > Benchmarks</ Link > : null }
214215 { hasTests ? < Link to = { `/${ match . params . version } /docs/api/@stdlib/${ match . params . pkg } /test.html` } > Tests</ Link > : null }
215- < a href = { `https://github.com/stdlib-js/stdlib/tree/${ match . params . version } /lib/node_modules/@stdlib/${ match . params . pkg } ` } > Source</ a >
216+ { resources ? < a href = { `https://github.com/stdlib-js/stdlib/tree/${ match . params . version } /lib/node_modules/@stdlib/${ match . params . pkg } ` } > Source</ a > : null }
216217 </ nav >
217218 { iframe }
218219 </ Fragment >
@@ -229,6 +230,9 @@ class App extends Component {
229230 path = "/:version/docs/api/@stdlib/:pkg*"
230231 render = { this . renderReadme }
231232 />
233+ < Route exact path = "/" >
234+ < WelcomePage />
235+ </ Route >
232236 </ Switch >
233237 </ div >
234238 </ div >
0 commit comments