import re
import glob
import os
files = glob.glob('templates/*.html')
bottom_nav = '''
'''
css_add = '''
/* BOTTOM NAV BAR */
.bottom-nav {
position: fixed; bottom: 0; left: 0; right: 0;
background: rgba(10,10,15,0.95);
backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
border-top: 1px solid var(--border);
display: flex; justify-content: space-around; align-items: center;
padding: 12px 10px 24px; z-index: 9999;
}
.bottom-nav-item {
display: flex; flex-direction: column; align-items: center; gap: 4px;
color: var(--text-muted); text-decoration: none; font-size: 9px;
font-family: 'Space Mono', monospace; font-weight: 700;
transition: all 0.2s; padding: 8px 16px; border-radius: 14px;
}
.bottom-nav-item i { font-size: 20px; font-style: normal; margin-bottom: 2px; }
.bottom-nav-item.active { background: rgba(88,166,255,0.1); color: var(--accent); }
.bottom-nav-item.active i { color: var(--accent); }
'''
for file in files:
with open(file, 'r', encoding='utf-8') as f:
html = f.read()
# 1. Remove Top Nav Tabs
html = re.sub(r'', '', html, flags=re.DOTALL)
# 2. Add bottom nav if not already there
if 'bottom-nav' not in html:
# replace