From 8d06839056967e8786c63976545aff098ae2f128 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 26 Jun 2018 01:28:41 +0200 Subject: morph module.. enum method for sliders --- app/client/modules/morph/index.js | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 app/client/modules/morph/index.js (limited to 'app/client/modules/morph/index.js') diff --git a/app/client/modules/morph/index.js b/app/client/modules/morph/index.js new file mode 100644 index 0000000..9c90848 --- /dev/null +++ b/app/client/modules/morph/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 MorphApp from './views/morph.app' + +class router { + componentWillMount(){ + actions.system.changeTool('morph') + document.body.style.backgroundImage = 'linear-gradient(' + (util.randint(40)+40) + 'deg, #def, #dfe)' + } + componentWillReceiveProps(){ + actions.system.changeTool('morph') + document.body.style.backgroundImage = 'linear-gradient(' + (util.randint(40)+40) + 'deg, #def, #dfe)' + } + render(){ + return ( +
+ +
+ ) + } +} + +function links(){ + return [ + { url: '/morph/app/', name: 'morph' }, + ] +} + +export default { + name: 'morph', + router, links, +} -- cgit v1.2.3-70-g09d2