From f6c1ad6094c1a5da0b43852d71e4a6e049b4cc45 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 12 Dec 2021 21:20:12 +0100 Subject: [PATCH] css --- htdocs/main.inc.php | 8 +++++++- htdocs/theme/md/style.css.php | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 3e06d0a2a2d..dec6e389156 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -302,7 +302,6 @@ if (!defined('NOSESSION')) { // Init the 5 global objects, this include will make the 'new Xxx()' and set properties for: $conf, $db, $langs, $user, $mysoc require_once 'master.inc.php'; - // If software has been locked. Only login $conf->global->MAIN_ONLY_LOGIN_ALLOWED is allowed. if (!empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED)) { $ok = 0; @@ -364,6 +363,12 @@ if (isset($_SERVER["HTTP_USER_AGENT"])) { } } +// If theme is forced +if (GETPOST('theme', 'aZ09')) { + $conf->theme = GETPOST('theme', 'aZ09'); + $conf->css = "/theme/".$conf->theme."/style.css.php"; +} + // Set global MAIN_OPTIMIZEFORTEXTBROWSER (must be before login part) if (GETPOST('textbrowser', 'int') || (!empty($conf->browser->name) && $conf->browser->name == 'lynxlinks')) { // If we must enable text browser $conf->global->MAIN_OPTIMIZEFORTEXTBROWSER = 1; @@ -1089,6 +1094,7 @@ if (!defined('NOLOGIN')) { } } + // Case forcing style from url if (GETPOST('theme', 'alpha')) { $conf->theme = GETPOST('theme', 'alpha', 1); diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index f8abcceb51c..79d7c929927 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -2717,7 +2717,7 @@ form#login { border: none; /* border-bottom: solid 1px rgba(180,180,180,.4); */ padding: 5px; - margin-left: 18px; + margin-left: 5px; margin-top: 5px; margin-bottom: 5px; }