56 lines
1.6 KiB
PHP
56 lines
1.6 KiB
PHP
|
<!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;
|
||
|
font-family: mono, monospace;
|
||
|
}
|
||
|
#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;
|
||
|
}
|
||
|
a#back {
|
||
|
color: white;
|
||
|
font-family: 'Silkscreen';
|
||
|
text-decoration: none;
|
||
|
}
|
||
|
#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(" "," ",$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;"><</a>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|