diff options
author | Aaron Parecki <aaron@parecki.com> | 2016-12-17 15:52:33 -0800 |
---|---|---|
committer | Aaron Parecki <aaron@parecki.com> | 2016-12-17 15:52:33 -0800 |
commit | 0a662e33ee432e2583a934cb161a0a1e5b49b76f (patch) | |
tree | 75b0a761d4c17a3b00f50642d068a719112a297e /controllers/static.php | |
parent | 926546106ef2fb35359278b9f08798310e81d8fa (diff) |
move logged-out routes to new file
Diffstat (limited to 'controllers/static.php')
-rw-r--r-- | controllers/static.php | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/controllers/static.php b/controllers/static.php new file mode 100644 index 0000000..bf9740d --- /dev/null +++ b/controllers/static.php @@ -0,0 +1,37 @@ +<?php + +$app->get('/', function($format='html') use($app) { + $res = $app->response(); + $params = $app->request()->params(); + if (k($params, 'me')) { + $app->redirect('/auth/start?'.http_build_query($params), 302); + } + + ob_start(); + render('index', array( + 'title' => 'Quill', + 'meta' => '', + 'authorizing' => false + )); + $html = ob_get_clean(); + $res->body($html); +}); + +$app->get('/creating-a-token-endpoint', function() use($app) { + $app->redirect('http://indiewebcamp.com/token-endpoint', 301); +}); + +$app->get('/creating-a-micropub-endpoint', function() use($app) { + $html = render('creating-a-micropub-endpoint', array('title' => 'Creating a Micropub Endpoint', 'authorizing' => false)); + $app->response()->body($html); +}); + +$app->get('/docs', function() use($app) { + $html = render('docs', array('title' => 'Documentation', 'authorizing' => false)); + $app->response()->body($html); +}); + +$app->get('/privacy', function() use($app) { + $html = render('privacy', array('title' => 'Quill Privacy Policy', 'authorizing' => false)); + $app->response()->body($html); +});
\ No newline at end of file |