From bbd85c7d2dd79b2b70e70e3a824ac831bb25007b Mon Sep 17 00:00:00 2001 From: Humberto Alfonso Díaz Date: Tue, 24 Sep 2019 12:33:20 +0200 Subject: FUNCT Add screen navigation support --- src/config.xml | 3 ++- src/index.html | 68 +++++++++++++++++++++++++++++++++++++++++++++++----- src/index.js | 12 +++++++++- src/styles/main.scss | 17 ++++++++++++- 4 files changed, 91 insertions(+), 9 deletions(-) diff --git a/src/config.xml b/src/config.xml index 4e3f71c..d3820f8 100644 --- a/src/config.xml +++ b/src/config.xml @@ -15,6 +15,7 @@ - + + \ No newline at end of file diff --git a/src/index.html b/src/index.html index 9798f94..65d316c 100644 --- a/src/index.html +++ b/src/index.html @@ -21,11 +21,11 @@ -
+ - +
@@ -44,7 +44,7 @@
- +
@@ -55,7 +55,7 @@
- +
@@ -63,7 +63,7 @@ Wired
- +
@@ -72,6 +72,62 @@
+ +
+

+ Date & Time +

+
+

+ Date +

+
+
+

+ Time +

+
+ + Confirm + +
+ +
+

+ Bluetotth +

+ + Confirm + +
+ +
+

+ Wifi +

+ + Confirm + +
+ +
+

+ Wired +

+ + Confirm + +
+ +
+

+ Version info +

+ + Confirm + +
+
diff --git a/src/index.js b/src/index.js index 962b5a6..ded8fe7 100644 --- a/src/index.js +++ b/src/index.js @@ -18,4 +18,14 @@ import './js/AFB.js'; /* CSS */ -import './styles/app.scss'; \ No newline at end of file +import './styles/app.scss'; + +window.show = function(page){ + document.getElementById('main').classList.add('hide'); + document.getElementById(page).classList.remove('hide'); +} + +window.hide = function(page) { + document.getElementById('main').classList.remove('hide'); + document.getElementById(page).classList.add('hide'); +} \ No newline at end of file diff --git a/src/styles/main.scss b/src/styles/main.scss index 22dd899..518bdc2 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -50,13 +50,17 @@ body { } } - .content { + .page { display: flex; flex-direction: column; flex-wrap: wrap; justify-content: center; height: 100%; + &.hide { + display: none; + } + .header { text-align: center; margin: 0; @@ -97,6 +101,17 @@ body { } } } + + .confirm { + position: absolute; + bottom: 5%; + text-align: center; + height: 120px; + line-height: 120px; + width: 90%; + background: map-get($colors, primary); + border-radius: 20px; + } } .log { -- cgit 1.2.3-korg