Mirror of Quill
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.1 KiB

  1. <?php
  2. $app->get('/', function($format='html') use($app) {
  3. $res = $app->response();
  4. $params = $app->request()->params();
  5. if (k($params, 'me')) {
  6. $app->redirect('/auth/start?'.http_build_query($params), 302);
  7. }
  8. ob_start();
  9. render('index', array(
  10. 'title' => 'Quill',
  11. 'meta' => '',
  12. 'authorizing' => false
  13. ));
  14. $html = ob_get_clean();
  15. $res->body($html);
  16. });
  17. $app->get('/creating-a-token-endpoint', function() use($app) {
  18. $app->redirect('http://indiewebcamp.com/token-endpoint', 301);
  19. });
  20. $app->get('/creating-a-micropub-endpoint', function() use($app) {
  21. $html = render('creating-a-micropub-endpoint', array('title' => 'Creating a Micropub Endpoint', 'authorizing' => false));
  22. $app->response()->body($html);
  23. });
  24. $app->get('/docs', function() use($app) {
  25. $html = render('docs', array('title' => 'Documentation', 'authorizing' => false));
  26. $app->response()->body($html);
  27. });
  28. $app->get('/privacy', function() use($app) {
  29. $html = render('privacy', array('title' => 'Quill Privacy Policy', 'authorizing' => false));
  30. $app->response()->body($html);
  31. });