You are here

function olivero_preprocess_maintenance_page in Drupal 10

Same name and namespace in other branches
  1. 9 core/themes/olivero/olivero.theme \olivero_preprocess_maintenance_page()

Implements hook_preprocess_HOOK() for maintenance-page.html.twig.

File

core/themes/olivero/olivero.theme, line 81
Functions to support theming in the Olivero theme.

Code

function olivero_preprocess_maintenance_page(&$variables) {

  // By default, site_name is set to Drupal if no db connection is available
  // or during site installation. Setting site_name to an empty string makes
  // the site and update pages look cleaner.
  // @see template_preprocess_maintenance_page
  if (!$variables['db_is_active']) {
    $variables['site_name'] = '';
  }

  // Olivero has custom styling for the maintenance page.
  $variables['#attached']['library'][] = 'olivero/maintenance-page';
}