summaryrefslogtreecommitdiff
path: root/src/templates/index.php
diff options
context:
space:
mode:
authorDavid T. Sadler <davidtsadler@googlemail.com>2021-11-09 20:42:20 +0000
committerDavid T. Sadler <davidtsadler@googlemail.com>2021-11-09 20:42:20 +0000
commitb15a095c0e5f980b63c1b229b0671227bfc64316 (patch)
treef13a3b6f1c2dbc6bca4f0fcb9f59e4a8a4b03628 /src/templates/index.php
parent5c7b4099e2815089cb7bfe49f6b07158c23a8b2f (diff)
Use short echo tags
Diffstat (limited to 'src/templates/index.php')
-rw-r--r--src/templates/index.php10
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>