from pathlib import Path
import base64, html, textwrap
src_path = Path("/mnt/data/Paradise_Now.html")
original = src_path.read_bytes()
# Encode the entire original self-contained HTML (including all embedded images).
payload = base64.b64encode(original).decode("ascii")
# Tilda-ready isolated iframe wrapper.
# It keeps the original page intact inside srcdoc and auto-resizes the iframe.
tilda_code = f'''
'''
code_path = Path("/mnt/data/Paradise_Now_Tilda_Code.txt")
code_path.write_text(tilda_code, encoding="utf-8")
# One-click copier page.
copier_payload = base64.b64encode(tilda_code.encode("utf-8")).decode("ascii")
copier_html = f''' Код Paradise Now для Tilda
Paradise Now — готовый код для Tilda
Нажми кнопку, затем вставь код в блок «HTML-код» на Tilda.
Внутри уже находятся все изображения, стили и скрипты исходной страницы.