small update

This commit is contained in:
2025-07-07 03:11:52 -04:00
parent 75a0840ca1
commit 389107e06d
2 changed files with 139 additions and 138 deletions

View File

@@ -65,7 +65,7 @@
<h2 class="text-3xl minecraft-font mb-8 text-center bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
Public Server List</h2>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed text-center">
Discover servers publically hosted on My-MC.<BR>Our public Realms list resets daily at 12 AM EST daily.
Discover servers publically hosted on My-MC.<BR>Our public Realms list resets daily at 12 AM EST.
</p>
<div class="search-container">
<input type="text" id="search-input" class="search-input" placeholder="Search by owner, MOTD, version, or status...">

View File

@@ -1,5 +1,5 @@
// Function to copy text to clipboard and trigger animation
function copyToClipboard(text, button) {
// Function to copy text to clipboard and trigger animation
function copyToClipboard(text, button) {
navigator.clipboard.writeText(text).then(() => {
button.classList.add('copied');
setTimeout(() => {
@@ -8,10 +8,11 @@
}).catch(err => {
console.error('Failed to copy:', err);
});
}
}
// Function to create a server card
function createServerCard(server, isNew = false) {
// Function to create a server card
// Function to create a server card
function createServerCard(server, isNew = false) {
const ownerName = server.ops && server.ops.length > 0 ? server.ops[0].name : 'Unknown';
const serverCard = document.createElement('div');
serverCard.className = `feature-card tilt-card ${isNew ? 'new-server-animation' : ''}`;
@@ -40,10 +41,10 @@
</div>
`;
return serverCard;
}
}
// Function to update server list dynamically
function updateServerList(newServers) {
// Function to update server list dynamically
function updateServerList(newServers) {
const serverList = document.getElementById('server-list');
const currentCards = Array.from(serverList.children);
const currentConnects = currentCards.map(card => card.dataset.connect);
@@ -82,10 +83,10 @@
removed: serversToRemove.length,
total: newServers.length
});
}
}
// Function to fetch and display servers
async function fetchServers() {
// Function to fetch and display servers
async function fetchServers() {
const serverList = document.getElementById('server-list');
const loadingMessage = document.getElementById('loading-message');
const errorMessage = document.getElementById('error-message');
@@ -141,10 +142,10 @@
errorMessage.classList.remove('hidden');
console.error('Error fetching servers:', error);
}
}
}
// Initial fetch
fetchServers();
// Initial fetch
fetchServers();
// Fetch servers every 60 seconds
setInterval(fetchServers, 60000);
// Fetch servers every 60 seconds
setInterval(fetchServers, 60000);