From c3a5d63e11e85d617a131160e8af6baed55fbfb6 Mon Sep 17 00:00:00 2001 From: Humberto Alfonso Díaz Date: Mon, 23 Sep 2019 11:32:30 +0200 Subject: FUNCT Add support to modify sliders --- src/index.html | 93 ++++++++++----------------------------------------- src/index.js | 7 ++++ src/js/app.js | 29 ++++++++++++++++ src/js/buttons.js | 38 --------------------- src/js/chair.js | 33 ------------------ src/js/fan_speed.js | 29 ---------------- src/js/sliders.js | 56 +++++++++++++++++++++++++++++++ src/js/temperature.js | 89 ------------------------------------------------ src/styles/main.scss | 3 +- 9 files changed, 112 insertions(+), 265 deletions(-) create mode 100644 src/js/app.js delete mode 100644 src/js/buttons.js delete mode 100644 src/js/chair.js delete mode 100644 src/js/fan_speed.js create mode 100644 src/js/sliders.js delete mode 100644 src/js/temperature.js (limited to 'src') diff --git a/src/index.html b/src/index.html index 9c1ac9b..6b2ed01 100644 --- a/src/index.html +++ b/src/index.html @@ -25,81 +25,24 @@

Mixer

-
-
- Volume 1: 50% -
- - - -
- - -
- - - -
-
-
- Volume 1: 50% -
- - - -
- - -
- - - -
-
-
- Volume 1: 50% -
- - - -
- - -
- - - -
-
-
- Volume 1: 50% -
- - - -
- - -
- - - -
-
-
- Volume 1: 50% -
- - - -
- - -
- - - -
+
+
diff --git a/src/index.js b/src/index.js index 142b8d1..fa62684 100644 --- a/src/index.js +++ b/src/index.js @@ -16,6 +16,13 @@ /* JS */ import './js/AFB.js'; +import { init } from './js/app'; +import { increase, decrease, change } from './js/sliders'; /* CSS */ import './styles/app.scss'; + +window.increase = increase; +window.decrease = decrease; +window.change = change; +init(); \ No newline at end of file diff --git a/src/js/app.js b/src/js/app.js new file mode 100644 index 0000000..773e5b0 --- /dev/null +++ b/src/js/app.js @@ -0,0 +1,29 @@ +import Mustache from 'mustache'; +import { init as init_sliders } from './sliders'; + +var template; + +function render_sliders(sliders) { + var sliderContainer = document.getElementById('SliderContainer'); + for( var i=0; i