feat: SEO web audit, URL fetching, auto web search for SEO mode (v1.6.0)
This commit is contained in:
33
fix_device_size2.py
Normal file
33
fix_device_size2.py
Normal file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env python3
|
||||
fp = '/home/uroma/promptarch/components/AIAssist.tsx'
|
||||
with open(fp, 'r') as f:
|
||||
lines = f.readlines()
|
||||
|
||||
changes = 0
|
||||
|
||||
for i, line in enumerate(lines):
|
||||
if 'flex-1 overflow-hidden relative' in line and i > 1400:
|
||||
lines[i] = ' <div className="flex-1 overflow-auto relative bg-[#050505]">\n'
|
||||
changes += 1
|
||||
print('Fixed overflow at line', i+1)
|
||||
|
||||
for j in range(i, min(i+10, len(lines))):
|
||||
if '<LiveCanvas' in lines[j]:
|
||||
ind = ' '
|
||||
w = ind + '<div className="mx-auto transition-all duration-300 h-full"\n'
|
||||
w += ind + ' style={deviceSize !== "full"\n'
|
||||
w += ind + ' ? { width: deviceWidths[deviceSize], maxWidth: "100%",\n'
|
||||
w += ind + ' border: "1px solid rgba(30,58,138,0.3)",\n'
|
||||
w += ind + ' borderRadius: "12px", overflow: "hidden",\n'
|
||||
w += ind + ' boxShadow: "0 20px 60px rgba(0,0,0,0.5)" }\n'
|
||||
w += ind + ' : undefined}>\n'
|
||||
lines[j:j] = [w]
|
||||
changes += 1
|
||||
print('Added device wrapper before LiveCanvas at line', j+1)
|
||||
break
|
||||
break
|
||||
|
||||
with open(fp, 'w') as f:
|
||||
f.writelines(lines)
|
||||
|
||||
print('Applied', changes, 'changes')
|
||||
Reference in New Issue
Block a user