feat: drop js for pagination

This commit is contained in:
Cory Dransfeldt 2023-07-03 11:09:14 -07:00
parent c1301631c4
commit 6ea5d7ba28
No known key found for this signature in database
2 changed files with 3 additions and 33 deletions

View file

@ -60,22 +60,5 @@
</head>
<body class="dark:text-white bg-white dark:bg-gray-900 font-sans text-gray-800">
{{ content }}
<script>
(function() {
const pagination = document.getElementById('pagination');
if (pagination) {
pagination.addEventListener('change', (event) => {
const page = parseInt(event.target.value)
if (page === 1) {
window.location.href = '/'
} else {
window.location.href = `/${
event.target.value - 1
}/`
}
})
}
})()
</script>
</body>
</html>