aboutsummaryrefslogtreecommitdiffhomepage
path: root/routes/global_timeline.php
diff options
context:
space:
mode:
Diffstat (limited to 'routes/global_timeline.php')
-rw-r--r--routes/global_timeline.php22
1 files changed, 1 insertions, 21 deletions
diff --git a/routes/global_timeline.php b/routes/global_timeline.php
index c32419c..654d2c7 100644
--- a/routes/global_timeline.php
+++ b/routes/global_timeline.php
@@ -5,25 +5,5 @@ use Digitigrade\Timeline\GlobalTimeline;
Router::getInstance()->mount('/feed/global', function (array $args) {
$notes = (new GlobalTimeline())->getNotes();
- ?>
- <!DOCTYPE html>
- <html lang="en">
-
- <head>
- <title>digitigrade global timeline</title>
- </head>
-
- <body>
- <h1>Global timeline</h1>
- <?php foreach ($notes as $n): ?>
- <div style="margin: 8px; padding: 8px; border: 1px solid">
- <b><?= $n->author->displayName ?></b> <small><?= $n->author->uri ?></small><br>
- <p><?= $n->plainContent ?></p>
- <small><?= $n->created->format('c') ?></small>
- </div>
- <?php endforeach; ?>
- </body>
-
- </html>
- <?php
+ render_template('global_timeline', ['notes' => $notes]);
}); \ No newline at end of file