Loading core/modules/system/src/Theme/DbUpdateNegotiator.php +14 −4 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ namespace Drupal\system\Theme; use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Extension\ThemeHandlerInterface; use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Site\Settings; use Drupal\Core\Theme\ThemeNegotiatorInterface; Loading @@ -19,14 +20,24 @@ class DbUpdateNegotiator implements ThemeNegotiatorInterface { */ protected $configFactory; /** * The theme handler. * * @var \Drupal\Core\Extension\ThemeHandlerInterface */ protected $themeHandler; /** * Constructs a DbUpdateNegotiator. * * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. * @param \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler * The theme handler. */ public function __construct(ConfigFactoryInterface $config_factory) { public function __construct(ConfigFactoryInterface $config_factory, ThemeHandlerInterface $theme_handler) { $this->configFactory = $config_factory; $this->themeHandler = $theme_handler; } /** Loading @@ -40,10 +51,9 @@ public function applies(RouteMatchInterface $route_match) { * {@inheritdoc} */ public function determineActiveTheme(RouteMatchInterface $route_match) { $custom_theme = Settings::get('maintenance_theme', 'seven'); $custom_theme = Settings::get('maintenance_theme'); if (!$custom_theme) { $config = $this->configFactory->get('system.theme'); $custom_theme = $config->get('default'); $custom_theme = $this->themeHandler->themeExists('claro') ? 'claro' : 'seven'; } return $custom_theme; Loading core/modules/system/system.services.yml +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ services: - { name: theme_negotiator, priority: 1000 } theme.negotiator.system.db_update: class: Drupal\system\Theme\DbUpdateNegotiator arguments: ['@config.factory'] arguments: ['@config.factory', '@theme_handler'] tags: - { name: theme_negotiator, priority: 100 } system.config_subscriber: Loading core/themes/claro/css/theme/maintenance-page.css +17 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,10 @@ background-color: var(--color-gray-100); } .title { margin-top: 0; } .site-name { margin-top: var(--space-m); word-wrap: break-word; Loading Loading @@ -179,6 +183,19 @@ [dir="rtl"] .layout-sidebar-first { float: right; } /* Positioning sidebar & content */ main { float: left; /* LTR */ clear: none; box-sizing: border-box; width: 65%; padding-left: 3.85em; /* LTR */ } [dir="rtl"] main { float: right; padding-right: 3.85em; padding-left: 0; } } /** Loading core/themes/claro/css/theme/maintenance-page.pcss.css +17 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,10 @@ background-color: var(--color-gray-100); } .title { margin-top: 0; } .site-name { margin-top: var(--space-m); word-wrap: break-word; Loading Loading @@ -169,6 +173,19 @@ [dir="rtl"] .layout-sidebar-first { float: right; } /* Positioning sidebar & content */ main { float: left; /* LTR */ clear: none; box-sizing: border-box; width: 65%; padding-left: 3.85em; /* LTR */ } [dir="rtl"] main { float: right; padding-right: 3.85em; padding-left: 0; } } /** Loading Loading
core/modules/system/src/Theme/DbUpdateNegotiator.php +14 −4 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ namespace Drupal\system\Theme; use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Extension\ThemeHandlerInterface; use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Site\Settings; use Drupal\Core\Theme\ThemeNegotiatorInterface; Loading @@ -19,14 +20,24 @@ class DbUpdateNegotiator implements ThemeNegotiatorInterface { */ protected $configFactory; /** * The theme handler. * * @var \Drupal\Core\Extension\ThemeHandlerInterface */ protected $themeHandler; /** * Constructs a DbUpdateNegotiator. * * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. * @param \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler * The theme handler. */ public function __construct(ConfigFactoryInterface $config_factory) { public function __construct(ConfigFactoryInterface $config_factory, ThemeHandlerInterface $theme_handler) { $this->configFactory = $config_factory; $this->themeHandler = $theme_handler; } /** Loading @@ -40,10 +51,9 @@ public function applies(RouteMatchInterface $route_match) { * {@inheritdoc} */ public function determineActiveTheme(RouteMatchInterface $route_match) { $custom_theme = Settings::get('maintenance_theme', 'seven'); $custom_theme = Settings::get('maintenance_theme'); if (!$custom_theme) { $config = $this->configFactory->get('system.theme'); $custom_theme = $config->get('default'); $custom_theme = $this->themeHandler->themeExists('claro') ? 'claro' : 'seven'; } return $custom_theme; Loading
core/modules/system/system.services.yml +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ services: - { name: theme_negotiator, priority: 1000 } theme.negotiator.system.db_update: class: Drupal\system\Theme\DbUpdateNegotiator arguments: ['@config.factory'] arguments: ['@config.factory', '@theme_handler'] tags: - { name: theme_negotiator, priority: 100 } system.config_subscriber: Loading
core/themes/claro/css/theme/maintenance-page.css +17 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,10 @@ background-color: var(--color-gray-100); } .title { margin-top: 0; } .site-name { margin-top: var(--space-m); word-wrap: break-word; Loading Loading @@ -179,6 +183,19 @@ [dir="rtl"] .layout-sidebar-first { float: right; } /* Positioning sidebar & content */ main { float: left; /* LTR */ clear: none; box-sizing: border-box; width: 65%; padding-left: 3.85em; /* LTR */ } [dir="rtl"] main { float: right; padding-right: 3.85em; padding-left: 0; } } /** Loading
core/themes/claro/css/theme/maintenance-page.pcss.css +17 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,10 @@ background-color: var(--color-gray-100); } .title { margin-top: 0; } .site-name { margin-top: var(--space-m); word-wrap: break-word; Loading Loading @@ -169,6 +173,19 @@ [dir="rtl"] .layout-sidebar-first { float: right; } /* Positioning sidebar & content */ main { float: left; /* LTR */ clear: none; box-sizing: border-box; width: 65%; padding-left: 3.85em; /* LTR */ } [dir="rtl"] main { float: right; padding-right: 3.85em; padding-left: 0; } } /** Loading