diff options
| author | David T. Sadler <davidtsadler@googlemail.com> | 2021-11-13 09:22:25 +0000 |
|---|---|---|
| committer | David T. Sadler <davidtsadler@googlemail.com> | 2021-11-13 09:22:25 +0000 |
| commit | 40997195b7ee07cb1bda978186c1804371e1f16e (patch) | |
| tree | 17a6e4bd6eaca795cfa8d57b9aa6ea8ad7066593 /src/templates/index.php | |
| parent | 35dc6c245d93560d7ac81df6323e8b22e571aa95 (diff) | |
Create site
Diffstat (limited to 'src/templates/index.php')
| -rw-r--r-- | src/templates/index.php | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/templates/index.php b/src/templates/index.php new file mode 100644 index 0000000..d309b2c --- /dev/null +++ b/src/templates/index.php @@ -0,0 +1,35 @@ +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>Todo</title> + <link rel="shortcut icon" href="/images/favicon.png"> + <link rel="stylesheet" href="/css/site.css"> + </head> + <body> + <section> + <h1>Todo</h1> + <?php if ($message) { ?> + <p class="message"><?= $message; ?></p> + <?php } ?> + <a href="/create/">Add Todo</a> + <h2>Tags</h2> + <ul> + <a href="/">All</a> + <?php foreach($todos->tags() as $tag) { ?> + <li><a href="/?tag=<?= htmlentities($tag); ?>"><?= htmlentities($tag); ?></a></li> + <?php } ?> + </ul> + <h2>Todo</h2> + <ol> + <?php foreach ($todos as $todo) { ?> + <li> + <?= htmlentities($todo->task); ?></a> | <?php if ($todo->tag) { ?><a class="no-decoration tag" href="/?tag=<?= htmlentities($todo->tag); ?>"><?= htmlentities($todo->tag); ?></a> | <?php } ?><a class="no-decoration" href="/edit/?id=<?= $todo->id; ?>">Edit</a> | <a class="no-decoration" href="/delete/confirm/?id=<?= $todo->id; ?>">Delete</a> + </li> + <?php } ?> + </ol> + <p>Copyright © 2021 David T. Sadler.</p> + </section> + </body> +</html> |
