diff options
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/global_timeline.php | 6 | ||||
| -rw-r--r-- | templates/note.php | 11 | ||||
| -rw-r--r-- | templates/skeleton.php | 22 |
3 files changed, 39 insertions, 0 deletions
diff --git a/templates/global_timeline.php b/templates/global_timeline.php new file mode 100644 index 0000000..dbecd7b --- /dev/null +++ b/templates/global_timeline.php @@ -0,0 +1,6 @@ +<?php call_template('skeleton', ['pageTitle' => 'Global timeline'], function () { + global $notes; + foreach ($notes as $n) { + call_template('note', ['note' => $n]); + } +});
\ No newline at end of file diff --git a/templates/note.php b/templates/note.php new file mode 100644 index 0000000..c3ec9fd --- /dev/null +++ b/templates/note.php @@ -0,0 +1,11 @@ +<article class="note"> + <img class="authorAvatar" src="<?= $note->author->avatar ?>"> + <div> + <a class="authorName" <?= isset($note->author->homepage) ? 'href="' . $note->author->homepage . '"' : '' ?>> + <?= $note->author->displayName ?> + </a> + <div class="postContent"> + <?= $note->plainContent ?> + </div> + </div> +</article>
\ No newline at end of file diff --git a/templates/skeleton.php b/templates/skeleton.php new file mode 100644 index 0000000..d1e08e0 --- /dev/null +++ b/templates/skeleton.php @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<html lang="en"> + +<head> + <title><?= $pageTitle ?></title> + <link rel="stylesheet" href="/static/style.css"> +</head> + +<body> + <header> + <span id="siteTitle">Digitigrade???????</span> + <nav> + <span>navigation links go here i suppose?</span> + </nav> + </header> + <main> + <h1><?= $pageTitle ?></h1> + <?php slot(); ?> + </main> +</body> + +</html>
\ No newline at end of file |
