diff --git a/public/index.html b/public/index.html
index 74b6d28..a8f6973 100644
--- a/public/index.html
+++ b/public/index.html
@@ -91,17 +91,22 @@
-
-
{
+ currentPage = i;
+ fetchTorrents(currentPage);
+ };
+ pagination.appendChild(pageBtn);
+ }
+
+ // Next button
const nextBtn = document.createElement("button");
nextBtn.className = "btn btn-secondary";
nextBtn.textContent = "Next";
@@ -469,14 +490,18 @@
}
};
pagination.appendChild(nextBtn);
- const cardBody = document.querySelector(".card-body");
- const existingPagination = cardBody.querySelector(".d-flex");
- if (existingPagination) {
- existingPagination.remove();
- }
- cardBody.appendChild(pagination);
- }
+ // Insert pagination into the designated container in Active Torrents header
+ const paginationContainer = document.getElementById(
+ "paginationContainer"
+ );
+ const existingPagination =
+ paginationContainer.querySelector(".d-flex");
+ if (existingPagination) {
+ existingPagination.remove(); // Remove any existing pagination to avoid duplicates
+ }
+ paginationContainer.appendChild(pagination);
+ }
async function fetchConfig() {
if (!localStorage.getItem("userPubKey")) return;
try {
diff --git a/public/style.css b/public/style.css
index b322f7b..63e43fe 100644
--- a/public/style.css
+++ b/public/style.css
@@ -239,3 +239,29 @@
.custom-btn-primary:hover {
background-color: #dc2626; /* Darker red on hover */
}
+
+.card-header {
+ padding: 1rem 1.25rem; /* Match Bootstrap default padding */
+ background-color: #f8f9fa; /* Light gray background, consistent with Bootstrap cards */
+ border-bottom: 1px solid rgba(0, 0, 0, 0.125); /* Default card border */
+}
+
+.card-header h5 {
+ margin-bottom: 0; /* Ensure no extra bottom margin */
+ font-size: 1.25rem; /* Match Bootstrap h5 size */
+}
+
+#activeTorrentsHeader .btn {
+ font-size: 0.875rem; /* Smaller buttons */
+ padding: 0.25rem 0.5rem; /* Reduced padding */
+}
+
+#paginationContainer .btn {
+ font-size: 0.875rem; /* Smaller buttons for pagination */
+ padding: 0.25rem 0.5rem; /* Reduced padding */
+}
+
+#paginationContainer .d-flex {
+ margin-top: 0; /* Remove extra margin */
+ gap: 0.25rem; /* Space between pagination buttons */
+}