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 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.
+ + + +