Обновить build.py

This commit is contained in:
masterpmi 2026-07-23 21:21:28 +03:00
parent c997844856
commit a2b4d5c240

View File

@ -49,6 +49,22 @@ TEMPLATE = """<!DOCTYPE html>
<a href="/staff.html">Сотрудники</a>
<a href="/publications.html">Публикации</a>
</nav>
<div class="search-box">
<input type="text" id="searchInput" placeholder="Поиск по сайту..."
onkeyup="searchSite()" style="padding: 8px; width: 100%; border: 2px solid #ddd; border-radius: 5px;">
</div>
<script>
function searchSite() {{
const input = document.getElementById('searchInput').value.toLowerCase();
const elements = document.querySelectorAll('.person, .news-card, h2, h3');
elements.forEach(el => {{
const text = el.textContent.toLowerCase();
el.style.display = text.includes(input) ? '' : 'none';
}});
}}
</script>
</header>
<main>
{content}