aboutsummaryrefslogtreecommitdiff
path: root/stuff/webgarden/status.php
diff options
context:
space:
mode:
Diffstat (limited to 'stuff/webgarden/status.php')
-rw-r--r--stuff/webgarden/status.php49
1 files changed, 49 insertions, 0 deletions
diff --git a/stuff/webgarden/status.php b/stuff/webgarden/status.php
new file mode 100644
index 0000000..4330d31
--- /dev/null
+++ b/stuff/webgarden/status.php
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Status</title>
+ <link href="style.css" rel="stylesheet" type="text/css" media="all">
+ <style type="text/css">
+ body {
+ background: #222222;
+ }
+ #statuscafe a {
+ color: #df1955;
+ }
+ #statuscafe a:hover {
+ color: #00ffd5;
+ }
+ #statuscafe {
+ display: flex;
+ flex-direction: column;
+ position: absolute;
+ left: 10px;
+ top: 10px;
+ height: 230px;
+ width: 230px;
+ justify-content: center;
+ align-items: center;
+ }
+ #statuscafe-content {
+ margin-top: 10px;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="plant">
+ <?php
+ $username = "niceopod"; // Your username here!
+ $status_data = json_decode(file_get_contents("https://status.cafe/users/$username/status.json"), true);
+ $content = $status_data["content"];
+ $face = $status_data["face"];
+ $timeago = str_replace(" ","&nbsp;",$status_data["timeAgo"]);
+ if(strlen($content) < 1) {
+ $content = "No status yet.";
+ }
+ echo "<div id='statuscafe'><div id='statuscafe-username'><a href='https://status.cafe/users/$username' target='_blank'>$username</a> $face $timeago</div><div id='statuscafe-content'>$content</div></div>";
+ ?>
+ <a id="back" href="index.php" style="font-size: 2em; position: absolute; left: 4px; top: 218px;">&lt;</a>
+ </div>
+ </body>
+</html>