Replace loading indicator with "view more" button and update styles

This commit is contained in:
2025-10-03 05:26:49 +10:00
parent 34010f80cf
commit 11b35c0af9
2 changed files with 35 additions and 7 deletions

View File

@@ -482,8 +482,9 @@ async function processPostQueue() {
isProcessingQueue = false;
// Hide loading indicator when all posts are processed
// Replace loading indicator with "view more" button when all posts are processed
hideLoadingIndicator();
showViewMoreButton();
}
function layoutPosts(postElements) {
@@ -528,6 +529,21 @@ function hideLoadingIndicator() {
}
}
function showViewMoreButton() {
const postsContainer = document.getElementById("posts");
const viewMoreDiv = document.createElement("a");
viewMoreDiv.href = "https://bsky.app/profile/lit.mates.dev";
viewMoreDiv.target = "_blank";
viewMoreDiv.className = "view-more-posts";
viewMoreDiv.innerHTML = `
<div class="view-more-posts-content">
<strong>View more on Bluesky →</strong><br>
<small>Follow @lit.mates.dev for more posts</small>
</div>
`;
postsContainer.appendChild(viewMoreDiv);
}
async function fetchPosts() {
// Show loading indicator
showLoadingIndicator();