diff --git a/index.php b/index.php index d8adb6f..47a5c1d 100644 --- a/index.php +++ b/index.php @@ -20,8 +20,26 @@ include 'header.php'; $slogans = file("slogans.txt"); $slogan = $slogans[rand(0, count($slogans) - 1)]; +$activeUsers = json_decode(file_get_contents('/opt/html/online.json'), true); ?> +
+

Użytkownicy online: '; + foreach ($activeUsers as $user) { + $username = htmlspecialchars($user); + echo "$username  "; + } + echo ''; +} else { + echo "/dev/null"; +} + +?>

+ +
+
    /$$               /$$       /$$
   | $$              | $$      | $$
diff --git a/static/css/main.css b/static/css/main.css
index 22096b6..d8932c1 100644
--- a/static/css/main.css
+++ b/static/css/main.css
@@ -103,11 +103,54 @@ footer#footer > *:not(:last-child)::after {
 }
 
 pre.ascii {
+    margin-top: 2rem;
     margin-bottom: 2rem;
     font-size: 1rem;
     overflow: auto;
 }
 
+.scroll {
+    display: flex;
+    overflow: hidden;
+    white-space: pre;
+    align-items: center;
+}
+
+.scroll h3 {
+    flex-shrink:0;
+}
+
+.scroll a:before {
+    content:"~";
+}
+
+.scroll marquee {
+    margin-bottom: -.3rem;
+    width: 60%;
+}
+
+.scroll a {
+    padding: .3rem
+}
+
+.user-list {
+    display: grid;
+    grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
+}
+
+.user-list a {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    flex: 10em;
+    padding-bottom: .3rem;
+    padding-top: .3rem;
+}
+
+.user-list a:before {
+    content:"~";
+}
+
 .user_home {
   display: grid;
   grid-template-columns: 100px 30px 100px 100px 40px 120px 15px;
diff --git a/users.php b/users.php
index a01e73d..62208ae 100644
--- a/users.php
+++ b/users.php
@@ -1,20 +1,45 @@
-
 

> Users

-Lista użytkowników i linki do ich blogów +Lista użytkowników obecnie aktywnych: + +
+ $username"; + } + } else { + echo "..."; + } + + ?> +
+ +
+ +Lista użytkowników i linki do ich blogów: