{“content”:”---\nname: hs-design-landing-patch\ndescription: Patch HS Design Landing Page files on remote PC via SSH — sidebar collapse, drag-drop, Cloudflare Pages deploy workflow\n---\n\n# HS Design Landing Page — Remote Patching Workflow\n\n## When to use\nWhen you need to modify files in the HS Design Landing Page project on the remote PC and those changes are not reflected in the local clone (e.g., the local clone is outdated, or you need to patch directly on the remote PC before pushing).\n\n## Project Context\n- Repo: JakeBilu/Landing-Page on GitHub (private)\n- Remote PC: [email protected], SSH key: ~/.ssh/id_ed25519_hermes\n- Project path: D:\\OpenClaw_Home\\.openclaw\\workspace\\projects\\hs-design-landing\\\n- Deploy: Cloudflare Pages (GitHub integration, auto-deploys on push to main)\n- Files:\n - Quotation app: HS_Design_Quotation.html\n - Main app JS: quote-app.js\n\n## Critical Pattern — File Editing via SSH\nPowerShell heredoc strings corrupt regex/backslash characters. Use this Python+SCP+PS1 pipeline:\n\npython\nimport subprocess, base64\n\nSSH_KEY = \"/data/data/com.termux/files/home/.ssh/id_ed25519_hermes\"\nHOST = \"[email protected]\"\n\ndef ssh_ps(cmd):\n return subprocess.run(['ssh', '-i', SSH_KEY, '-o', 'StrictHostKeyChecking=no', HOST,\n f'powershell -Command \"{cmd}\"'], capture_output=True, text=True, encoding='utf-8', errors='replace')\n\ndef read_b64(path):\n b64, _, rc = ssh_ps(f\"[Convert]::ToBase64String([System.IO.File]::ReadAllBytes('{path}'))\")\n return base64.b64decode(b64.strip()).decode('utf-8')\n\ndef write_b64(path, content):\n new_b64 = base64.b64encode(content.encode('utf-8')).decode()\n with open('/data/data/com.termux/files/home/patched.b64', 'w') as f:\n f.write(new_b64)\n subprocess.run(['scp', '-i', SSH_KEY, '-o', 'StrictHostKeyChecking=no',\n '/data/data/com.termux/files/home/patched.b64',\n f'{HOST}:C:/Users/sozo/AppData/Local/Temp/patched.b64'])\n ps1 = f\"\"\"$b64 = Get-Content 'C:\\\\Users\\\\sozo\\\\AppData\\\\Local\\\\Temp\\\\patched.b64' -Raw\n$bytes = [Convert]::FromBase64String($b64)\n[System.IO.File]::WriteAllBytes('{path}', $bytes)\nWrite-Output \"Done\"\n\"\"\"\n with open('/data/data/com.termux/files/home/write.ps1', 'w') as f:\n f.write(ps1)\n subprocess.run(['scp', '-i', SSH_KEY, '-o', 'StrictHostKeyChecking=no',\n '/data/data/com.termux/files/home/write.ps1',\n f'{HOST}:C:/Users/sozo/AppData/Local/Temp/write.ps1'])\n out, _, rc = ssh_ps(f'& \"C:\\\\Users\\\\sozo\\\\AppData\\\\Local\\\\Temp\\\\write.ps1\"')\n return out\n\n# Usage:\ncontent = read_b64(REMOTE_PATH)\n# patch content...\nwrite_b64(REMOTE_PATH, patched_content)\n\n\n## Constants\n- SSH_KEY = \"/data/data/com.termux/files/home/.ssh/id_ed25519_hermes\"\n- HOST = \"[email protected]\"\n- REMOTE_PATH_JS = r\"D:\\OpenClaw_Home\\.openclaw\\workspace\\projects\\hs-design-landing\\quote-app.js\"\n- REMOTE_PATH_HTML = r\"D:\\OpenClaw_Home\\.openclaw\\workspace\\projects\\hs-design-landing\\HS_Design_Quotation.html\"\n\n## Git Workflow (CRITICAL)\nRemote has GitHub auto-deploy. If remote has unpushed commits:\n1. git fetch origin\n2. git reset --hard origin/main ( DESTROYS local changes — get approval first)\n3. Then patch and commit\n4. git push origin main\n\n## CSS Class Naming\n- Sidebar: .sidebar, collapsed: .sidebar.collapsed\n- Body grid: .body, collapsed-aware: .body.sidebar-collapsed\n- Drag: .drag-over, .dragging\n- Section: .section-block, .sec-hdr\n- Item rows: .item, .item-main\n”}