blob: 9e3d466ac215c725479ddf095e06fdfdafa85bcb (
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
|
import { h, Component } from 'preact'
import { Route, Link } from 'react-router-dom'
import util from '../../util'
import Pix2PixNew from './views/pix2pix.new'
import Pix2PixShow from './views/pix2pix.show'
import Pix2PixLive from './views/pix2pix.live'
function router () {
document.body.style.backgroundImage = 'linear-gradient(' + (util.randint(40)+40) + 'deg, #fde, #ffe)'
return (
<section>
<Route exact path='/pix2pix/new/' component={Pix2PixNew} />
<Route exact path='/pix2pix/datasets/' component={Pix2PixShow} />
<Route exact path='/pix2pix/datasets/:id/' component={Pix2PixShow} />
<Route exact path='/pix2pix/live/' component={Pix2PixLive} />
</section>
)
}
function links(){
return (
<span>
<span><Link to="/pix2pix/datasets/">datasets</Link></span>
<span><Link to="/pix2pix/live/">live</Link></span>
</span>
)
}
export default {
name: 'pix2pix',
router, links,
}
|