diff --git a/brain/views/default/index.twig b/brain/views/default/index.twig index 9a5eb45..2a5facd 100644 --- a/brain/views/default/index.twig +++ b/brain/views/default/index.twig @@ -1,22 +1,26 @@ - - - - {{ title }} - + + + + {{ title }} + - + -

- {{ name }} is a {{ occupation }} -

-
-
- {{folks}} has {{ secret }} -
+

+ {{ name }} + is a + {{ occupation }} +

+
+
+ {{ folks }} + has + {{ secret }} +
- + \ No newline at end of file diff --git a/dashboard.php b/dashboard.php deleted file mode 100644 index ff7916c..0000000 --- a/dashboard.php +++ /dev/null @@ -1,33 +0,0 @@ -add(TwigMiddleware::create($app, $twig)); - -//Dashboard Index -$app->get('/dashboard', function (Request $request, Response $response) { - $index = new IndexControl(); - $settings = new Settings(); - $folks = $settings->getFolks(); - $secret = $index->getSecret(); - $view = Twig::fromRequest($request); - - return $view->render($response, 'index.twig', [ - 'title' => 'This is Fipamo', - 'name' => 'Ro', - 'occupation'=>'pretty cool... I guess', - 'folks' => $folks[0]['handle'], - 'secret' => $secret - ]); -}); - -$app->run(); diff --git a/index.html b/index.html deleted file mode 100644 index b78e708..0000000 --- a/index.html +++ /dev/null @@ -1 +0,0 @@ -This is the index \ No newline at end of file diff --git a/index.php b/index.php new file mode 100644 index 0000000..304dcb0 --- /dev/null +++ b/index.php @@ -0,0 +1,59 @@ +add(TwigMiddleware::create($app, $twig)); + +//Index +$app->get('/[{first}[/{second}]]', function (Request $request, Response $response, array $args) { + + if(isset($args['first'])) + { + $first = $args['first']; + if(is_numeric($first)) + { + $response->getBody()->write("FIND A PAGE, B!"); + }else{ + $response->getBody()->write("This is the dash, brah!"); + }; + }else{ + $response->getBody()->write("No Params, Homie!"); + } + + if(isset($args['second'])) + { + $year = $args['second']; + }; + + + return $response; +}); + +//Dashboard Index +/** +$app->get('/@/dashboard', function (Request $request, Response $response) { + $index = new IndexControl(); + $settings = new Settings(); + $folks = $settings->getFolks(); + $secret = $index->getSecret(); + $view = Twig::fromRequest($request); + + return $view->render($response, 'index.twig', [ + 'title' => 'This is Fipamo', + 'name' => 'Ro', + 'occupation'=>'pretty cool... I guess', + 'folks' => $folks[0]['handle'], + 'secret' => $secret + ]); +}); +**/ +$app->run(); \ No newline at end of file