Browse Source

add dashboard with links to all post types

pull/35/head
Aaron Parecki 9 years ago
parent
commit
704241a3a4
  1. 10
      controllers/controllers.php
  2. 15
      views/dashboard.php
  3. 6
      views/partials/header.php

10
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();

15
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>

6
views/partials/header.php

@ -1,4 +1,4 @@
<div class="header">
<img src="/images/quill-logo.png" width="42" height="42">
Quill
</div>
<a href="/dashboard"><img src="/images/quill-logo.png" width="42" height="42"></a>
<a href="/dashboard">Quill</a>
</div>
Loading…
Cancel
Save