
      paginationLinks.forEach(function (link) {
        link.addEventListener('click', function (e) {
          e.preventDefault();
          const page = link.getAttribute('data-page');
          const params = new URLSearchParams(window.location.search);
          params.set('page', page);
          window.location.href = `${window.location.pathname}?${params.toString()}`;
        });
      });
    });
</script>

{% endblock %}