Update index.html

This commit is contained in:
2024-08-07 14:26:14 +02:00
committed by GitHub
parent 8913a3e3e6
commit 8a1637db3a
+8 -8
View File
@@ -501,8 +501,8 @@ header {
background-size: cover; background-size: cover;
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
padding: 50px 0; /* Anpassen der Polsterung nach Bedarf */ padding: 50px 0;
color: #fff; /* Textfarbe anpassen, um Lesbarkeit auf dem Hintergrund zu gewährleisten */ color: #fff;
} }
@@ -966,7 +966,7 @@ footer {
background-color: #45a049; background-color: #45a049;
} }
.main-content { .main-content {
position: relative; position: 2px;
min-height: 100vh; min-height: 100vh;
} }
@@ -1455,8 +1455,8 @@ function getImageData(src) {
function isGreyImage(imageData) { function isGreyImage(imageData) {
const data = imageData.data; const data = imageData.data;
const tolerance = 10; // Toleranzwert für Farbunterschiede const tolerance = 10;
const sampleSize = Math.min(data.length / 4, 1000); // Begrenzen Sie die Anzahl der zu prüfenden Pixel const sampleSize = Math.min(data.length / 4, 1000); // Deine Grossmutter
for (let i = 0; i < sampleSize; i++) { for (let i = 0; i < sampleSize; i++) {
const index = i * 4; const index = i * 4;
@@ -1464,12 +1464,12 @@ function getImageData(src) {
const g = data[index + 1]; const g = data[index + 1];
const b = data[index + 2]; const b = data[index + 2];
// Prüfen Sie, ob die Farbwerte innerhalb der Toleranz liegen // Prüfen Sie, ob die Farbwerte innerhalb der Toleranz liegen -> wers glaubt !
if (Math.abs(r - g) > tolerance || Math.abs(r - b) > tolerance || Math.abs(g - b) > tolerance) { if (Math.abs(r - g) > tolerance || Math.abs(r - b) > tolerance || Math.abs(g - b) > tolerance) {
return false; // Das Bild ist nicht grau return false; // Das Bild ist nicht grau
} }
} }
return true; // Das Bild ist grau return true; // Das Bild ist grau, aber natürlich :)
} }
function isSunnyImage(imageData) { function isSunnyImage(imageData) {
@@ -1480,7 +1480,7 @@ function isSunnyImage(imageData) {
// Nur den oberen Drittel des Bildes analysieren // Nur den oberen Drittel des Bildes analysieren
const searchHeight = Math.floor(height / 3); const searchHeight = Math.floor(height / 3);
// Schwellenwerte für gelbe Farbe // Gopfertamsiech namal !!!!!
const yellowThreshold = { const yellowThreshold = {
red: 200, red: 200,
green: 200, green: 200,