Обновить build.py
This commit is contained in:
parent
c997844856
commit
a2b4d5c240
16
build.py
16
build.py
@ -49,6 +49,22 @@ TEMPLATE = """<!DOCTYPE html>
|
|||||||
<a href="/staff.html">Сотрудники</a>
|
<a href="/staff.html">Сотрудники</a>
|
||||||
<a href="/publications.html">Публикации</a>
|
<a href="/publications.html">Публикации</a>
|
||||||
</nav>
|
</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>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
{content}
|
{content}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user