blob: 55f64e1233a5e7564fd3889b5b77c9a1043e6cae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
<?php
use Digitigrade\Model\Note;
use Digitigrade\Router;
Router::getInstance()->mount('/feed/global', function (array $args) {
// this is really rubbish as it doesn't put them in order, doesn't check visibility/indexable, etc
$posts = Note::findAllWhere('deleted = false', []);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>digitigrade global timeline</title>
</head>
<body>
<h1>Global timeline</h1>
<?php foreach ($posts as $p): ?>
<div style="margin: 8px; padding: 8px; border: 1px solid">
<b><?= $p->author->displayName ?></b> <small><?= $p->author->uri ?></small><br>
<p><?= $p->plainContent ?></p>
<small><?= $p->created->format('c') ?></small>
</div>
<?php endforeach; ?>
</body>
</html>
<?php
});
|