From 4eebe3a87c6de88f256e125f2e0cfce29ec02c99 Mon Sep 17 00:00:00 2001 From: Tucan444 <66880425+Tucan444@users.noreply.github.com> Date: Thu, 13 May 2021 07:57:13 +0200 Subject: [PATCH] _ --- website/.vscode/launch.json | 15 -------------- website/appjs.js | 41 +------------------------------------ website/desc_short.js | 17 ++++++++++----- website/ip.txt | 2 +- 4 files changed, 14 insertions(+), 61 deletions(-) delete mode 100644 website/.vscode/launch.json diff --git a/website/.vscode/launch.json b/website/.vscode/launch.json deleted file mode 100644 index 2ba986f..0000000 --- a/website/.vscode/launch.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "chrome", - "request": "launch", - "name": "Launch Chrome against localhost", - "url": "http://localhost:8080", - "webRoot": "${workspaceFolder}" - } - ] -} \ No newline at end of file diff --git a/website/appjs.js b/website/appjs.js index d08b203..c518f09 100644 --- a/website/appjs.js +++ b/website/appjs.js @@ -1,43 +1,4 @@ -function onclick1() { - var click = document.getElementById("arrow0"); - click.classList.toggle("mystyle"); - var expand = document.getElementById("listExpand1"); - expand.classList.toggle("expand"); - var appear = document.getElementById("roko1"); - appear.classList.toggle("appear"); -} -function onclick2() { - var click = document.getElementById("arrow2"); - click.classList.toggle("mystyle"); - var expand = document.getElementById("listExpand2"); - expand.classList.toggle("expand"); - var appear = document.getElementById("roko2"); - appear.classList.toggle("appear"); -} -function onclick3() { - var click = document.getElementById("arrow3"); - click.classList.toggle("mystyle"); - var expand = document.getElementById("listExpand3"); - expand.classList.toggle("expand"); - var appear = document.getElementById("roko3"); - appear.classList.toggle("appear"); -} -function onclick4() { - var click = document.getElementById("arrow4"); - click.classList.toggle("mystyle"); - var expand = document.getElementById("listExpand4"); - expand.classList.toggle("expand"); - var appear = document.getElementById("roko4"); - appear.classList.toggle("appear"); -} -function onclick5() { - var click = document.getElementById("arrow5"); - click.classList.toggle("mystyle"); - var expand = document.getElementById("listExpand5"); - expand.classList.toggle("expand"); - var appear = document.getElementById("roko5"); - appear.classList.toggle("appear"); -} + function bmenu() { var burger = document.getElementById("bonger"); burger.classList.toggle("appear") diff --git a/website/desc_short.js b/website/desc_short.js index 0b03ab9..82fec3d 100644 --- a/website/desc_short.js +++ b/website/desc_short.js @@ -26,7 +26,7 @@ $(document).ready(function() {
#
${descriptions[1]}
-
+
@@ -34,7 +34,7 @@ $(document).ready(function() {
#
${descriptions[1]}
-
+
`; @@ -44,11 +44,18 @@ $(document).ready(function() { $.get(`${base_url}${id}/sensors`, function(data1) { Object.keys(data1).forEach(function(key) { let value = data1[key]; + + // removing [translate]- if (key.startsWith("[translate]-")) { - key = key.slice(12, key.length); + key = key.slice(12); } - $(".sensors_small").append(`

${key}: ${value}

`); - $(".sensors_big").append(`

${key}: ${value}

`); + if (value.startsWith("[translate]-")) { + value = value.slice(12); + } + + // appending to DOM + $(`#sensors_small${id}`).append(`

${key}: ${value}

`); + $(`#sensors_big${id}`).append(`

${key}: ${value}

`); }); }); diff --git a/website/ip.txt b/website/ip.txt index e56ea71..d18580b 100644 --- a/website/ip.txt +++ b/website/ip.txt @@ -1 +1 @@ -127.0.0.1 \ No newline at end of file +localhost \ No newline at end of file