13 lines
672 B
Python
Executable file
13 lines
672 B
Python
Executable file
import re
|
|
|
|
with open('c:/ScriptoriumAI/scriptoriumai-ui/src/layouts/EditorLayout.tsx', 'r', encoding='utf-8') as f:
|
|
text = f.read()
|
|
|
|
# Check if backdrop already exists
|
|
if 'bg-black/50' not in text:
|
|
text = text.replace('<aside', '{isMobileMenuOpen && <div className="fixed inset-0 bg-black/50 z-40 md:hidden" onClick={() => setIsMobileMenuOpen(false)} />}\n <aside')
|
|
# Change absolute position wrapper
|
|
text = text.replace('className={col-span-12 md:col-span-2 overflow-hidden }', 'className={md:col-span-2 overflow-hidden }')
|
|
|
|
with open('c:/ScriptoriumAI/scriptoriumai-ui/src/layouts/EditorLayout.tsx', 'w', encoding='utf-8') as f:
|
|
f.write(text)
|