aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/global_timeline.php2
-rw-r--r--templates/local_timeline.php2
-rw-r--r--templates/note.php29
-rw-r--r--templates/skeleton.php1
4 files changed, 25 insertions, 9 deletions
diff --git a/templates/global_timeline.php b/templates/global_timeline.php
index cdaac5e..bf91df0 100644
--- a/templates/global_timeline.php
+++ b/templates/global_timeline.php
@@ -2,7 +2,7 @@
global $notes;
call_template('alertbox', [
'variety' => 'info',
- 'message' => 'This timeline shows all known public indexable notes'
+ 'message' => 'This timeline shows all known public indexable notes.'
]);
foreach ($notes as $n) {
call_template('note', ['note' => $n]);
diff --git a/templates/local_timeline.php b/templates/local_timeline.php
index a4624b5..f93300a 100644
--- a/templates/local_timeline.php
+++ b/templates/local_timeline.php
@@ -2,7 +2,7 @@
global $notes;
call_template('alertbox', [
'variety' => 'info',
- 'message' => 'This timeline shows all public indexable notes posted by users on this server'
+ 'message' => 'This timeline shows all public indexable notes posted by users on this server.'
]);
foreach ($notes as $n) {
call_template('note', ['note' => $n]);
diff --git a/templates/note.php b/templates/note.php
index 93a22fd..9c4f609 100644
--- a/templates/note.php
+++ b/templates/note.php
@@ -1,12 +1,27 @@
+<?php
+$fullHandle = $note->author->handle . ($note->author->isLocal ? '' : '@' . hostname_from_uri($note->author->uri));
+?>
<article class="note">
- <picture>
- <source srcset="<?= $note->author->avatar ?>">
- <img class="authorAvatar" src="/static/default-avatar.svg">
- </picture>
+ <a href="/@/<?= $fullHandle ?>">
+ <picture>
+ <source srcset="<?= $note->author->avatar ?>">
+ <img class="authorAvatar" src="/static/default-avatar.svg">
+ </picture>
+ </a>
<div>
- <a class="authorName" <?= isset($note->author->homepage) ? 'href="' . $note->author->homepage . '"' : '' ?>>
- <?= $note->author->displayName ?>
- </a>
+ <div class="infoLine">
+ <span class="authorName"><?= $note->author->displayName ?></span>
+ <span class="authorHandle">@<?= $fullHandle ?></span>
+ <span class="timestamp">
+ <?=
+ $note->created->format('Y-m-d \a\t H:i')
+ . (isset($note->modified) && $note->modified != $note->created
+ ? ' (edited ' . $note->modified->format('Y-m-d \a\t H:i') . ')'
+ : ''
+ )
+ ?>
+ </span>
+ </div>
<div class="postContent">
<?= $note->getFormattedContent('text/html') ?? htmlspecialchars($note->plainContent) ?>
</div>
diff --git a/templates/skeleton.php b/templates/skeleton.php
index 5e181b6..8a7fdf1 100644
--- a/templates/skeleton.php
+++ b/templates/skeleton.php
@@ -4,6 +4,7 @@
<head>
<title><?= $pageTitle ?></title>
<link rel="stylesheet" href="/static/style.css">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>