summaryrefslogtreecommitdiff
path: root/controllers/static.php
blob: bf9740d4fd4a64fbebb8dc7c43a9fc51fd313f59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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);
});