blob: 485a9a44616f4f6fe250c9ade27255be9f444068 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
import { h, Component } from 'preact'
import { Route, Link } from 'react-router-dom'
import util from '../../util'
import SampleRNNNew from './views/samplernn.new'
import SampleRNNShow from './views/samplernn.show'
import SampleRNNImport from './views/samplernn.import'
import SampleRNNResults from './views/samplernn.results'
import SampleRNNGraph from './views/samplernn.graph'
function router () {
document.body.style.backgroundImage = 'linear-gradient(' + (util.randint(40)+40) + 'deg, #eef, #fef)'
return (
<section>
<Route exact path='/samplernn/new/' component={SampleRNNNew} />
<Route exact path='/samplernn/datasets/' component={SampleRNNShow} />
<Route exact path='/samplernn/datasets/:id/' component={SampleRNNShow} />
<Route exact path='/samplernn/import/' component={SampleRNNImport} />
<Route exact path='/samplernn/results/' component={SampleRNNResults} />
<Route exact path='/samplernn/graph/' component={SampleRNNGraph} />
</section>
)
}
function links(){
return (
<span>
<span><Link to="/samplernn/datasets/">datasets</Link></span>
<span><Link to="/samplernn/graph/">graph</Link></span>
<span><Link to="/samplernn/results/">results</Link></span>
</span>
)
}
export default {
name: 'samplernn',
router, links,
}
|