diff --git a/.env.dist b/.env.dist index 9419f8d..ae74f5a 100644 --- a/.env.dist +++ b/.env.dist @@ -9,7 +9,7 @@ # Real environment variables win over .env files. # PROD / DEV -APP_MODE=PROD +APP_MODE=DEV APP_COMPONENTS_FILE=application/config/app.php APP_NODES_FILE=application/config/nodes.php diff --git a/application/config/factories/templateFactory.php b/application/config/factories/templateFactory.php index d025a55..ca27672 100644 --- a/application/config/factories/templateFactory.php +++ b/application/config/factories/templateFactory.php @@ -1,2 +1,2 @@ setSubtemplatePath('/templates'); \ No newline at end of file +return (new \Rmphp\Content\Content('/templates/base.tpl0'))->setSubtemplatePath('/templates'); \ No newline at end of file diff --git a/public/assets/css/style.css b/public/assets/css/style.css index 41e304e..1624be7 100644 --- a/public/assets/css/style.css +++ b/public/assets/css/style.css @@ -15,4 +15,5 @@ body{font-family: Arimo, sans-serif; font-size: 15px; margin: 0; padding: 0;} border: 3px solid #FFF; } -h1{padding: 0 30px} \ No newline at end of file +h1{padding: 0 30px} + diff --git a/public/index.php b/public/index.php index 7a18eaf..6da9507 100644 --- a/public/index.php +++ b/public/index.php @@ -19,7 +19,7 @@ $app = new App(); $response = $app->handler($request, (new Response())->withHeader("Content-Type", "text/html; charset=utf-8")); (new ResponseEmitter())->emit($response); -if(($response->getStatusCode() !== 200 && getenv("APP_MODE") != 'PROD') || in_array("Dev", $response->getHeader("App-Mode"))){ +if(($response->getStatusCode() !== 200 && getenv("APP_MODE") == 'DEV') || in_array("Dev", $response->getHeader("App-Mode"))){ $app->syslogger()->dump("Response", $response); addShutdownInfo($app->syslogger()->getLogs()); } \ No newline at end of file diff --git a/templates/error/404.tpl b/templates/error/404.tpl index 6eac0e4..624dda2 100644 --- a/templates/error/404.tpl +++ b/templates/error/404.tpl @@ -1,10 +1,38 @@ - + - - 404 + + + + 404 Page Not Found + -

Error 404

+
+
404
+
Page Not Found
+
\ No newline at end of file diff --git a/templates/error/501.tpl b/templates/error/501.tpl index 694a0f6..8d76323 100644 --- a/templates/error/501.tpl +++ b/templates/error/501.tpl @@ -1,10 +1,38 @@ - + - - 501 + + + + 501 Not Implemented + -

Error 501

+
+
501
+
Not Implemented
+
\ No newline at end of file diff --git a/templates/main/index.tpl b/templates/main/index.tpl index db397b7..b0149e7 100644 --- a/templates/main/index.tpl +++ b/templates/main/index.tpl @@ -1,5 +1,5 @@
-

Hello. Now is date?>

+

Hello. Now is date?>

\ No newline at end of file