diff options
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>  | 
