Unverified Commit 0f3e14a9 authored by Lauri Timmanee's avatar Lauri Timmanee
Browse files

Issue #3279640 by alexpott, Spokje, mherchel, lauriii, catch: Standard install...

Issue #3279640 by alexpott, Spokje, mherchel, lauriii, catch: Standard install profile uses Olivero for update.php
parent 34915ec2
Loading
Loading
Loading
Loading
+14 −4
Original line number Diff line number Diff line
@@ -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;
@@ -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;
  }

  /**
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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:
+17 −0
Original line number Diff line number Diff line
@@ -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;
@@ -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;
  }
}

/**
+17 −0
Original line number Diff line number Diff line
@@ -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;
@@ -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;
  }
}

/**