This commit is contained in:
@@ -15827,9 +15827,11 @@ h6,
|
|||||||
|
|
||||||
.weather-box {
|
.weather-box {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
.weather-box.show {
|
.weather-box.show {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
visibility: visible;
|
||||||
}
|
}
|
||||||
.weather-box {
|
.weather-box {
|
||||||
background-color: #f8f8f8;
|
background-color: #f8f8f8;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -14,9 +14,12 @@
|
|||||||
speed: document.querySelector(".speed"),
|
speed: document.querySelector(".speed"),
|
||||||
deg: document.querySelector(".deg")
|
deg: document.querySelector(".deg")
|
||||||
};
|
};
|
||||||
const API_KEY = "b62eaccfd1a09cf1d04b00bd2ec689e7";
|
console.log(DOM);
|
||||||
|
const API_KEY = "";
|
||||||
const LAT = 43.72072300281546;
|
const LAT = 43.72072300281546;
|
||||||
const LON = 7.352450291796612;
|
const LON = 7.352450291796612;
|
||||||
|
const TEMP_MAX_ALERT_AMOUNT = 30;
|
||||||
|
const TEMP_MIN_ALERT_AMOUNT = 10;
|
||||||
const init = () => {
|
const init = () => {
|
||||||
console.log("init!");
|
console.log("init!");
|
||||||
getWeather().then((data) => {
|
getWeather().then((data) => {
|
||||||
@@ -53,9 +56,9 @@
|
|||||||
DOM.deg.textContent = Number(deg);
|
DOM.deg.textContent = Number(deg);
|
||||||
DOM.weatherIcon.src = `https://openweathermap.org/img/wn/${icon}@2x.png`;
|
DOM.weatherIcon.src = `https://openweathermap.org/img/wn/${icon}@2x.png`;
|
||||||
DOM.windIcon.style.transform = `rotate(${Number(deg) - 45}deg)`;
|
DOM.windIcon.style.transform = `rotate(${Number(deg) - 45}deg)`;
|
||||||
if (Number(temp) >= 30) {
|
if (Number(temp) >= TEMP_MAX_ALERT_AMOUNT) {
|
||||||
DOM.temp.classList.add("danger");
|
DOM.temp.classList.add("danger");
|
||||||
} else if (Number(temp) <= 10) {
|
} else if (Number(temp) <= TEMP_MIN_ALERT_AMOUNT) {
|
||||||
DOM.temp.classList.add("frozen");
|
DOM.temp.classList.add("frozen");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -15,13 +15,16 @@
|
|||||||
deg: document.querySelector('.deg'),
|
deg: document.querySelector('.deg'),
|
||||||
};
|
};
|
||||||
|
|
||||||
// console.log(DOM);
|
console.log(DOM);
|
||||||
|
|
||||||
// BITTE EIGENEN API KEY VERWENDEN
|
// BITTE EIGENEN API KEY VERWENDEN
|
||||||
const API_KEY = '';
|
const API_KEY = '';
|
||||||
const LAT = 43.72072300281546;
|
const LAT = 43.72072300281546;
|
||||||
const LON = 7.352450291796612;
|
const LON = 7.352450291796612;
|
||||||
|
|
||||||
|
const TEMP_MAX_ALERT_AMOUNT = 30;
|
||||||
|
const TEMP_MIN_ALERT_AMOUNT = 10;
|
||||||
|
|
||||||
// === INIT =============
|
// === INIT =============
|
||||||
const init = () => {
|
const init = () => {
|
||||||
console.log('init!');
|
console.log('init!');
|
||||||
@@ -71,9 +74,9 @@
|
|||||||
|
|
||||||
DOM.windIcon.style.transform = `rotate(${Number(deg) - 45}deg)`;
|
DOM.windIcon.style.transform = `rotate(${Number(deg) - 45}deg)`;
|
||||||
|
|
||||||
if (Number(temp) >= 30) {
|
if (Number(temp) >= TEMP_MAX_ALERT_AMOUNT) {
|
||||||
DOM.temp.classList.add('danger');
|
DOM.temp.classList.add('danger');
|
||||||
} else if (Number(temp) <= 10) {
|
} else if (Number(temp) <= TEMP_MIN_ALERT_AMOUNT) {
|
||||||
DOM.temp.classList.add('frozen');
|
DOM.temp.classList.add('frozen');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,8 +2,10 @@
|
|||||||
|
|
||||||
.weather-box {
|
.weather-box {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
visibility: hidden;
|
||||||
&.show {
|
&.show {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
visibility: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
background-color: #f8f8f8;
|
background-color: #f8f8f8;
|
||||||
|
|||||||
@@ -7,3 +7,5 @@ COM0404,Easter egg themed webcam for your monitor,put an Easter egg on hardware
|
|||||||
COM0001,Vulcan language vi cheatsheet,learn vi and Vulcan at the same time,3,9.90
|
COM0001,Vulcan language vi cheatsheet,learn vi and Vulcan at the same time,3,9.90
|
||||||
COM1536,Klingon language emacs cheatsheet,learn emacs and Klingon at the same time,50,9.90
|
COM1536,Klingon language emacs cheatsheet,learn emacs and Klingon at the same time,50,9.90
|
||||||
MOB0555,smartphone case with built-in screen,never miss a message,20,39.90
|
MOB0555,smartphone case with built-in screen,never miss a message,20,39.90
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
|
@@ -0,0 +1,16 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"Code": "MUG0007",
|
||||||
|
"Short Description": "coffee mug with LCD level indicator",
|
||||||
|
"Tagline": "coffee mug with LCD level indicator,never again reach for the empty mug",
|
||||||
|
"Quantity": 20,
|
||||||
|
"Price": 49.9
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Code": "MUG0013",
|
||||||
|
"Short Description": "coffee mug with bluetooth-connected coffee grounds scanner for automatized fortune telling",
|
||||||
|
"Tagline": "put the smart into coffee reading",
|
||||||
|
"Quantity": 20,
|
||||||
|
"Price": 99.9
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html lang="de">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
||||||
<title>Products</title>
|
|
||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<main>
|
|
||||||
<div class="container py-5"></div>
|
|
||||||
</main>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -58,9 +58,10 @@ const listItems = products
|
|||||||
return recordToHtml(row); // => '<li>...</li>'
|
return recordToHtml(row); // => '<li>...</li>'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log(listItems);
|
||||||
|
|
||||||
const list = `<ul class="list-group">${listItems.join('')}</ul>`;
|
const list = `<ul class="list-group">${listItems.join('')}</ul>`;
|
||||||
|
|
||||||
// Output ===================
|
// Output ===================
|
||||||
console.log(list);
|
|
||||||
|
|
||||||
writeHtmlDocument(list);
|
writeHtmlDocument(list);
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Code,Short Description,Tagline,Quantity,Price
|
||||||
|
|
||||||
|
|
||||||
|
@@ -0,0 +1,11 @@
|
|||||||
|
const fs = require('fs');
|
||||||
|
|
||||||
|
// asnyc prozess
|
||||||
|
fs.readFile('data/products.csv', 'UTF8', (error, data) => {
|
||||||
|
console.log(data); // 2 output
|
||||||
|
});
|
||||||
|
|
||||||
|
for (let i = 0; i < 2000000000; i++) {
|
||||||
|
// be busy for a few seconds
|
||||||
|
}
|
||||||
|
console.log('ready'); // 1 output
|
||||||
Reference in New Issue
Block a user