directory: improve mobile page

This commit is contained in:
Evgeny Poberezkin
2025-09-30 20:18:26 +01:00
parent acae5af0ad
commit a1734ce140
2 changed files with 2 additions and 1 deletions

View File

@@ -18,6 +18,7 @@ active_directory: true
align-items: flex-start;
margin-bottom: 20px;
padding: 16px;
word-break: break-word;
}
#directory .entry a {

View File

@@ -343,7 +343,7 @@ function addPagination(entries) {
pageBtn.textContent = p.toString();
if (p === currentPage) {
pageBtn.classList.add('active');
} else if (p === currentPage - 1 || p === currentPage + 1) {
} else if (p === currentPage - 1 || p === currentPage + 1 || (currentPage === 1 && p === 3) || (currentPage === totalPages && p === totalPages - 2)) {
pageBtn.classList.add('neighbor');
}
pageBtn.addEventListener('click', () => goToPage(p));