diff --git a/cp/app/Controllers/SupportController.php b/cp/app/Controllers/SupportController.php index 1ef2314..8b9988f 100644 --- a/cp/app/Controllers/SupportController.php +++ b/cp/app/Controllers/SupportController.php @@ -328,11 +328,19 @@ class SupportController extends Controller public function docs(Request $request, Response $response) { - return view($response,'admin/support/docs.twig'); + $basePath = '/var/www/cp/resources/views/'; + $template = file_exists($basePath . 'admin/support/docs.custom.twig') + ? 'admin/support/docs.custom.twig' + : 'admin/support/docs.twig'; + return view($response, $template); } public function mediakit(Request $request, Response $response) { - return view($response,'admin/support/mediakit.twig'); + $basePath = '/var/www/cp/resources/views/'; + $template = file_exists($basePath . 'admin/support/mediakit.custom.twig') + ? 'admin/support/mediakit.custom.twig' + : 'admin/support/mediakit.twig'; + return view($response, $template); } } \ No newline at end of file diff --git a/cp/bootstrap/app.php b/cp/bootstrap/app.php index 3dc4517..60e1caa 100644 --- a/cp/bootstrap/app.php +++ b/cp/bootstrap/app.php @@ -121,6 +121,17 @@ $container->set('view', function ($container) { $view->getEnvironment()->addGlobal('uiLang', $uiLang); $view->getEnvironment()->addGlobal('lang', $lang); $view->getEnvironment()->addGlobal('flash', $container->get('flash')); + + $staticDir = '/var/www/cp/public/static'; + if (file_exists($staticDir . '/logo.svg')) { + $logoPath = '/static/logo.svg'; + } elseif (file_exists($staticDir . '/logo.png')) { + $logoPath = '/static/logo.png'; + } else { + $logoPath = '/static/logo.default.svg'; + } + $view->getEnvironment()->addGlobal('logoPath', $logoPath); + if (isset($_SESSION['_screen_mode'])) { $view->getEnvironment()->addGlobal('screen_mode', $_SESSION['_screen_mode']); } else { diff --git a/cp/public/static/logo.svg b/cp/public/static/logo.default.svg similarity index 100% rename from cp/public/static/logo.svg rename to cp/public/static/logo.default.svg diff --git a/cp/resources/views/admin/support/docs.twig b/cp/resources/views/admin/support/docs.twig index 9385903..9014461 100644 --- a/cp/resources/views/admin/support/docs.twig +++ b/cp/resources/views/admin/support/docs.twig @@ -37,8 +37,9 @@ -