Compare commits
4 commits
master
...
engineers-
Author | SHA1 | Date | |
---|---|---|---|
|
72e716dc03 | ||
|
e3a0c6442c | ||
|
2364c224fc | ||
|
c13a18b00b |
8 changed files with 101 additions and 2 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,
|
||||||
|
];
|
|
@ -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,
|
||||||
|
@ -26,4 +34,4 @@ create table if not exists data
|
||||||
raw longtext not null,
|
raw longtext not null,
|
||||||
datatype enum ('content', 'form')
|
datatype enum ('content', 'form')
|
||||||
)
|
)
|
||||||
comment 'DataLoader File';
|
comment 'DataLoader File';
|
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
|
@ -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
|
||||||
|
//
|
||||||
}
|
}
|
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