22 lines
825 B
Python
22 lines
825 B
Python
#!/usr/bin/env python3
|
|
"""V125 - Fix light theme CSS vars to match actual :root definition"""
|
|
path = "/var/www/html/all-ia-hub.html"
|
|
with open(path, "r", encoding="utf-8") as f:
|
|
c = f.read()
|
|
|
|
if "V125-FIX-VARS" in c:
|
|
print("ALREADY")
|
|
exit(0)
|
|
|
|
old_light = "body.light{--bg:#fafafa;--bg2:#f0f0f0;--bg3:#e4e4e7;--ac:#18181b;--mu:#52525b;--bd:#d4d4d8;--vl:#7c3aed;--cy:#0891b2;--gr:#059669;--rd:#dc2626;--dm:#71717a}"
|
|
new_light = "body.light{--bg:#fafafa;--bg2:#f0f0f0;--bg3:#e4e4e7;--rim:#d4d4d8;--t:#18181b;--mu:#52525b;--dm:#71717a;--cy:#0891b2;--gr:#059669;--vl:#7c3aed;--am:#d97706;--rd:#dc2626} /* V125-FIX-VARS */"
|
|
|
|
if old_light not in c:
|
|
print("old not found")
|
|
exit(1)
|
|
c = c.replace(old_light, new_light, 1)
|
|
|
|
with open(path, "w", encoding="utf-8") as f:
|
|
f.write(c)
|
|
print(f"PATCHED size={len(c)}")
|