',
+ 1,
+ )
+
+ # Close shell/main/layout before scripts when page has JS block.
+ marker = '\n\n
From f8d58f147768e39a752b4f80668e72b0175ac712 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=B8=D0=BA=D1=82=D0=BE=D1=80?= <78488229+viktor138irk@users.noreply.github.com> Date: Thu, 7 May 2026 04:12:41 +0900 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20=D0=BF=D0=B0=D1=82=D1=87=20=D0=B5=D0=B4=D0=B8=D0=BD?= =?UTF-8?q?=D0=BE=D0=B3=D0=BE=20=D0=BB=D0=B5=D0=B2=D0=BE=D0=B3=D0=BE=20?= =?UTF-8?q?=D0=BC=D0=B5=D0=BD=D1=8E=20=D0=B4=D0=BB=D1=8F=20=D1=81=D1=82?= =?UTF-8?q?=D0=B0=D1=80=D1=8B=D1=85=20=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/patch_sidebar_layout.py | 60 +++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 scripts/patch_sidebar_layout.py diff --git a/scripts/patch_sidebar_layout.py b/scripts/patch_sidebar_layout.py new file mode 100644 index 0000000..a3fde4c --- /dev/null +++ b/scripts/patch_sidebar_layout.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +from pathlib import Path +import sys + +app_path = Path(sys.argv[1]) if len(sys.argv) > 1 else Path('/opt/virtuality/web/app.py') +templates_dir = app_path.parent / 'templates' +if not templates_dir.exists(): + raise SystemExit(f'templates dir not found: {templates_dir}') + +skip = {'login.html', 'console.html', '_sidebar.html'} +changed = [] +skipped = [] + +for path in sorted(templates_dir.glob('*.html')): + if path.name in skip: + skipped.append(f'{path.name}: skipped system/template') + continue + text = path.read_text() + if '{% include "_sidebar.html" %}' in text or "{% include '_sidebar.html' %}" in text: + skipped.append(f'{path.name}: already has sidebar') + continue + if '