summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--controllers/controllers.php10
-rw-r--r--views/dashboard.php15
-rw-r--r--views/partials/header.php6
3 files changed, 28 insertions, 3 deletions
diff --git a/controllers/controllers.php b/controllers/controllers.php
index 0b63699..ef619a6 100644
--- a/controllers/controllers.php
+++ b/controllers/controllers.php
@@ -41,6 +41,16 @@ function generate_login_token() {
), Config::$jwtSecret);
}
+$app->get('/dashboard', function() use($app) {
+ if($user=require_login($app)) {
+ $html = render('dashboard', array(
+ 'title' => 'Dashboard',
+ 'authorizing' => false
+ ));
+ $app->response()->body($html);
+ }
+});
+
$app->get('/new', function() use($app) {
if($user=require_login($app)) {
$params = $app->request()->params();
diff --git a/views/dashboard.php b/views/dashboard.php
new file mode 100644
index 0000000..3c29f92
--- /dev/null
+++ b/views/dashboard.php
@@ -0,0 +1,15 @@
+<div class="narrow">
+ <?= partial('partials/header') ?>
+
+ <ul style="margin-top: 1em;">
+ <li><a href="/editor">Editor</a></li>
+ <li><a href="/new">Note</a></li>
+ <li><a href="/bookmark">Bookmark</a></li>
+ <li><a href="/favorite">Favorite</a></li>
+ <li><a href="/repost">Repost</a></li>
+ <li><a href="/photo">Photo</a></li>
+ <li><a href="/itinerary">Itinerary</a></li>
+ <li><a href="/email">Email</a></li>
+ </ul>
+
+</div>
diff --git a/views/partials/header.php b/views/partials/header.php
index ef9f15a..4243557 100644
--- a/views/partials/header.php
+++ b/views/partials/header.php
@@ -1,4 +1,4 @@
<div class="header">
- <img src="/images/quill-logo.png" width="42" height="42">
- Quill
-</div> \ No newline at end of file
+ <a href="/dashboard"><img src="/images/quill-logo.png" width="42" height="42"></a>
+ <a href="/dashboard">Quill</a>
+</div>