|
|
|
@ -29,21 +29,21 @@ for name in ["index.html", "pricing.html", "terms.html", "contact.html"]: |
|
|
|
elif '<header class="header">' in text: |
|
|
|
elif '<header class="header">' in text: |
|
|
|
text = re.sub(r'<header class="header">.*?</header>', header, text, count=1, flags=re.S) |
|
|
|
text = re.sub(r'<header class="header">.*?</header>', header, text, count=1, flags=re.S) |
|
|
|
else: |
|
|
|
else: |
|
|
|
text = text.replace('<body>', '<body>\n' + header, 1) |
|
|
|
text = text.replace('<body>', '<body>\\n' + header, 1) |
|
|
|
|
|
|
|
|
|
|
|
if '<div class="otb-statusbar">' in text: |
|
|
|
if '<div class="otb-statusbar">' in text: |
|
|
|
text = re.sub(r'<div class="otb-statusbar">.*?</div>\s*</div>', footer, text, count=1, flags=re.S) |
|
|
|
text = re.sub(r'<div class="otb-statusbar">.*?</div>\\s*</div>', footer, text, count=1, flags=re.S) |
|
|
|
else: |
|
|
|
else: |
|
|
|
text = text.replace('</body>', footer + '\n</body>', 1) |
|
|
|
text = text.replace('</body>', footer + '\\n</body>', 1) |
|
|
|
|
|
|
|
|
|
|
|
p.write_text(text, encoding="utf-8") |
|
|
|
p.write_text(text, encoding="utf-8") |
|
|
|
|
|
|
|
|
|
|
|
cssp = Path("assets/style.css") |
|
|
|
cssp = Path("assets/style.css") |
|
|
|
css = cssp.read_text(encoding="utf-8") |
|
|
|
css = cssp.read_text(encoding="utf-8") |
|
|
|
if "/* ===== OTB shared branding ===== */" in css: |
|
|
|
if "/* ===== OTB shared branding ===== */" in css: |
|
|
|
css = re.sub(r'/\* ===== OTB shared branding ===== \*/.*', brandcss, css, flags=re.S) |
|
|
|
css = re.sub(r'/\\* ===== OTB shared branding ===== \\*/.*', brandcss, css, flags=re.S) |
|
|
|
else: |
|
|
|
else: |
|
|
|
css += "\n\n" + brandcss |
|
|
|
css += "\\n\\n" + brandcss |
|
|
|
cssp.write_text(css, encoding="utf-8") |
|
|
|
cssp.write_text(css, encoding="utf-8") |
|
|
|
print("mintme deploy complete") |
|
|
|
print("mintme deploy complete") |
|
|
|
PY |
|
|
|
PY |
|
|
|
|