mirror of
https://github.com/litruv/lit.ruv.wtf.git
synced 2026-07-25 11:16:02 +10:00
Refactor showViewMoreButton to insert button after posts container
This commit is contained in:
@@ -531,7 +531,6 @@ 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
|
// Check if button already exists
|
||||||
if (document.getElementById("view-more-button")) {
|
if (document.getElementById("view-more-button")) {
|
||||||
@@ -549,7 +548,9 @@ function showViewMoreButton() {
|
|||||||
<small>Follow @lit.mates.dev for more posts</small>
|
<small>Follow @lit.mates.dev for more posts</small>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
containerDiv.appendChild(viewMoreDiv); // Add to main container, not posts container
|
|
||||||
|
// Insert after the posts container but before footer
|
||||||
|
postsContainer.insertAdjacentElement('afterend', viewMoreDiv);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fetchPosts() {
|
async function fetchPosts() {
|
||||||
|
|||||||
Reference in New Issue
Block a user