From d34330f52efc16f3d0eea6d792860f9b799e91b5 Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Sun, 19 Apr 2015 10:02:17 -0700 Subject: [PATCH] add /pebble page to use as the client_id --- controllers/controllers.php | 4 +++- controllers/pebble.php | 7 +++++++ views/pebble.php | 21 +++++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 views/pebble.php diff --git a/controllers/controllers.php b/controllers/controllers.php index c47b4b8..221e923 100644 --- a/controllers/controllers.php +++ b/controllers/controllers.php @@ -258,7 +258,9 @@ $app->get('/:domain', function($domain) use($app) { 'newer' => ($newer ? $newer->id : false) )); $app->response()->body($html); -}); +})->conditions(array( + 'domain' => '[a-zA-Z0-9\.-]+\.[a-z]+' +)); $app->get('/:domain/:entry', function($domain, $entry_id) use($app) { diff --git a/controllers/pebble.php b/controllers/pebble.php index 9255d34..069d09f 100644 --- a/controllers/pebble.php +++ b/controllers/pebble.php @@ -1,5 +1,12 @@ get('/pebble', function() use($app) { + $html = render('pebble', array( + 'title' => 'Teacup for Pebble' + )); + $app->response()->body($html); +}); + $app->get('/pebble/settings', function() use($app) { $html = render('pebble-settings-login', array( 'title' => 'Log In', diff --git a/views/pebble.php b/views/pebble.php new file mode 100644 index 0000000..25ea750 --- /dev/null +++ b/views/pebble.php @@ -0,0 +1,21 @@ +
+ +
+

Teacup

+ +

Teacup for Pebble is a simple app for tracking what you are drinking.

+ +

To use Teacup, sign in with your domain. If your website supports Micropub, it will log posts directly to your site. Otherwise, it will post to your profile on teacup.p3k.io.

+ + + +
+ +
+ \ No newline at end of file