diff options
| author | David T. Sadler <davidtsadler@googlemail.com> | 2021-11-03 22:14:26 +0000 |
|---|---|---|
| committer | David T. Sadler <davidtsadler@googlemail.com> | 2021-11-03 22:14:26 +0000 |
| commit | 745664a1bf36cce13f3439698275b0b147efde3b (patch) | |
| tree | bbd4d48943e8bf63a91d610f6c0c1afcdf707fc5 /src/templates/index.php | |
| parent | 5add8d18e6f984e0e3296a7e092a6a1ef061668f (diff) | |
Improve HTML and CSS
Diffstat (limited to 'src/templates/index.php')
| -rw-r--r-- | src/templates/index.php | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/templates/index.php b/src/templates/index.php index 4f76614..c046e6c 100644 --- a/src/templates/index.php +++ b/src/templates/index.php @@ -4,16 +4,25 @@ <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Bookmarks</title> + <link rel="shortcut icon" href="/images/favicon.png"> + <link rel="stylesheet" href="/css/site.css"> </head> <body> - <?php if ($message) { ?> - <p><?php echo $message; ?></p> - <?php } ?> - <a href="/create">Add</a> - <ul> - <?php foreach ($bookmarks as $bookmark) { ?> - <li><a href="<?php echo htmlentities($bookmark->url); ?>"><?php echo $bookmark->title != '' ? htmlentities($bookmark->title) : htmlentities($bookmark->url); ?></a> <a href="/edit?id=<?php echo $bookmark->id; ?>">Edit</a> | <a href="/delete/confirm?id=<?php echo $bookmark->id; ?>">Delete</a></li> + <section> + <h1>Bookmarks</h1> + <?php if ($message) { ?> + <p class="message"><?php echo $message; ?></p> <?php } ?> - </ul> + <a href="/create">Add Bookmark</a> + <h2>Tags</h2> + <a href="/">All</a> + <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> | <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> + <?php } ?> + </ol> + <p>Copyright © 2021 David T. Sadler.</p> + </section> </body> </html> |
