Screenshot + LESS-Migration: style.css → style.less, Build-Skript, Doku-Update

This commit is contained in:
2026-05-25 00:43:32 +02:00
parent df77f52a53
commit 6608d771a2
9 changed files with 797 additions and 322 deletions

View File

@@ -7,6 +7,7 @@ Serviert statische Dateien direkt.
import http.server
import socketserver
import os
import subprocess
PORT = int(os.environ.get("PORT", 8111))
@@ -21,6 +22,7 @@ class StaticHandler(http.server.BaseHTTPRequestHandler):
content_types = {
".html": "text/html",
".css": "text/css",
".less": "text/css",
".js": "application/javascript",
".json": "application/json",
".png": "image/png",
@@ -46,6 +48,17 @@ class StaticHandler(http.server.BaseHTTPRequestHandler):
print(f"[{self.log_date_time_string()}] {args[0]}")
def main():
# LESS → CSS beim Serverstart kompilieren
print("[BUILD] Kompiliere style.less -> style.css ...")
try:
result = subprocess.run(["node", "build-less.js"], capture_output=True, text=True, cwd=os.path.dirname(os.path.abspath(__file__)))
if result.returncode == 0:
print(f"[BUILD] {result.stdout.strip()}")
else:
print(f"[BUILD] FEHLER: {result.stderr.strip()}")
except FileNotFoundError:
print("[BUILD] node nicht gefunden überspringe LESS-Kompilierung")
print("=" * 50)
print(" [TROPHY] Lara Kiesewetter Live Schachturnier")
print("=" * 50)