summaryrefslogtreecommitdiff
path: root/app/client/modules/biggan/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/client/modules/biggan/index.js')
-rw-r--r--app/client/modules/biggan/index.js37
1 files changed, 37 insertions, 0 deletions
diff --git a/app/client/modules/biggan/index.js b/app/client/modules/biggan/index.js
new file mode 100644
index 0000000..6c94008
--- /dev/null
+++ b/app/client/modules/biggan/index.js
@@ -0,0 +1,37 @@
+import { h, Component } from 'preact'
+import { Route, Link } from 'react-router-dom'
+
+import actions from '../../actions'
+
+import util from '../../util'
+
+import BigGANLive from './views/biggan.live'
+
+class router {
+ componentWillMount(){
+ actions.system.changeTool('biggan')
+ document.body.style.backgroundImage = 'linear-gradient(' + (util.randint(40)+40) + 'deg, #dfe, #def)'
+ }
+ componentWillReceiveProps(){
+ actions.system.changeTool('biggan')
+ document.body.style.backgroundImage = 'linear-gradient(' + (util.randint(40)+40) + 'deg, #dfe, #def)'
+ }
+ render(){
+ return (
+ <section>
+ <Route exact path='/biggan/live/' component={BigGANLive} />
+ </section>
+ )
+ }
+}
+
+function links(){
+ return [
+ { url: '/biggan/live/', name: 'live' },
+ ]
+}
+
+export default {
+ name: 'biggan',
+ router, links,
+}