Merge pull request #8 from Tucan444/Development

_
This commit is contained in:
Tucan444 2021-05-13 07:57:41 +02:00 committed by GitHub
commit 6c8133bbb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 61 deletions

@ -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}"
}
]
}

@ -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")

@ -26,7 +26,7 @@ $(document).ready(function() {
<div id="listExpand${id}" class="listHide">
<img src="${image_urls[1]}" alt="#" class="obrazok_big">
<div class="text_small">${descriptions[1]}</div>
<div class="sensors_small">
<div id="sensors_small${id}" class="sensors_small">
</div>
<div class="info_small"></div>
</div>
@ -34,7 +34,7 @@ $(document).ready(function() {
<div id="big${id}" class="big">
<div class="imgBig"><img class="wsImg" src="${image_urls[1]}" alt="#"></div>
<div class="text_big">${descriptions[1]}</div>
<div class="sensors_big">
<div id="sensors_big${id}" class="sensors_big">
</div>
<div class="info_big"></div>
</div>`;
@ -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(`<p class="sens_style_heat">${key}: ${value}</p>`);
$(".sensors_big").append(`<p class="sens_style_heat">${key}: ${value}</p>`);
if (value.startsWith("[translate]-")) {
value = value.slice(12);
}
// appending to DOM
$(`#sensors_small${id}`).append(`<p class="sens_style_heat">${key}: ${value}</p>`);
$(`#sensors_big${id}`).append(`<p class="sens_style_heat">${key}: ${value}</p>`);
});
});

@ -1 +1 @@
127.0.0.1
localhost