Add "view more" button to main container and update styles

This commit is contained in:
2025-10-03 05:29:34 +10:00
parent 11b35c0af9
commit 5cdb914e76
2 changed files with 11 additions and 1 deletions

View File

@@ -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() {
<small>Follow @lit.mates.dev for more posts</small>
</div>
`;
postsContainer.appendChild(viewMoreDiv);
containerDiv.appendChild(viewMoreDiv); // Add to main container, not posts container
}
async function fetchPosts() {

View File

@@ -679,6 +679,8 @@ footer a:hover {
cursor: pointer;
text-decoration: none;
display: block;
clear: both;
margin-top: 3rem;
}
.view-more-posts:hover {