Compare commits

...

4 commits

8 changed files with 101 additions and 2 deletions

9
conf/modules.inc.php Normal file
View 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,
];

View file

@ -7,6 +7,14 @@ create table if not exists seoData
) )
comment 'seo url mapping'; comment 'seo url mapping';
create table if not exists metaTagData
(
id int(255) auto_increment not null unique primary key,
content JSON not null,
isActive tinyint(1) default 1 null
)
comment 'Meta Tag File';
create table if not exists language create table if not exists language
( (
id int(255) auto_increment not null unique primary key, id int(255) auto_increment not null unique primary key,

View file

@ -0,0 +1,4 @@
body {
background-color: #333333;
color: #fff;
}

View file

View file

@ -10,5 +10,7 @@ namespace Venom\Helper;
*/ */
class MetaGenerator class MetaGenerator
{ {
//config erweitern, dass die Klasse ausgeschaltet werden kann
//ArgumentHandler muss die SEO-Urls mit der ID von der metaData gefüttert werden
//
} }

View 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';
}
}

View 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>

View 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>