Refactor active users display with marquee

This commit is contained in:
deepend-tildeclub
2026-01-02 20:45:59 -07:00
committed by GitHub
parent a32d553d27
commit b70b29de4c

View File

@@ -6,29 +6,28 @@
<!-- <p class="advisory">GMAIL USERS: We no longer accept gmail.com addresses for signups since you would not receive your account> --> <!-- <p class="advisory">GMAIL USERS: We no longer accept gmail.com addresses for signups since you would not receive your account> -->
<!-- Active Users Scrolling List --> <!-- Active Users Scrolling List -->
<div class="active-users-container"> <div id="active-users">
<h2 style="display: inline;">Currently Active Users:</h2> <h2>Currently Active Users:</h2>
<div class="active-users-list">
<ul>
<?php <?php
$activeUsers = json_decode(file_get_contents('online-users.json'), true); $activeUsers = json_decode(file_get_contents('/usr/share/nginx/html/online-users.json'), true);
if (!empty($activeUsers)) { if (!empty($activeUsers))
foreach ($activeUsers as $user) { {
$username = htmlspecialchars($user); echo '<marquee scrollamount="2">';
echo "<li><a href='/~$username'>$username</a></li>";
} foreach ($activeUsers as $user)
// Repeat the list for seamless scrolling {
foreach ($activeUsers as $user) { $username = htmlspecialchars($user);
$username = htmlspecialchars($user); echo "<a href='/~$username'>$username</a> &nbsp;";
echo "<li><a href='/~$username'>$username</a></li>"; }
}
} else { echo '</marquee>';
echo "<li>No active users at the moment.</li>"; }
} else
{
echo "<li>No active users at the moment.</li>";
}
?> ?>
</ul>
</div>
</div> </div>
<?php <?php
// Load the HTML from inn_status.html // Load the HTML from inn_status.html