Refactor entry handling: update date format, enhance entry retrieval, and improve HTML structure

This commit is contained in:
marc-go committed 2026-10-07 19:22:40 +02:00
1 parent ff2afb4441
commit fd1b8d9a0b
7 files changed
+15 -7

No files matched your search

+3 -2
View File
@@ -19,10 +19,11 @@ $url = "http://" . APP_DOMAIN . "/api/entrys/get.php";
$response = file_get_contents($url);
$response = json_decode($response, true);
if ($response["data"]["empty"]) {
$html_block = "<p>There aren'n any entrys yet. Be the first one!</p>";
}else{
$entrys = $response["data"]["entrys"];
$entrys = json_decode($response["data"]["entrys"], true);
$html_block = "";
foreach($entrys as $entry) {
@@ -32,7 +33,7 @@ if ($response["data"]["empty"]) {
$html_block .= '
<div class="entry">
<h3>' . $name . '</h3>
<h3 class="md-typescale-display-small">' . $name . '</h3>
<p id="date">' . $date . '</p>
<p>' . $text . '</p>
</div>
@@ -36,6 +36,10 @@
justify-content: center;
align-items: center;
}
#date {
color: gray;
}
</style>
</head>
<body>