Test-Branch erstellt, Dev-Area for EngineerTrooper, base Editing, theme create
This commit is contained in:
parent
d3d889dc4c
commit
c13a18b00b
6 changed files with 89 additions and 0 deletions
9
conf/modules.inc.php
Normal file
9
conf/modules.inc.php
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
//register modules -> need to have the Module Class at parent with the init function ;)
|
||||||
|
$modules = [];
|
||||||
|
|
||||||
|
// register controllers that can handle templates ;) need to have a render function for this
|
||||||
|
$controllers = [
|
||||||
|
'test' => \Modules\Engineers\TestController::class,
|
||||||
|
];
|
4
public/theme/engineers-dummy/css/base.css
Normal file
4
public/theme/engineers-dummy/css/base.css
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
body {
|
||||||
|
background-color: #333333;
|
||||||
|
color: #fff;
|
||||||
|
}
|
0
public/theme/engineers-dummy/js/base.js
Normal file
0
public/theme/engineers-dummy/js/base.js
Normal file
29
src/modules/Engineers/TestController.php
Normal file
29
src/modules/Engineers/TestController.php
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
namespace Modules\Engineers;
|
||||||
|
|
||||||
|
|
||||||
|
use Venom\Views\Asset;
|
||||||
|
use Venom\Views\RenderController;
|
||||||
|
use Venom\Views\VenomRenderer;
|
||||||
|
|
||||||
|
class TestController implements RenderController
|
||||||
|
{
|
||||||
|
|
||||||
|
public function register(): bool
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function render(VenomRenderer $renderer): bool
|
||||||
|
{
|
||||||
|
Asset::get()->addCSS('base', 'base.css');
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTemplate(): string
|
||||||
|
{
|
||||||
|
return 'base';
|
||||||
|
}
|
||||||
|
}
|
30
tpl/engineers-dummy/base.php
Normal file
30
tpl/engineers-dummy/base.php
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Venom\Core\Registry;
|
||||||
|
use Venom\Views\Asset;
|
||||||
|
|
||||||
|
$reg = Registry::getInstance();
|
||||||
|
$lang = $reg->getLang();
|
||||||
|
?>
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<?php
|
||||||
|
echo $this->includeTemplate("header/head");
|
||||||
|
?>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<?= $lang->getTranslation("HEADLINE") ?>
|
||||||
|
</header>
|
||||||
|
<main>
|
||||||
|
<h1>Mami ich mag dich</h1>
|
||||||
|
<?php
|
||||||
|
$lang->getTranslation("TEST_TRANSLATION");
|
||||||
|
echo $this->templateData;
|
||||||
|
?>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
Asset::get()->renderJS();
|
||||||
|
?>
|
||||||
|
</body>
|
||||||
|
</html>
|
17
tpl/engineers-dummy/header/head.php
Normal file
17
tpl/engineers-dummy/header/head.php
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<?php
|
||||||
|
//zero stuff, imports, ... , blabla alles was ich Dokumentweit brauche
|
||||||
|
use Venom\Views\Asset;
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport"
|
||||||
|
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
|
<title>Engineers Dummy</title>
|
||||||
|
<?php
|
||||||
|
Asset::get()->renderCSS();
|
||||||
|
?>
|
||||||
|
</head>
|
||||||
|
|
Loading…
Reference in a new issue