-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodify_landing.py
More file actions
32 lines (25 loc) · 1.57 KB
/
modify_landing.py
File metadata and controls
32 lines (25 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import re
file_path = r'f:\vp\project\BlazorApp1\Pages\Landing.razor'
with open(file_path, 'r', encoding='utf-8') as f:
content = f.read()
# Separate footer and modify its links
footer_start = content.find('<footer')
if footer_start != -1:
footer = content[footer_start:]
# Replace nav-link with footer-link in the Product section
footer = footer.replace('class="nav-link">Features', 'class="footer-link">Features')
footer = footer.replace('class="nav-link">Pricing', 'class="footer-link">Pricing')
footer = footer.replace('class="nav-link">Documentation', 'class="footer-link">Documentation')
footer = footer.replace('class="nav-link">Changelog', 'class="footer-link">Changelog')
# Replace nav-link with social-icon in the Connect section
footer = footer.replace('class="nav-link">Twitter', 'class="social-icon" style="color: #64748b;">Twitter')
footer = footer.replace('class="nav-link">GitHub', 'class="social-icon" style="color: #64748b;">GitHub')
footer = footer.replace('class="nav-link">Discord', 'class="social-icon" style="color: #64748b;">Discord')
footer = footer.replace('class="nav-link">Support', 'class="footer-link">Support')
# And for Privacy Policy / Terms
footer = footer.replace('class="nav-link">Privacy Policy', 'class="footer-link">Privacy Policy')
footer = footer.replace('class="nav-link">Terms of Service', 'class="footer-link">Terms of Service')
content = content[:footer_start] + footer
with open(file_path, 'w', encoding='utf-8') as f:
f.write(content)
print("Footer modified successfully.")