import sys

with open('tmp_home.html', 'r') as f:
    content = f.read()

# Replace Credentials background color
old_str_4 = """<!-- wp:group {"style":{"spacing":{"padding":{"top":"24px","bottom":"24px","left":"24px","right":"24px"},"blockGap":"16px"},"border":{"radius":"16px"},"color":{"background":"#0f172a"}}} -->
<div class="wp-block-group has-background" style="border-radius:16px;background-color:#0f172a;padding-top:24px;padding-right:24px;padding-bottom:24px;padding-left:24px">"""

new_str_4 = """<!-- wp:group {"style":{"spacing":{"padding":{"top":"24px","bottom":"24px","left":"24px","right":"24px"},"blockGap":"16px"},"border":{"radius":"16px"},"color":{"background":"#316263"}}} -->
<div class="wp-block-group has-background" style="border-radius:16px;background-color:#316263;padding-top:24px;padding-right:24px;padding-bottom:24px;padding-left:24px">"""

content = content.replace(old_str_4, new_str_4)

with open('tmp_home.html', 'w') as f:
    f.write(content)

print(f"Credentials replaced: {old_str_4 in content}")
