diff --git a/website/main.js b/website/main.js index 8b5a9a1..c99cf5b 100644 --- a/website/main.js +++ b/website/main.js @@ -531,7 +531,15 @@ function hideLoadingIndicator() { function showViewMoreButton() { const postsContainer = document.getElementById("posts"); + const containerDiv = postsContainer.parentElement; // Get the main container + + // Check if button already exists + if (document.getElementById("view-more-button")) { + return; + } + const viewMoreDiv = document.createElement("a"); + viewMoreDiv.id = "view-more-button"; viewMoreDiv.href = "https://bsky.app/profile/lit.mates.dev"; viewMoreDiv.target = "_blank"; viewMoreDiv.className = "view-more-posts"; @@ -541,7 +549,7 @@ function showViewMoreButton() { Follow @lit.mates.dev for more posts `; - postsContainer.appendChild(viewMoreDiv); + containerDiv.appendChild(viewMoreDiv); // Add to main container, not posts container } async function fetchPosts() { diff --git a/website/style.css b/website/style.css index 902ab22..c3e5a85 100644 --- a/website/style.css +++ b/website/style.css @@ -679,6 +679,8 @@ footer a:hover { cursor: pointer; text-decoration: none; display: block; + clear: both; + margin-top: 3rem; } .view-more-posts:hover {