32 lines
1.0 KiB
Python
32 lines
1.0 KiB
Python
import sys
|
|
|
|
with open('tmp_home.html', 'r', encoding='utf-8') as f:
|
|
content = f.read()
|
|
|
|
# Fix duplicated text
|
|
content = content.replace(
|
|
'<span class="mint-text">Kevin McKeand CoachingKevin McKeand Coaching</span>',
|
|
'<span class="mint-text">Kevin McKeand Coaching</span>'
|
|
)
|
|
|
|
# Fix logo size
|
|
content = content.replace(
|
|
"font-size: clamp(24px, 2.2vw, 36px);",
|
|
"font-size: clamp(16px, 1.8vw, 20px);"
|
|
)
|
|
|
|
# Fix top spacing more aggressively
|
|
old_css_part = "body.home .wp-site-blocks { padding-top: 0 !important; }"
|
|
new_css_part = """body.home .wp-site-blocks { padding-top: 0 !important; margin-top: 0 !important; }
|
|
body.home main { margin-top: 0 !important; padding-top: 0 !important; }
|
|
body.home { margin-top: 0 !important; padding-top: 0 !important; }"""
|
|
|
|
if old_css_part in content:
|
|
content = content.replace(old_css_part, new_css_part)
|
|
else:
|
|
content = content.replace("body { background: #1C3434; }", new_css_part + "\nbody { background: #1C3434; }")
|
|
|
|
with open('tmp_home_fixed.html', 'w', encoding='utf-8') as f:
|
|
f.write(content)
|
|
|