Updated Doormile website

This commit is contained in:
R-Bharathraj
2026-05-15 11:21:50 +05:30
commit 4f39822cb7
287 changed files with 218662 additions and 0 deletions

31
scratch/fix_css_paths.py Normal file
View File

@@ -0,0 +1,31 @@
import os
dirs = [r'assets/css/vendor', r'assets/css/sections', r'assets/css/widgets']
replacements = [
('../fonts/', '../../fonts/'),
('assets/images/', '../../images/'),
('assets/fonts/', '../../fonts/')
]
for d in dirs:
if not os.path.exists(d):
print(f"Directory {d} does not exist")
continue
for root, _, files in os.walk(d):
for f in files:
if f.endswith('.css'):
path = os.path.join(root, f)
try:
with open(path, 'r', encoding='utf-8', errors='ignore') as file:
content = file.read()
new_content = content
for old, new in replacements:
new_content = new_content.replace(old, new)
if new_content != content:
with open(path, 'w', encoding='utf-8') as file:
file.write(new_content)
print(f"Updated {path}")
except Exception as e:
print(f"Error processing {path}: {e}")