Merge branch 'devel/chris'
This commit is contained in:
commit
8fe41185cd
@ -23,8 +23,10 @@ class MainController extends WebrootController
|
|||||||
return $this->redirectToRoute("app_login");
|
return $this->redirectToRoute("app_login");
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->render('main/index.html.twig', [
|
return $this->render('main/index.html.twig', array_merge(
|
||||||
|
$this->getControllerVariables(),
|
||||||
|
[
|
||||||
'user' => $user,
|
'user' => $user,
|
||||||
]);
|
]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,8 +8,25 @@ use Symfony\Component\Routing\Attribute\Route;
|
|||||||
|
|
||||||
abstract class WebrootController extends AbstractController
|
abstract class WebrootController extends AbstractController
|
||||||
{
|
{
|
||||||
protected function getDefaultVariables()
|
public function getHeaderTitleFiglet(): ?string
|
||||||
{
|
{
|
||||||
|
$header_title_figlet_file = getenv("HEADER_TITLE_FIGLET");
|
||||||
|
if ($header_title_figlet_file && strlen($header_title_figlet_file)) {
|
||||||
|
$figlet_file = fopen($header_title_figlet_file,"r");
|
||||||
|
$header_figlet = fread($figlet_file, filesize($header_title_figlet_file));
|
||||||
|
fclose($figlet_file);
|
||||||
|
$title = "<div class=\"center\"><pre>"
|
||||||
|
. $header_figlet
|
||||||
|
. "</pre></div>";
|
||||||
|
return $title;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getControllerVariables(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
"header_title_figlet" => $this->getHeaderTitleFiglet(),
|
||||||
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,14 +14,14 @@
|
|||||||
<body style="margin:0px;padding:0px;">
|
<body style="margin:0px;padding:0px;">
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<header class="header" style="color:lightgrey;padding:0px 5px 0px 5px;margin:0px;">
|
<header class="header" style="color:lightgrey;padding:0px 5px 0px 5px;margin:0px;">
|
||||||
{% block header %}
|
{% block header %}{% if header_title|default(null) %}{{ header_title|raw }}{% else %}
|
||||||
<div class="center"><pre>
|
<div class="center"><pre>
|
||||||
_ _
|
_ _
|
||||||
__ _____| |__ _ __ ___ ___ | |_
|
__ _____| |__ _ __ ___ ___ | |_
|
||||||
\ \ /\ / / _ \ '_ \| '__/ _ \ / _ \| __|
|
\ \ /\ / / _ \ '_ \| '__/ _ \ / _ \| __|
|
||||||
\ V V / __/ |_) | | | (_) | (_) | |_
|
\ V V / __/ |_) | | | (_) | (_) | |_
|
||||||
\_/\_/ \___|_.__/|_| \___/ \___/ \__|
|
\_/\_/ \___|_.__/|_| \___/ \___/ \__|
|
||||||
</pre></div>
|
</pre></div>{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
|
|||||||
6
templates/mydevel.txt
Normal file
6
templates/mydevel.txt
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
_ _ _
|
||||||
|
_ __ ___ _ _ __| | _____ _____| | __ _| |_
|
||||||
|
| '_ ` _ \| | | |/ _` |/ _ \ \ / / _ \ | / _` | __|
|
||||||
|
| | | | | | |_| | (_| | __/\ V / __/ || (_| | |_
|
||||||
|
|_| |_| |_|\__, |\__,_|\___| \_/ \___|_(_)__,_|\__|
|
||||||
|
|___/
|
||||||
Loading…
Reference in New Issue
Block a user