diff options
Diffstat (limited to 'src/templates/index.php')
| -rw-r--r-- | src/templates/index.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/templates/index.php b/src/templates/index.php index f078bbd..ff67458 100644 --- a/src/templates/index.php +++ b/src/templates/index.php @@ -11,20 +11,24 @@ <section> <h1>Bookmarks</h1> <?php if ($message) { ?> - <p class="message"><?php echo $message; ?></p> + <p class="message"><?= $message; ?></p> <?php } ?> <a href="/create">Add Bookmark</a> <h2>Tags</h2> <ul> <a href="/">All</a> <?php foreach($bookmarks->tags() as $tag) { ?> - <li><a href="/?tag=<?php echo htmlentities($tag); ?>"><?php echo htmlentities($tag); ?></a></li> + <li><a href="/?tag=<?= htmlentities($tag); ?>"><?= htmlentities($tag); ?></a></li> <?php } ?> </ul> <h2>Bookmarks</h2> <ol> <?php foreach ($bookmarks as $bookmark) { ?> - <li><a href="<?php echo htmlentities($bookmark->url); ?>"><?php echo (new DateTime($bookmark->addedAt))->format('Y-m-d'); ?> - <?php echo $bookmark->title != '' ? htmlentities($bookmark->title) : htmlentities($bookmark->url); ?></a> | <?php if ($bookmark->tag) { ?><a class="no-decoration tag" href="/?tag=<?php echo htmlentities($bookmark->tag); ?>"><?php echo htmlentities($bookmark->tag); ?></a> | <?php } ?><a class="no-decoration" href="/edit?id=<?php echo $bookmark->id; ?>">Edit</a> | <a class="no-decoration" href="/delete/confirm?id=<?php echo $bookmark->id; ?>">Delete</a></li> + <li> + <a href="<?= htmlentities($bookmark->url); ?>"> + <?= (new DateTime($bookmark->addedAt))->format('Y-m-d'); ?> - <?= $bookmark->title != '' ? htmlentities($bookmark->title) : htmlentities($bookmark->url); ?></a> | <?php if ($bookmark->tag) { ?><a class="no-decoration tag" href="/?tag=<?= htmlentities($bookmark->tag); ?>"><?= htmlentities($bookmark->tag); ?></a> | <?php } ?><a class="no-decoration" href="/edit?id=<?= $bookmark->id; ?>">Edit</a> | <a class="no-decoration" href="/delete/confirm?id=<?= $bookmark->id; ?>">Delete + </a> + </li> <?php } ?> </ol> <p>Copyright © 2021 David T. Sadler.</p> |
