* update layout and bootstrap package

* update templates

Co-authored-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Maurice Preuß
2022-02-16 09:57:17 +01:00
committed by GitHub
parent 3ba196fec6
commit f7db5497af
27 changed files with 55286 additions and 506 deletions

View File

@@ -18,24 +18,33 @@
// define default theme for configurehint, etc.
$_deftheme = 'Froxlor';
// validate correct php version
if (version_compare("7.1.0", PHP_VERSION, ">=")) {
// get hint-template
$wrongphp_hint = file_get_contents(dirname(__DIR__) . '/templates/' . $_deftheme . '/misc/phprequirementfailed.html.twig');
// replace values
$wrongphp_hint = str_replace("<FROXLOR_PHPMIN>", "7.1.0", $wrongphp_hint);
$wrongphp_hint = str_replace("<CURRENT_VERSION>", PHP_VERSION, $wrongphp_hint);
$wrongphp_hint = str_replace("<CURRENT_YEAR>", date('Y', time()), $wrongphp_hint);
die($wrongphp_hint);
function view($template, $attributes) {
$view = file_get_contents(dirname(__DIR__) . '/templates/' . $template);
return str_replace(array_keys($attributes), array_values($attributes), $view);
}
// validate correct php version
if (version_compare("7.1.0", PHP_VERSION, ">=")) {
die(
view($_deftheme . '/misc/phprequirementfailed.html.twig', [
'{{ basehref }}' => '../',
'{{ froxlor_min_version }}' => '7.1.0',
'{{ current_version }}' => PHP_VERSION,
'{{ current_year }}' => date('Y', time()),
])
);
}
// validate vendor autoloader
if (!file_exists(dirname(__DIR__) . '/vendor/autoload.php')) {
// get hint-template
$vendor_hint = file_get_contents(dirname(__DIR__) . '/templates/' . $_deftheme . '/misc/vendormissinghint.html.twig');
// replace values
$vendor_hint = str_replace("<FROXLOR_INSTALL_DIR>", dirname(__DIR__), $vendor_hint);
$vendor_hint = str_replace("<CURRENT_YEAR>", date('Y', time()), $vendor_hint);
die($vendor_hint);
die(
view($_deftheme . '/misc/vendormissinghint.html.twig', [
'{{ basehref }}' => '../',
'{{ froxlor_install_dir }}' => dirname(__DIR__),
'{{ current_year }}' => date('Y', time()),
])
);
}
require dirname(__DIR__) . '/vendor/autoload.php';