mirror of
https://github.com/litruv/lit.ruv.wtf.git
synced 2026-07-26 03:36:03 +10:00
Add "view more" button to main container and update styles
This commit is contained in:
@@ -531,7 +531,15 @@ function hideLoadingIndicator() {
|
|||||||
|
|
||||||
function showViewMoreButton() {
|
function showViewMoreButton() {
|
||||||
const postsContainer = document.getElementById("posts");
|
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");
|
const viewMoreDiv = document.createElement("a");
|
||||||
|
viewMoreDiv.id = "view-more-button";
|
||||||
viewMoreDiv.href = "https://bsky.app/profile/lit.mates.dev";
|
viewMoreDiv.href = "https://bsky.app/profile/lit.mates.dev";
|
||||||
viewMoreDiv.target = "_blank";
|
viewMoreDiv.target = "_blank";
|
||||||
viewMoreDiv.className = "view-more-posts";
|
viewMoreDiv.className = "view-more-posts";
|
||||||
@@ -541,7 +549,7 @@ function showViewMoreButton() {
|
|||||||
<small>Follow @lit.mates.dev for more posts</small>
|
<small>Follow @lit.mates.dev for more posts</small>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
postsContainer.appendChild(viewMoreDiv);
|
containerDiv.appendChild(viewMoreDiv); // Add to main container, not posts container
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fetchPosts() {
|
async function fetchPosts() {
|
||||||
|
|||||||
@@ -679,6 +679,8 @@ footer a:hover {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
display: block;
|
display: block;
|
||||||
|
clear: both;
|
||||||
|
margin-top: 3rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.view-more-posts:hover {
|
.view-more-posts:hover {
|
||||||
|
|||||||
Reference in New Issue
Block a user