This commit is contained in:
Philippe Torrel
2026-07-10 09:09:52 +02:00
parent 7f12902b23
commit 0eb2262295
11 changed files with 51 additions and 22 deletions

View File

@@ -15827,9 +15827,11 @@ h6,
.weather-box {
opacity: 0;
visibility: hidden;
}
.weather-box.show {
opacity: 1;
visibility: visible;
}
.weather-box {
background-color: #f8f8f8;

File diff suppressed because one or more lines are too long

View File

@@ -14,9 +14,12 @@
speed: document.querySelector(".speed"),
deg: document.querySelector(".deg")
};
const API_KEY = "b62eaccfd1a09cf1d04b00bd2ec689e7";
console.log(DOM);
const API_KEY = "";
const LAT = 43.72072300281546;
const LON = 7.352450291796612;
const TEMP_MAX_ALERT_AMOUNT = 30;
const TEMP_MIN_ALERT_AMOUNT = 10;
const init = () => {
console.log("init!");
getWeather().then((data) => {
@@ -53,9 +56,9 @@
DOM.deg.textContent = Number(deg);
DOM.weatherIcon.src = `https://openweathermap.org/img/wn/${icon}@2x.png`;
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");
} else if (Number(temp) <= 10) {
} else if (Number(temp) <= TEMP_MIN_ALERT_AMOUNT) {
DOM.temp.classList.add("frozen");
}
};

View File

@@ -15,13 +15,16 @@
deg: document.querySelector('.deg'),
};
// console.log(DOM);
console.log(DOM);
// BITTE EIGENEN API KEY VERWENDEN
const API_KEY = '';
const LAT = 43.72072300281546;
const LON = 7.352450291796612;
const TEMP_MAX_ALERT_AMOUNT = 30;
const TEMP_MIN_ALERT_AMOUNT = 10;
// === INIT =============
const init = () => {
console.log('init!');
@@ -71,9 +74,9 @@
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');
} else if (Number(temp) <= 10) {
} else if (Number(temp) <= TEMP_MIN_ALERT_AMOUNT) {
DOM.temp.classList.add('frozen');
}
};

View File

@@ -2,8 +2,10 @@
.weather-box {
opacity: 0;
visibility: hidden;
&.show {
opacity: 1;
visibility: visible;
}
background-color: #f8f8f8;

View File

@@ -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
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
1 Code Short Description Tagline Quantity Price
7 COM0001 Vulcan language vi cheatsheet learn vi and Vulcan at the same time 3 9.90
8 COM1536 Klingon language emacs cheatsheet learn emacs and Klingon at the same time 50 9.90
9 MOB0555 smartphone case with built-in screen never miss a message 20 39.90
10
11

View File

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

View File

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

View File

@@ -58,9 +58,10 @@ const listItems = products
return recordToHtml(row); // => '<li>...</li>'
});
console.log(listItems);
const list = `<ul class="list-group">${listItems.join('')}</ul>`;
// Output ===================
console.log(list);
writeHtmlDocument(list);

View File

@@ -0,0 +1,3 @@
Code,Short Description,Tagline,Quantity,Price
1 Code Short Description Tagline Quantity Price

View File

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