20240814#2
This commit is contained in:
1 parent
72d2445bb2
commit
99f78f7362
11 files changed
+14
-15
No files matched your search
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Infrastructure\Controllers;
|
||||
use Base\Infrastructure\Controllers\AbstractPageController;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
class IndexController extends AbstractPageController {
|
||||
|
||||
/**
|
||||
* @return bool|ResponseInterface
|
||||
*/
|
||||
public function index() : bool|ResponseInterface {
|
||||
try {
|
||||
//$this->addHeader("App-Mode", "Dev");
|
||||
$this->template()->setValue("title", "Главная");
|
||||
}
|
||||
catch(\Throwable $e){$error = $this->checkError($e);}
|
||||
|
||||
return $this->renderResponse("main", "@main/index.tpl", [
|
||||
"date" => (new \DateTime())->format('Y-m-d H:i:s'),
|
||||
"error" => $error ?? null
|
||||
]);
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -0,0 +1,8 @@
|
||||
<article>
|
||||
<main>
|
||||
<div class="main-block">
|
||||
<div class="main-block__header">Hello</div>
|
||||
<div class="main-block__text">Now is <?= $this->date ?></div>
|
||||
</div>
|
||||
</main>
|
||||
</article>
|
||||
Reference in new issue
Block a user