Issue #3279640 by alexpott, Spokje, mherchel, lauriii, catch: Standard install profile uses Olivero for update.php
parent
34915ec2ce
commit
0f3e14a9f4
|
@ -3,6 +3,7 @@
|
||||||
namespace Drupal\system\Theme;
|
namespace Drupal\system\Theme;
|
||||||
|
|
||||||
use Drupal\Core\Config\ConfigFactoryInterface;
|
use Drupal\Core\Config\ConfigFactoryInterface;
|
||||||
|
use Drupal\Core\Extension\ThemeHandlerInterface;
|
||||||
use Drupal\Core\Routing\RouteMatchInterface;
|
use Drupal\Core\Routing\RouteMatchInterface;
|
||||||
use Drupal\Core\Site\Settings;
|
use Drupal\Core\Site\Settings;
|
||||||
use Drupal\Core\Theme\ThemeNegotiatorInterface;
|
use Drupal\Core\Theme\ThemeNegotiatorInterface;
|
||||||
|
@ -19,14 +20,24 @@ class DbUpdateNegotiator implements ThemeNegotiatorInterface {
|
||||||
*/
|
*/
|
||||||
protected $configFactory;
|
protected $configFactory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The theme handler.
|
||||||
|
*
|
||||||
|
* @var \Drupal\Core\Extension\ThemeHandlerInterface
|
||||||
|
*/
|
||||||
|
protected $themeHandler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a DbUpdateNegotiator.
|
* Constructs a DbUpdateNegotiator.
|
||||||
*
|
*
|
||||||
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
|
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
|
||||||
* The 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->configFactory = $config_factory;
|
||||||
|
$this->themeHandler = $theme_handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -40,10 +51,9 @@ class DbUpdateNegotiator implements ThemeNegotiatorInterface {
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function determineActiveTheme(RouteMatchInterface $route_match) {
|
public function determineActiveTheme(RouteMatchInterface $route_match) {
|
||||||
$custom_theme = Settings::get('maintenance_theme', 'seven');
|
$custom_theme = Settings::get('maintenance_theme');
|
||||||
if (!$custom_theme) {
|
if (!$custom_theme) {
|
||||||
$config = $this->configFactory->get('system.theme');
|
$custom_theme = $this->themeHandler->themeExists('claro') ? 'claro' : 'seven';
|
||||||
$custom_theme = $config->get('default');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $custom_theme;
|
return $custom_theme;
|
||||||
|
|
|
@ -30,7 +30,7 @@ services:
|
||||||
- { name: theme_negotiator, priority: 1000 }
|
- { name: theme_negotiator, priority: 1000 }
|
||||||
theme.negotiator.system.db_update:
|
theme.negotiator.system.db_update:
|
||||||
class: Drupal\system\Theme\DbUpdateNegotiator
|
class: Drupal\system\Theme\DbUpdateNegotiator
|
||||||
arguments: ['@config.factory']
|
arguments: ['@config.factory', '@theme_handler']
|
||||||
tags:
|
tags:
|
||||||
- { name: theme_negotiator, priority: 100 }
|
- { name: theme_negotiator, priority: 100 }
|
||||||
system.config_subscriber:
|
system.config_subscriber:
|
||||||
|
|
|
@ -15,6 +15,10 @@
|
||||||
background-color: var(--color-gray-100);
|
background-color: var(--color-gray-100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.site-name {
|
.site-name {
|
||||||
margin-top: var(--space-m);
|
margin-top: var(--space-m);
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
|
@ -179,6 +183,19 @@
|
||||||
[dir="rtl"] .layout-sidebar-first {
|
[dir="rtl"] .layout-sidebar-first {
|
||||||
float: right;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -8,6 +8,10 @@
|
||||||
background-color: var(--color-gray-100);
|
background-color: var(--color-gray-100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.site-name {
|
.site-name {
|
||||||
margin-top: var(--space-m);
|
margin-top: var(--space-m);
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
|
@ -169,6 +173,19 @@
|
||||||
[dir="rtl"] .layout-sidebar-first {
|
[dir="rtl"] .layout-sidebar-first {
|
||||||
float: right;
|
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…
Reference in New Issue