diff --git a/tmp_pricing.html b/tmp_pricing.html index c1318f6..54c5bca 100644 --- a/tmp_pricing.html +++ b/tmp_pricing.html @@ -288,95 +288,8 @@ body.page-id-50 h1.entry-title { display: none !important; } .kmc-featured-badge { top: -12px; } .kmc-pricing-title { font-size: clamp(32px, 8vw, 42px); } } - -/* Custom Header */ -body.page-id-50 .wp-site-blocks > header.wp-block-template-part { display: none !important; } - -.kmc-new-header-wrap { - position: sticky; - top: var(--wp-admin--admin-bar--height, 0px); - z-index: 9999; - background-color: #1C3434; - border-bottom: 1px solid rgba(144, 241, 174, 0.45); -} -.kmc-new-header-inner { - display: flex; - align-items: center; - justify-content: space-between; - padding: 18px 0; - width: min(1440px, calc(100% - 72px)); - margin: 0 auto; -} -.kmc-new-logo { - color: #FFFFFF; - font-family: 'Inter', sans-serif; - font-size: clamp(16px, 1.8vw, 20px); - font-weight: 700; - text-decoration: none; - line-height: 1.08; - letter-spacing: -0.01em; -} -.kmc-new-nav-right { - display: flex; - align-items: center; - gap: clamp(16px, 2.2vw, 36px); -} -.kmc-new-nav-links { - display: flex; - align-items: center; - gap: clamp(16px, 2vw, 30px); -} -.kmc-new-nav-links a { - color: rgba(255,255,255,0.95); - font-family: 'Inter', sans-serif; - font-size: 18px; - font-weight: 600; - text-decoration: none; - line-height: 1.2; -} -.kmc-new-header-cta { - background-color: #FFFFFF; - color: #1C3434; - font-family: 'Inter', sans-serif; - font-size: 16px; - font-weight: 700; - padding: 12px 24px; - border-radius: 999px; - text-decoration: none; - display: inline-flex; - align-items: center; - line-height: 1; -} - -@media (max-width: 980px) { - .kmc-new-header-inner { width: calc(100% - 48px); } - .kmc-new-header-inner { flex-wrap: wrap; padding: 18px 0; } - .kmc-new-nav-right { width: 100%; justify-content: space-between; margin-top: 16px; } -} -@media (max-width: 680px) { - .kmc-new-header-inner { width: calc(100% - 28px); } - .kmc-new-logo { font-size: 18px; } - .kmc-new-nav-right { flex-direction: column; align-items: flex-start; gap: 14px; } - .kmc-new-nav-links a { font-size: 16px; } - .kmc-new-header-cta { font-size: 14px; } -} - -
-
- - -
-
- -
diff --git a/update_header.py b/update_header.py index 56fc724..07da536 100644 --- a/update_header.py +++ b/update_header.py @@ -1,104 +1,21 @@ import re -with open("tmp_pricing.html", "r") as f: - text = f.read() +with open('tmp_header.html', 'r') as f: + content = f.read() -# Insert the CSS -css_to_insert = """ -/* Custom Header */ -body.page-id-50 .wp-site-blocks > header.wp-block-template-part { display: none !important; } - -.kmc-new-header-wrap { - position: sticky; - top: var(--wp-admin--admin-bar--height, 0px); - z-index: 9999; - background-color: #1C3434; - border-bottom: 1px solid rgba(144, 241, 174, 0.45); -} -.kmc-new-header-inner { - display: flex; - align-items: center; - justify-content: space-between; - padding: 18px 0; - width: min(1440px, calc(100% - 72px)); - margin: 0 auto; -} -.kmc-new-logo { - color: #FFFFFF; - font-family: 'Inter', sans-serif; - font-size: clamp(16px, 1.8vw, 20px); - font-weight: 700; - text-decoration: none; - line-height: 1.08; - letter-spacing: -0.01em; -} -.kmc-new-nav-right { - display: flex; - align-items: center; - gap: clamp(16px, 2.2vw, 36px); -} -.kmc-new-nav-links { - display: flex; - align-items: center; - gap: clamp(16px, 2vw, 30px); -} -.kmc-new-nav-links a { - color: rgba(255,255,255,0.95); - font-family: 'Inter', sans-serif; - font-size: 18px; - font-weight: 600; - text-decoration: none; - line-height: 1.2; -} -.kmc-new-header-cta { - background-color: #FFFFFF; - color: #1C3434; - font-family: 'Inter', sans-serif; - font-size: 16px; - font-weight: 700; - padding: 12px 24px; - border-radius: 999px; - text-decoration: none; - display: inline-flex; - align-items: center; - line-height: 1; -} - -@media (max-width: 980px) { - .kmc-new-header-inner { width: calc(100% - 48px); } - .kmc-new-header-inner { flex-wrap: wrap; padding: 18px 0; } - .kmc-new-nav-right { width: 100%; justify-content: space-between; margin-top: 16px; } -} -@media (max-width: 680px) { - .kmc-new-header-inner { width: calc(100% - 28px); } - .kmc-new-logo { font-size: 18px; } - .kmc-new-nav-right { flex-direction: column; align-items: flex-start; gap: 14px; } - .kmc-new-nav-links a { font-size: 16px; } - .kmc-new-header-cta { font-size: 14px; } -} -""" - -html_to_insert = """ -
- +new_header = ''' +
+
-""" +''' -# Find the end of the second " in text: - parts = text.rsplit("", 1) - text = parts[0] + css_to_insert + "\n\n" + html_to_insert + parts[1] +content = re.sub( + r'', + new_header, + content, + count=1, + flags=re.IGNORECASE | re.DOTALL +) -with open("tmp_pricing.html", "w") as f: - f.write(text) - -print("SUCCESS") +with open('tmp_header_updated.html', 'w') as f: + f.write(content) \ No newline at end of file