added new css features

This commit is contained in:
2026-02-12 00:05:03 +00:00
parent bcd7cec6a2
commit 509cd9c332
6 changed files with 172 additions and 81 deletions

View File

@@ -38,3 +38,13 @@
90% {box-shadow: 0px 0px 5px 1px #41e920, 0 0 10px 1px black inset;} 90% {box-shadow: 0px 0px 5px 1px #41e920, 0 0 10px 1px black inset;}
100% {box-shadow: 0px 0px 3px 1px #41e920, 0 0 10px 1px black inset;} 100% {box-shadow: 0px 0px 3px 1px #41e920, 0 0 10px 1px black inset;}
} }
@keyframes gradient {
0% {
background-position: 0% 50%;
}
100% {
background-position: 200% 50%;
}
}

View File

@@ -1,14 +1,38 @@
html { scroll-behavior: smooth; font-family: ubuntu; } html { scroll-behavior: smooth; font-family: ubuntu; }
*{ box-sizing: border-box; margin:0; padding:0;} *{ box-sizing: border-box; margin:0; padding:0;}
body{overflow-y: hidden;}
header{
position:fixed;
display:flex;
justify-content: center;
align-items: center;
width:100vw;
padding:5px 10px;
background-color: var(--menu-color);
border-bottom: 2px solid var(--menu-border-col);
color:white;
}
.main-title{
-webkit-text-stroke: 1.2px var(--menu-border-col);
}
.main-container{ .main-container{
padding:20px; padding:50px 20px 20px 20px ;
background-color: rgb(186, 186, 186); background-color: #363636;
width:100vw; width:100vw;
height:100vh; height:100vh;
display:flex; display:flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
overflow-y: scroll;
scrollbar-width: none; /* Firefox */
-ms-overflow-style: none;/* IE e Edge vecchio */
}
.main-container::-webkit-scrollbar {
display: none; /* Chrome, Safari, Edge Chromium */
} }
.alert-container{ .alert-container{
@@ -67,9 +91,12 @@ html { scroll-behavior: smooth; font-family: ubuntu; }
.alert_red{ .alert_red{
background-color: #df1414; background-color: #df1414;
color:#ff9175; color:#ffe9e3;
box-shadow: 0px 0px 0px 0px #ff3535, 0 0 10px 1px black inset;; box-shadow: 0px 0px 0px 0px #ff3535, 0 0 10px 1px black inset;;
animation: bumping_red_bg 4s linear 2s infinite; /* animation: bumping_red_bg 4s linear 2s infinite; */
background: linear-gradient(-45deg,#ff0000, #bb0000, #ff0000);
background-size: 200% 200%;
animation: gradient 3s linear infinite;
} }
.alert_green{ .alert_green{
@@ -78,3 +105,24 @@ html { scroll-behavior: smooth; font-family: ubuntu; }
box-shadow: 0px 0px 3px 1px #41e920, 0 0 10px 1px black inset;; box-shadow: 0px 0px 3px 1px #41e920, 0 0 10px 1px black inset;;
animation: bumping_green_bg 4s linear 2s infinite; animation: bumping_green_bg 4s linear 2s infinite;
} }
footer{
position:fixed;
display:flex;
justify-content: space-around;
align-items: center;
bottom:0;
background-color: black !important;
width:100vw;
padding:14px;
border-top: 2px solid var(--menu-border-col);
color:white;
}
footer > div{
background-color: #cccccc;
color:black;
padding:5px 10px;
border-radius: 20px;
border: 2px solid var(--menu-border-col);
}

View File

@@ -1,83 +1,9 @@
:root { :root {
/*### PrimaryColor ###*/
--demo1:hsl(98, 100%, 50%);/*Use this only to check the color (--pri) if is fine*/
--pri:98; /*Change only this from the color that you need! Don't Touch the code below!*/
/*The color below is automaticaly created 20 levels of lightness*/
--priCol20:hsl(var(--pri), 100%, 100%);
--priCol19:hsl(var(--pri), 100%, 95%);
--priCol18:hsl(var(--pri), 100%, 90%);
--priCol17:hsl(var(--pri), 100%, 85%);
--priCol16:hsl(var(--pri), 100%, 80%);
--priCol15:hsl(var(--pri), 100%, 75%);
--priCol14:hsl(var(--pri), 100%, 70%);
--priCol13:hsl(var(--pri), 100%, 65%);
--priCol12:hsl(var(--pri), 100%, 60%);
--priCol11:hsl(var(--pri), 100%, 55%);
--priCol10:hsl(var(--pri), 100%, 50%);
--priCol9:hsl(var(--pri), 100%, 45%);
--priCol8:hsl(var(--pri), 100%, 40%);
--priCol7:hsl(var(--pri), 100%, 35%);
--priCol6:hsl(var(--pri), 100%, 30%);
--priCol5:hsl(var(--pri), 100%, 25%);
--priCol4:hsl(var(--pri), 100%, 20%);
--priCol3:hsl(var(--pri), 100%, 15%);
--priCol2:hsl(var(--pri), 100%, 10%);
--priCol1:hsl(var(--pri), 100%, 5%);
/*### SecondColor ###*/
--demo2:hsl(207, 100%, 50%);/*Use this only to check the color (--pri) if is fine*/
--sec:207; /*Change only this from the color that you need! Don't Touch the code below!*/
/*The color below is automaticaly created 20 levels of lightness*/
--secCol20:hsl(var(--sec), 100%, 100%);
--secCol19:hsl(var(--sec), 100%, 95%);
--secCol18:hsl(var(--sec), 100%, 90%);
--secCol17:hsl(var(--sec), 100%, 85%);
--secCol16:hsl(var(--sec), 100%, 80%);
--secCol15:hsl(var(--sec), 100%, 75%);
--secCol14:hsl(var(--sec), 100%, 70%);
--secCol13:hsl(var(--sec), 100%, 65%);
--secCol12:hsl(var(--sec), 100%, 60%);
--secCol11:hsl(var(--sec), 100%, 55%);
--secCol10:hsl(var(--sec), 100%, 50%);
--secCol9:hsl(var(--sec), 100%, 45%);
--secCol8:hsl(var(--sec), 100%, 40%);
--secCol7:hsl(var(--sec), 100%, 35%);
--secCol6:hsl(var(--sec), 100%, 30%);
--secCol5:hsl(var(--sec), 100%, 25%);
--secCol4:hsl(var(--sec), 100%, 20%);
--secCol3:hsl(var(--sec), 100%, 15%);
--secCol2:hsl(var(--sec), 100%, 10%);
--secCol1:hsl(var(--sec), 100%, 5%);
/*### ThirdColor ###*/
--demo3:hsl(280, 100%, 50%);/*Use this only to check the color (--pri) if is fine*/
--thi:280; /*Change only this from the color that you need! Don't Touch the code below!*/
/*The color below is automaticaly created 20 levels of lightness*/
--thiCol20:hsl(var(--thi), 100%, 100%);
--thiCol19:hsl(var(--thi), 100%, 95%);
--thiCol18:hsl(var(--thi), 100%, 90%);
--thiCol17:hsl(var(--thi), 100%, 85%);
--thiCol16:hsl(var(--thi), 100%, 80%);
--thiCol15:hsl(var(--thi), 100%, 75%);
--thiCol14:hsl(var(--thi), 100%, 70%);
--thiCol13:hsl(var(--thi), 100%, 65%);
--thiCol12:hsl(var(--thi), 100%, 60%);
--thiCol11:hsl(var(--thi), 100%, 55%);
--thiCol10:hsl(var(--thi), 100%, 50%);
--thiCol9:hsl(var(--thi), 100%, 45%);
--thiCol8:hsl(var(--thi), 100%, 40%);
--thiCol7:hsl(var(--thi), 100%, 35%);
--thiCol6:hsl(var(--thi), 100%, 30%);
--thiCol5:hsl(var(--thi), 100%, 25%);
--thiCol4:hsl(var(--thi), 100%, 20%);
--thiCol3:hsl(var(--thi), 100%, 15%);
--thiCol2:hsl(var(--thi), 100%, 10%);
--thiCol1:hsl(var(--thi), 100%, 5%);
/*######################################*/
/*##### Default Variable #####*/ /*##### Default Variable #####*/
--padsidepage:0 25px; /*Padding side for page*/ --menu-color: #000000;
--menu-border-col: #61f061;
} }
/* ### Use Example ### /* ### Use Example ###

View File

@@ -1,3 +1,3 @@
<h1>SLD WEB HEALTH CHECK</h1>
<?php get_checked_list(); ?> <?php get_checked_list(); ?>

104
process/generate-report.php Normal file
View File

@@ -0,0 +1,104 @@
<?php
// --- Configurazione ---
$inputFile = __DIR__ . '../web_list.json';
$outputFile = __DIR__ . '../web_check.json';
$timeout = 10; // timeout connessioni in secondi
// --- Funzioni ---
function checkSSL($host, $timeout) {
$streamContext = stream_context_create([
"ssl" => ["capture_peer_cert" => true, "verify_peer" => true, "verify_peer_name" => true]
]);
$client = @stream_socket_client("ssl://$host:443", $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT, $streamContext);
if (!$client) {
return ["status" => false, "expiry" => null, "error" => $errstr];
}
$params = stream_context_get_params($client);
$cert = $params["options"]["ssl"]["peer_certificate"];
$cert_info = openssl_x509_parse($cert);
$expiry = date('Y-m-d H:i:s', $cert_info['validTo_time_t']);
// Controllo se scaduto
$isValid = time() < $cert_info['validTo_time_t'];
return ["status" => $isValid, "expiry" => $expiry, "error" => null];
}
function checkContent($host, $match, $user = null, $pass = null, $timeout = 10) {
$opts = ['http' => ['timeout' => $timeout]];
if ($user && $pass) {
$opts['http']['header'] = "Authorization: Basic " . base64_encode("$user:$pass");
}
$context = stream_context_create($opts);
$content = @file_get_contents("https://$host", false, $context);
if ($content === false) return false;
return strpos($content, $match) !== false;
}
// --- Leggi lista domini ---
if (!file_exists($inputFile)) {
die("File $inputFile non trovato.\n");
}
$domains = json_decode(file_get_contents($inputFile), true);
$results = [];
$totalSSLok = 0;
$totalContentOk = 0;
foreach ($domains as $entry) {
$host = $entry[0];
$domain = $entry[1];
$match = $entry[2];
$checkContentFlag = $entry[3];
// Leggi user/pass solo se flag true
$user = null;
$pass = null;
if ($checkContentFlag) {
$user = $entry[4] ?? null;
$pass = $entry[5] ?? null;
}
// --- SSL ---
$ssl = checkSSL($host, $timeout);
if ($ssl['status']) $totalSSLok++;
// --- Content ---
$contentOk = true;
if ($checkContentFlag) {
$contentOk = checkContent($host, $match, $user, $pass, $timeout);
if ($contentOk) $totalContentOk++;
}
// --- Tutto OK? ---
$allOk = $ssl['status'] && $contentOk;
// --- Salva risultato ---
$results[] = [
"host" => $host,
"domain" => $domain,
"ssl_status" => $ssl['status'],
"ssl_expiry" => $ssl['expiry'],
"content_match" => $contentOk,
"all_ok" => $allOk
];
}
// --- Salva JSON output ---
$output = [
"results" => $results,
"summary" => [
"total_ssl_ok" => $totalSSLok,
"total_content_ok" => $totalContentOk,
"total_checked" => count($domains)
]
];
file_put_contents($outputFile, json_encode($output, JSON_PRETTY_PRINT));
echo "Check completato. Risultati salvati in $outputFile\n";
?>

View File

@@ -11,4 +11,7 @@
<title>sld-website-healthcheck</title> <title>sld-website-healthcheck</title>
</head> </head>
<body> <body>
<header>
<h1 class="main-title">SLD WEB HEALTH CHECK</h1>
</header>
<div class="main-container"> <div class="main-container">