diff --git a/brain/controller/IndexControl.inc.php b/brain/controller/IndexControl.inc.php new file mode 100644 index 0000000..1bd56c2 --- /dev/null +++ b/brain/controller/IndexControl.inc.php @@ -0,0 +1,12 @@ +secret; + } + +} \ No newline at end of file diff --git a/brain/data/Auth.inc.php b/brain/data/Auth.inc.php new file mode 100644 index 0000000..0f3e1fc --- /dev/null +++ b/brain/data/Auth.inc.php @@ -0,0 +1,12 @@ +secret; + } + +} \ No newline at end of file diff --git a/brain/data/Settings.inc.php b/brain/data/Settings.inc.php new file mode 100644 index 0000000..485d0d5 --- /dev/null +++ b/brain/data/Settings.inc.php @@ -0,0 +1,15 @@ +folks = json_decode(file_get_contents('config/folks.json'), true); + //return $this->secret; + } + +} \ No newline at end of file diff --git a/brain/views/default/index.twig b/brain/views/default/index.twig new file mode 100644 index 0000000..9a5eb45 --- /dev/null +++ b/brain/views/default/index.twig @@ -0,0 +1,22 @@ + + + + + + + {{ title }} + + + + +

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

+
+
+ {{folks}} has {{ secret }} +
+ + + + \ No newline at end of file diff --git a/config/folks.json b/config/folks.json index ae6ba06..39c388f 100644 --- a/config/folks.json +++ b/config/folks.json @@ -1 +1,14 @@ -[{"id":1,"handle":"ItsRo","avi":"/assets/images/user/2020/09/download20200802144459.png","email":"are0h@protonmail.com","password":"$2b$10$77PMC2W6aZ3gJP7TOA7OpeqQaz..SrRSO74WEa7cn61ehHI55.zKq","key":"fe79df250470815bf32dcea70221384c89163cad3a827a9c3da25d87159ed55a","role":"hnic","created":"2020-09-01T22:46:47+02:00","updated":"2020-09-01T22:46:47+02:00","deleted":null}] +[ + { + "id": 1, + "handle": "ItsRo", + "avi": "/assets/images/user/2020/09/download20200802144459.png", + "email": "are0h@protonmail.com", + "password": "$2b$10$77PMC2W6aZ3gJP7TOA7OpeqQaz..SrRSO74WEa7cn61ehHI55.zKq", + "key": "fe79df250470815bf32dcea70221384c89163cad3a827a9c3da25d87159ed55a", + "role": "hnic", + "created": "2020-09-01T22:46:47+02:00", + "updated": "2020-09-01T22:46:47+02:00", + "deleted": null + } +] \ No newline at end of file diff --git a/config/settings.json b/config/settings.json index 88304d7..4092c25 100644 --- a/config/settings.json +++ b/config/settings.json @@ -1 +1,32 @@ -{"global":{"base_url":"https://fipamo.blog","title":"It's Fipamo","descriptions":"Because it should be easy, boss.","background":"/assets/images/user/2020/09/default-bg.jpg","private":false,"renderOnSave":"false","theme":"fipamo-default","display_limit":5,"port":3314,"last_backup":"2020-09-15T22:14:42+02:00"},"library_stats":{"current_index":5},"email":{"active":"","smtp":{"domain":"","email":"","password":""},"mailgun":{"domain":"","key":""}},"menu":[]} +{ + "global": { + "base_url": "https://fipamo.blog", + "title": "It's Fipamo", + "descriptions": "Because it should be easy, boss.", + "background": "/assets/images/user/2020/09/default-bg.jpg", + "private": false, + "renderOnSave": "false", + "theme": "fipamo-default", + "display_limit": 5, + "port": 3314, + "last_backup": "2020-09-15T22:14:42+02:00" + }, + "library_stats": { + "current_index": 5 + }, + "email": { + "active": "", + "smtp": { + "domain": "", + "email": "", + "password": "" + }, + "mailgun": { + "domain": "", + "key": "" + } + }, + "menu": [ + + ] +} \ No newline at end of file diff --git a/dashboard.php b/dashboard.php new file mode 100644 index 0000000..ff7916c --- /dev/null +++ b/dashboard.php @@ -0,0 +1,33 @@ +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 new file mode 100644 index 0000000..b78e708 --- /dev/null +++ b/index.html @@ -0,0 +1 @@ +This is the index \ No newline at end of file diff --git a/index.php b/index.php deleted file mode 100644 index 01f522c..0000000 --- a/index.php +++ /dev/null @@ -1,22 +0,0 @@ - 'cache']); -$app->add(TwigMiddleware::create($app, $twig)); - -$app->get('/', function (Request $request, Response $response, $args) { - - $view = Twig::fromRequest($request); - return $view->render($response, 'index.twig', [ - 'name' => 'Ro', - 'occupation'=>'That Dude' - ]); -}); - -$app->run();