Merge pull request #62 from litemotiv/updated_v2

Updated homepage indicator, reduced html output
This commit is contained in:
deepend-tildeclub 2025-01-18 16:04:04 -07:00 committed by GitHub
commit 25369a6f4d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 21 additions and 25 deletions

View File

@ -212,7 +212,7 @@ if (isset($_GET['notice'])) {
// Cache not available or expired
else
{
$homepages_list = '<ul class="user-list">';
$homepages_list = '<div class="user-list">';
foreach (glob("/home/*") as $user) {
// Look for index files with common extensions
@ -232,12 +232,11 @@ if (isset($_GET['notice'])) {
}
$user = basename($user);
$class = $recentChange ? 'recently-updated' : '';
$homepages_list .= '<li class="'.$class.'"><a href="/~'.$user.'/">~'.$user.'</a></li>';
$homepages_list .= '<a href="/~'.$user.'/">'.(($recentChange) ? '<b>~'.$user.'</b>' : '~'.$user).'</a>';
}
$homepages_list .= '</ul>';
$homepages_list .= '</div>';
// Save cache file
$save_cache = file_put_contents($cache_file, $homepages_list);

View File

@ -17,23 +17,6 @@
padding: 1em;
}
.user-list {
display: flex;
flex-flow: row wrap;
justify-content: space-evenly;
list-style-type: none;
padding: 0;
}
.user-list li {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
flex: 10em;
}
.user-list::after {
content: "";
}
body {
margin: auto;
padding: 1em;
@ -140,6 +123,24 @@ code > span.fl {
padding-top: 5px;
}
.user-list {
display: flex;
flex-flow: row wrap;
justify-content: space-evenly;
list-style-type: none;
padding: 0;
}
.user-list a {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
flex: 10em;
}
.user-list b {
background-color: #fb5;
color:#000;
}
input[type="text"],
textarea {
background-color: #333;
@ -294,10 +295,6 @@ pre {
border-radius: 0.25em; /* Slight border radius for better appearance */
padding: 0.5em; /* Padding for better readability */
}
.recently-updated a {
font-weight: bold;
color: #fb5 !important; /* Use !important to override other styles */
}
#active-users {
margin-top: 20px;