diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 8f69720..ddeeb42 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -1995,27 +1995,27 @@ function template_preprocess_html(&$variables) { $variables['page'] = $page->getContent(); // Compile a list of classes that are going to be applied to the body element. - // This allows advanced theming based on context (home page, node of certain type, etc.). + // This allows advanced theming based on context (home page, node of certain + // type, etc.). $body_classes = $variables['attributes']['class']; - $body_classes[] = 'html'; - // Add a class that tells us whether we're on the front page or not. - $body_classes[] = $variables['is_front'] ? 'front' : 'not-front'; - // Add a class that tells us whether the page is viewed by an authenticated user or not. - $body_classes[] = $variables['logged_in'] ? 'logged-in' : 'not-logged-in'; + // Add a class that tells us whether the page is viewed by an authenticated + // user. + if( $variables['logged_in'] ) { + $body_classes[] = 'user-logged-in'; + } + // Add a class that tells us what path the page is located make it possible + // to theme the page depending on the current path (e.g. node, admin, user, + // etc.) as well as more specific data like path-frontpage or + // path-contenttype. + $path = arg(); + if( empty($path['0']) ) { + $body_classes[] = 'path-frontpage'; + } else { + $body_classes[] = 'path-' . $path['0']; + } + $variables['attributes']['class'] = $body_classes; - // Populate the body classes. - if ($suggestions = theme_get_suggestions(arg(), 'page', '-')) { - foreach ($suggestions as $suggestion) { - if ($suggestion != 'page-front') { - // Add current suggestion to page classes to make it possible to theme - // the page depending on the current page type (e.g. node, admin, user, - // etc.) as well as more specific data like node-12 or node-edit. - $variables['attributes']['class'][] = drupal_html_class($suggestion); - } - } - } - $site_config = \Drupal::config('system.site'); // Construct page title. if ($page->hasTitle()) { @@ -2112,14 +2112,6 @@ function template_preprocess_page(&$variables) { } } - // Set up layout variable. - $variables['layout'] = 'none'; - if (!empty($variables['page']['sidebar_first'])) { - $variables['layout'] = 'first'; - } - if (!empty($variables['page']['sidebar_second'])) { - $variables['layout'] = ($variables['layout'] == 'first') ? 'both' : 'second'; - } $variables['base_path'] = base_path(); $variables['front_page'] = url(); @@ -2280,7 +2272,6 @@ function template_preprocess_maintenance_page(&$variables) { $attributes = $page_object->getBodyAttributes(); $classes = $attributes['class']; $classes[] = 'maintenance-page'; - $classes[] = 'in-maintenance'; if (isset($variables['db_is_active']) && !$variables['db_is_active']) { $classes[] = 'db-offline'; } diff --git a/core/themes/seven/maintenance-page.css b/core/themes/seven/maintenance-page.css index bc56fa0..9b06388 100644 --- a/core/themes/seven/maintenance-page.css +++ b/core/themes/seven/maintenance-page.css @@ -15,7 +15,7 @@ /* Maintenance theming */ .install-page, -.in-maintenance { +.maintenance-page { background: none; } .name-and-slogan h1 { @@ -127,13 +127,13 @@ html { display: table; } - .in-maintenance, + .maintenance-page, .install-page { display: table-cell; padding: 1em 0; vertical-align: middle; } - html, .install-page, .in-maintenance { + html, .install-page, .maintenance-page { margin: 0; width: 100%; height: 100%;