diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 2153342..9aa9f89 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -700,14 +700,12 @@ function theme_get_setting($setting_name, $theme = NULL) { } // Generate the path to the logo image. - if ($cache[$theme]->get('features.logo')) { - $logo_path = $cache[$theme]->get('logo.path'); - if ($cache[$theme]->get('logo.use_default')) { - $cache[$theme]->set('logo.url', file_create_url($theme_object->getPath() . '/logo.png')); - } - elseif ($logo_path) { - $cache[$theme]->set('logo.url', file_create_url($logo_path)); - } + $logo_path = $cache[$theme]->get('logo.path'); + if ($cache[$theme]->get('logo.use_default')) { + $cache[$theme]->set('logo.url', file_create_url($theme_object->getPath() . '/logo.png')); + } + elseif ($logo_path) { + $cache[$theme]->set('logo.url', file_create_url($logo_path)); } // Generate the path to the favicon. @@ -1799,8 +1797,8 @@ function template_preprocess_page(&$variables) { $variables['front_page'] = \Drupal::url(''); $variables['language'] = $language_interface; $variables['logo'] = theme_get_setting('logo.url'); - $variables['site_name'] = (theme_get_setting('features.name') ? String::checkPlain($site_config->get('name')) : ''); - $variables['site_slogan'] = (theme_get_setting('features.slogan') ? Xss::filterAdmin($site_config->get('slogan')) : ''); + $variables['site_name'] = String::checkPlain($site_config->get('name')); + $variables['site_slogan'] = Xss::filterAdmin($site_config->get('slogan')); if (!defined('MAINTENANCE_MODE')) { $variables['action_links'] = menu_get_local_actions(); diff --git a/core/lib/Drupal/Core/Extension/ThemeHandler.php b/core/lib/Drupal/Core/Extension/ThemeHandler.php index 694185f..6c6c563 100644 --- a/core/lib/Drupal/Core/Extension/ThemeHandler.php +++ b/core/lib/Drupal/Core/Extension/ThemeHandler.php @@ -28,10 +28,7 @@ class ThemeHandler implements ThemeHandlerInterface { * @var array */ protected $defaultFeatures = array( - 'logo', 'favicon', - 'name', - 'slogan', 'node_user_picture', 'comment_user_picture', 'comment_user_verification', @@ -448,7 +445,8 @@ public function rebuildThemeData() { 'sidebar_first' => 'Left sidebar', 'sidebar_second' => 'Right sidebar', 'content' => 'Content', - 'header' => 'Header', + 'header_first' => 'Header first', + 'header_second' => 'Header second', 'primary_menu' => 'Primary menu', 'secondary_menu' => 'Secondary menu', 'footer' => 'Footer', diff --git a/core/modules/block/src/Tests/BlockRenderOrderTest.php b/core/modules/block/src/Tests/BlockRenderOrderTest.php index b21d5f0..5036a92 100644 --- a/core/modules/block/src/Tests/BlockRenderOrderTest.php +++ b/core/modules/block/src/Tests/BlockRenderOrderTest.php @@ -37,7 +37,7 @@ protected function setUp() { */ function testBlockRenderOrder() { // Enable test blocks and place them in the same region. - $region = 'header'; + $region = 'header_second'; $test_blocks = array( 'stark_powered' => array( 'weight' => '-3', diff --git a/core/modules/block/src/Tests/BlockSystemBrandingTest.php b/core/modules/block/src/Tests/BlockSystemBrandingTest.php index 58b04e0..3dc537b 100644 --- a/core/modules/block/src/Tests/BlockSystemBrandingTest.php +++ b/core/modules/block/src/Tests/BlockSystemBrandingTest.php @@ -31,7 +31,7 @@ protected function setUp() { ->set('slogan', 'Community plumbing') ->save(); // Add the system branding block to the page. - $this->drupalPlaceBlock('system_branding_block', array('region' => 'header', 'id' => 'site-branding')); + $this->drupalPlaceBlock('system_branding_block', array('region' => 'header_second', 'id' => 'site-branding')); } /** diff --git a/core/modules/block/src/Tests/BlockTest.php b/core/modules/block/src/Tests/BlockTest.php index 1996c9b..75c74d8 100644 --- a/core/modules/block/src/Tests/BlockTest.php +++ b/core/modules/block/src/Tests/BlockTest.php @@ -101,7 +101,7 @@ function testBlock() { $block['id'] = 'system_powered_by_block'; $block['settings[label]'] = $this->randomMachineName(8); $block['theme'] = \Drupal::config('system.theme')->get('default'); - $block['region'] = 'header'; + $block['region'] = 'header_second'; // Set block title to confirm that interface works and override any custom titles. $this->drupalPostForm('admin/structure/block/add/' . $block['id'] . '/' . $block['theme'], array('settings[label]' => $block['settings[label]'], 'id' => $block['id'], 'region' => $block['region']), t('Save block')); @@ -237,7 +237,7 @@ function testHideBlockTitle() { * - delta: The block's delta key. * @param string $region * The machine name of the theme region to move the block to, for example - * 'header' or 'sidebar_first'. + * 'header_second' or 'sidebar_first'. */ function moveBlockToRegion(array $block, $region) { // Set the created block to a specific region. diff --git a/core/modules/block/src/Tests/BlockTestBase.php b/core/modules/block/src/Tests/BlockTestBase.php index 5f33eb9..591a2cb 100644 --- a/core/modules/block/src/Tests/BlockTestBase.php +++ b/core/modules/block/src/Tests/BlockTestBase.php @@ -59,7 +59,8 @@ protected function setUp() { // Define the existing regions. $this->regions = array( - 'header', + 'header_first', + 'header_second', 'sidebar_first', 'content', 'sidebar_second', diff --git a/core/modules/block/src/Tests/BlockUiTest.php b/core/modules/block/src/Tests/BlockUiTest.php index 7b6f945..a2203b6 100644 --- a/core/modules/block/src/Tests/BlockUiTest.php +++ b/core/modules/block/src/Tests/BlockUiTest.php @@ -64,7 +64,7 @@ protected function setUp() { ), array( 'label' => 'Powered by Drupal', - 'tr' => '16', + 'tr' => '14', 'plugin_id' => 'system_powered_by_block', 'settings' => array('region' => 'footer', 'id' => 'powered'), 'test_weight' => '0', @@ -104,8 +104,8 @@ function testBlockAdminUiPage() { $this->assertTrue((string) $element[0] == $label, 'The "' . $label . '" block title is set inside the ' . $values['settings']['region'] . ' region.'); // Look for a test block region select form element. $this->assertField('blocks[' . $values['settings']['id'] . '][region]', 'The block "' . $values['label'] . '" has a region assignment field.'); - // Move the test block to the header region. - $edit['blocks[' . $values['settings']['id'] . '][region]'] = 'header'; + // Move the test block to the header_second region. + $edit['blocks[' . $values['settings']['id'] . '][region]'] = 'header_second'; // Look for a test block weight select form element. $this->assertField('blocks[' . $values['settings']['id'] . '][weight]', 'The block "' . $values['label'] . '" has a weight assignment field.'); // Change the test block's weight. @@ -116,8 +116,8 @@ function testBlockAdminUiPage() { // Check if the region and weight settings changes have persisted. $this->assertOptionSelected( 'edit-blocks-' . $values['settings']['id'] . '-region', - 'header', - 'The block "' . $label . '" has the correct region assignment (header).' + 'header_second', + 'The block "' . $label . '" has the correct region assignment (header_second).' ); $this->assertOptionSelected( 'edit-blocks-' . $values['settings']['id'] . '-weight', diff --git a/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php b/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php index 690beee..6f41c55 100644 --- a/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php +++ b/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php @@ -27,7 +27,7 @@ class ConfigTranslationUiTest extends WebTestBase { * * @var array */ - public static $modules = array('node', 'contact', 'config_translation', 'config_translation_test', 'views', 'views_ui', 'contextual'); + public static $modules = array('node', 'contact', 'config_translation', 'config_translation_test', 'views', 'views_ui', 'contextual', 'block'); /** * Languages to enable. @@ -139,6 +139,9 @@ public function testSiteInformationTranslationUi() { $this->assertFieldByName('config_names[system.site][name][translation]', $fr_site_name); $this->assertFieldByName('config_names[system.site][slogan][translation]', $fr_site_slogan); + // Place branding block with site name and slogan into header_first region. + $this->drupalPlaceBlock('system_branding_block', array('region' => 'header_first')); + // Check French translation of site name and slogan are in place. $this->drupalGet('fr'); $this->assertRaw($fr_site_name); diff --git a/core/modules/language/src/Tests/LanguageUILanguageNegotiationTest.php b/core/modules/language/src/Tests/LanguageUILanguageNegotiationTest.php index c38d93e..d33e0c7 100644 --- a/core/modules/language/src/Tests/LanguageUILanguageNegotiationTest.php +++ b/core/modules/language/src/Tests/LanguageUILanguageNegotiationTest.php @@ -370,6 +370,9 @@ function testUrlLanguageFallback() { // it is set by JavaScript. $this->drupalLogout(); + // Place a site branding block in the header_first region. + $this->drupalPlaceBlock('system_branding_block', array('region' => 'header_first')); + // Access the front page without specifying any valid URL language prefix // and having as browser language preference a non-default language. $http_header = array("Accept-Language: $langcode_browser_fallback;q=1"); @@ -383,7 +386,7 @@ function testUrlLanguageFallback() { $this->assertTrue($fields[0] == $languages[$langcode_browser_fallback]->name, 'The browser language is the URL active language'); // Check that URLs are rewritten using the given browser language. - $fields = $this->xpath('//strong[@class="site-name"]/a[@rel="home" and @href=:url]', $args); + $fields = $this->xpath('//div[@class="site-name"]/a[@rel="home" and @href=:url]', $args); $this->assertTrue($fields[0] == 'Drupal', 'URLs are rewritten using the browser language.'); } diff --git a/core/modules/system/config/install/system.theme.global.yml b/core/modules/system/config/install/system.theme.global.yml index 5ee6cc7..b8da423 100644 --- a/core/modules/system/config/install/system.theme.global.yml +++ b/core/modules/system/config/install/system.theme.global.yml @@ -7,10 +7,7 @@ features: comment_user_picture: true comment_user_verification: true favicon: true - logo: true - name: true node_user_picture: true - slogan: true logo: path: '' url: '' diff --git a/core/modules/system/config/schema/system.schema.yml b/core/modules/system/config/schema/system.schema.yml index af52582..a936cf5 100644 --- a/core/modules/system/config/schema/system.schema.yml +++ b/core/modules/system/config/schema/system.schema.yml @@ -345,15 +345,6 @@ block.settings.system_branding_block: type: block_settings label: 'Branding block' mapping: - use_site_logo: - type: boolean - label: 'Use site logo' - use_site_name: - type: boolean - label: 'Use site name' - use_site_slogan: - type: boolean - label: 'Use site slogan' block.settings.system_menu_block:*: type: block_settings diff --git a/core/modules/system/src/Form/ThemeSettingsForm.php b/core/modules/system/src/Form/ThemeSettingsForm.php index 25568b0..20c0a94 100644 --- a/core/modules/system/src/Form/ThemeSettingsForm.php +++ b/core/modules/system/src/Form/ThemeSettingsForm.php @@ -99,9 +99,6 @@ public function buildForm(array $form, FormStateInterface $form_state, $theme = // Toggle settings $toggles = array( - 'logo' => t('Logo'), - 'name' => t('Site name'), - 'slogan' => t('Site slogan'), 'node_user_picture' => t('User pictures in posts'), 'comment_user_picture' => t('User pictures in comments'), 'comment_user_verification' => t('User verification status in comments'), diff --git a/core/modules/system/src/Tests/System/PageTitleTest.php b/core/modules/system/src/Tests/System/PageTitleTest.php index 4516a57..d4bf9e2 100644 --- a/core/modules/system/src/Tests/System/PageTitleTest.php +++ b/core/modules/system/src/Tests/System/PageTitleTest.php @@ -24,7 +24,7 @@ class PageTitleTest extends WebTestBase { * * @var array */ - public static $modules = array('node', 'test_page_test', 'form_test'); + public static $modules = array('node', 'test_page_test', 'form_test', 'block'); protected $content_user; protected $saved_title; @@ -73,8 +73,8 @@ function testTitleXSS() { // Activate needed appearance settings. $edit = array( - 'toggle_name' => TRUE, - 'toggle_slogan' => TRUE, + 'toggle_main_menu' => TRUE, + 'toggle_secondary_menu' => TRUE, ); $this->drupalPostForm('admin/appearance/settings', $edit, t('Save configuration')); @@ -85,6 +85,9 @@ function testTitleXSS() { ); $this->drupalPostForm('admin/config/system/site-information', $edit, t('Save configuration')); + // Place branding block with site name and slogan into header_first region. + $this->drupalPlaceBlock('system_branding_block', array('region' => 'header_first')); + // Load frontpage. $this->drupalGet(''); diff --git a/core/modules/system/src/Tests/System/ThemeTest.php b/core/modules/system/src/Tests/System/ThemeTest.php index 5078156..0480d9d 100644 --- a/core/modules/system/src/Tests/System/ThemeTest.php +++ b/core/modules/system/src/Tests/System/ThemeTest.php @@ -115,9 +115,10 @@ function testThemeSettings() { $this->assertEqual((string) $elements[1], $explicit_file); $this->assertEqual((string) $elements[2], $local_file); - // Verify the actual 'src' attribute of the logo being output. + // Verify the actual 'src' attribute of the logo being output in a site branding block. + $this->drupalPlaceBlock('system_branding_block', array('region' => 'header_first')); $this->drupalGet(''); - $elements = $this->xpath('//header/a[@rel=:rel]/img', array( + $elements = $this->xpath('//header//a[@rel=:rel]/img', array( ':rel' => 'home', ) ); @@ -167,8 +168,9 @@ function testThemeSettings() { $fields = $this->xpath($this->constructFieldXpath('name', 'logo_path')); $uploaded_filename = 'public://' . $fields[0]['value']; + $this->drupalPlaceBlock('system_branding_block', array('region' => 'header_first')); $this->drupalGet(''); - $elements = $this->xpath('//header/a[@rel=:rel]/img', array( + $elements = $this->xpath('//header//a[@rel=:rel]/img', array( ':rel' => 'home', ) ); diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 9e7164c..393616d 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -921,10 +921,7 @@ function system_rebuild_theme_data() { */ function _system_default_theme_features() { return array( - 'logo', 'favicon', - 'name', - 'slogan', 'node_user_picture', 'comment_user_picture', 'comment_user_verification', diff --git a/core/modules/system/templates/page.html.twig b/core/modules/system/templates/page.html.twig index 41d8270..a9b7901 100644 --- a/core/modules/system/templates/page.html.twig +++ b/core/modules/system/templates/page.html.twig @@ -65,33 +65,9 @@
- {% if logo %} - - {{ 'Home'|t }} - - {% endif %} - - {% if site_name or site_slogan %} -
- - {# Use h1 when the content title is empty #} - {% if title %} - - {{ site_name }} - - {% else %} -

- {{ site_name }} -

- {% endif %} - - {% if site_slogan %} -
{{ site_slogan }}
- {% endif %} -
{# ./name-and-slogan #} - {% endif %} + {{ page.header_first }} - {{ page.header }} + {{ page.header_second }}
{{ page.primary_menu }} diff --git a/core/profiles/standard/config/block.block.bartik_branding.yml b/core/profiles/standard/config/block.block.bartik_branding.yml new file mode 100644 index 0000000..9d9b1ee --- /dev/null +++ b/core/profiles/standard/config/block.block.bartik_branding.yml @@ -0,0 +1,22 @@ +id: bartik_branding +theme: bartik +weight: 0 +status: true +langcode: en +region: header_first +plugin: system_branding_block +settings: + label: 'Page Site Branding' + module: system + label_display: '0' + cache: -1 +visibility: + path: + visibility: 0 + pages: '' + role: + roles: { } + node_type: + types: + article: '0' + page: '0' diff --git a/core/themes/bartik/bartik.info.yml b/core/themes/bartik/bartik.info.yml index 22e62b4..b47144b 100644 --- a/core/themes/bartik/bartik.info.yml +++ b/core/themes/bartik/bartik.info.yml @@ -10,7 +10,8 @@ libraries: ckeditor_stylesheets: - css/ckeditor-iframe.css regions: - header: Header + header_first: 'Header first' + header_second: 'Header second' primary_menu: 'Primary menu' secondary_menu: 'Secondary menu' help: Help diff --git a/core/themes/bartik/css/colors.css b/core/themes/bartik/css/colors.css index 6721678..31eeaf1 100644 --- a/core/themes/bartik/css/colors.css +++ b/core/themes/bartik/css/colors.css @@ -46,12 +46,12 @@ a:active, #footer-wrapper { background: #292929; } -.region-header, -.region-header a, -.region-header li a.active, -#name-and-slogan, +[class*="region-header-"], +[class*="region-header-"] a, +[class*="region-header-"] li a.active, +.site-branding-text, .site-branding-block, -#name-and-slogan a, +.site-branding-text a, .site-branding-block a, .region-secondary-menu .menu li a { color: #fffeff; diff --git a/core/themes/bartik/css/layout.css b/core/themes/bartik/css/layout.css index 74fa149..d03dbfc 100644 --- a/core/themes/bartik/css/layout.css +++ b/core/themes/bartik/css/layout.css @@ -24,12 +24,20 @@ body, #header div.section { position: relative; } -.region-header { - float: right; /* LTR */ +.region-header-second { margin: .5em 5px .75em; border: 1px solid #ccc; } -[dir="rtl"] .region-header { +.region-header-first { + float: left; /* LTR */ +} +.region-header-second { + float: right; /* LTR */ +} +[dir="rtl"] .region-header-first { + float: right; +} +[dir="rtl"] .region-header-second { float: left; } .region-secondary-menu .block-menu { diff --git a/core/themes/bartik/css/maintenance-page.css b/core/themes/bartik/css/maintenance-page.css index ce5c9f5..71df23e 100644 --- a/core/themes/bartik/css/maintenance-page.css +++ b/core/themes/bartik/css/maintenance-page.css @@ -31,16 +31,15 @@ body.maintenance-page { background-color: #fff; background-image: none; } -.maintenance-page #name-and-slogan { +.maintenance-page .site-branding-text { margin-bottom: 50px; margin-left: 0; padding-top: 20px; font-size: 90%; } -.maintenance-page #name-and-slogan, -.maintenance-page #name-and-slogan a, -.maintenance-page #name-and-slogan a:hover, -.maintenance-page #name-and-slogan a:focus { +.maintenance-page .site-branding-text, +.maintenance-page .site-branding-text a, +.maintenance-page .site-branding-text a:hover { color: #777; } .maintenance-page h1#page-title { diff --git a/core/themes/bartik/css/style.css b/core/themes/bartik/css/style.css index f03caa5..789c520 100644 --- a/core/themes/bartik/css/style.css +++ b/core/themes/bartik/css/style.css @@ -127,7 +127,6 @@ pre { /* ------------------ Fonts ------------------ */ body, -#site-slogan, .site-slogan, #page .ui-widget, .comment-form label, @@ -368,42 +367,32 @@ ul.tips { .skip-link:focus { outline: 0; } -#logo, .site-logo { float: left; /* LTR */ padding-left: 5px; /* LTR */ } -[dir="rtl"] #logo, [dir="rtl"] .site-logo { padding: 15px 10px 15px 15px; } - -#name-and-slogan, .site-branding-text { float: left; /* LTR */ margin: 0; padding: 5px 10px 8px; } -[dir="rtl"] #name-and-slogan, [dir="rtl"] .site-branding-text { margin: 0 15px 30px 0; } - -#site-name, .site-name { font-size: 1.6em; color: #686868; line-height: 1; } -h1#site-name, h1.site-name { margin: 0; } -#site-name a, .site-name a { font-weight: normal; } -#site-slogan, .site-slogan { font-size: 0.929em; margin-top: 7px; @@ -411,33 +400,36 @@ h1.site-name { font-style: italic; } /* Region header blocks. */ -.region-header .block { - font-size: 0.857em; +[class*="region-header-"] .block { float: left; /* LTR */ - margin: 0 10px; + margin: 0; padding: 0; } -.region-header .block > h2 { +.region-header-second .block { + font-size: 0.857em; + margin: 0 10px; +} +[class*="region-header-"] .block > h2 { /* @extend .visually-hidden */ position: absolute !important; clip: rect(1px, 1px, 1px, 1px); overflow: hidden; height: 1px; } -.region-header .block .content { +[class*="region-header-"] .block .content { margin: 0; padding: 0; } -.region-header .block ul { +[class*="region-header-"] .block ul { margin: 0; padding: 0; } -.region-header .block li { +[class*="region-header-"] .block li { list-style: none; list-style-image: none; padding: 0; } -.region-header .form-text { +[class*="region-header-"] .form-text { background: #fefefe; background: rgba(255, 255, 255, 0.7); border-color: #ccc; @@ -445,88 +437,88 @@ h1.site-name { margin-right: 2px; /* LTR */ width: 120px; } -[dir="rtl"] .region-header .form-text { +[dir="rtl"] [class*="region-header-"] .form-text { margin-left: 2px; margin-right: 0; } -.region-header .form-text:hover, -.region-header .form-text:active, -.region-header .form-text:focus { +[class*="region-header-"] .form-text:hover, +[class*="region-header-"] .form-text:focus, +[class*="region-header-"] .form-text:active { background: #fff; background: rgba(255, 255, 255, 0.8); } -.region-header .form-required:after { +[class*="region-header-"] .form-required { background-image: url(../images/required.svg); } -/* Region header block menus. */ -.region-header .block-menu { +/* Block menus in header regions. */ +[class*="region-header-"] .block-menu { border: 1px solid; border-color: #eee; border-color: rgba(255, 255, 255, 0.2); padding: 0; width: 208px; } -.region-header .block-menu li a { +[class*="region-header-"] .block-menu li a { display: block; border-bottom: 1px solid; border-bottom-color: #eee; border-bottom-color: rgba(255, 255, 255, 0.2); padding: 3px 7px; } -.region-header .block-menu li a:hover, -.region-header .block-menu li a:active, -.region-header .block-menu li a:focus { +[class*="region-header-"] .block-menu li a:hover, +[class*="region-header-"] .block-menu li a:focus, +[class*="region-header-"] .block-menu li a:active { text-decoration: none; background: rgba(255, 255, 255, 0.15); } -.region-header .block-menu li:last-child a { +[class*="region-header-"] .block-menu li:last-child a { border-bottom: 0; } -/* User Login block in the header region */ -.region-header #block-user-login { +/* User Login block in header regions. */ +[class*="region-header-"] #block-user-login { width: auto; } -.region-header #block-user-login .content { +[class*="region-header-"] #block-user-login .content { margin-top: 2px; } -.region-header #block-user-login .form-item { +[class*="region-header-"] #block-user-login .form-item { float: left; /* LTR */ margin: 0; padding: 0; } -.region-header #block-user-login div.item-list, -.region-header #block-user-login div.description { +[class*="region-header-"] #block-user-login div.item-list, +[class*="region-header-"] #block-user-login div.description { font-size: 0.916em; margin: 0; } -.region-header #block-user-login div.item-list { +[class*="region-header-"] #block-user-login div.item-list { clear: both; } -.region-header #block-user-login div.description { +[class*="region-header-"] #block-user-login div.description { display: inline; } -.region-header #block-user-login .item-list ul { +[class*="region-header-"] #block-user-login .item-list ul { padding: 0; line-height: 1; } -.region-header #block-user-login .item-list li { +[class*="region-header-"] #block-user-login .item-list li{ list-style: none; float: left; /* LTR */ padding: 3px 0 1px; } -.region-header #block-user-login .item-list li:last-child { +[class*="region-header-"] #block-user-login .item-list li:last-child{ padding-left: 0.5em; /* LTR */ } -[dir="rtl"] .region-header #block-user-login .item-list li:last-child { +[dir="rtl"] [class*="region-header-"] #block-user-login .item-list li:last-child { padding-left: 0; padding-right: 0.5em; } -.region-header #block-user-login .form-actions { +[class*="region-header-"] #block-user-login .form-actions { margin: 4px 0 0; padding: 0; clear: both; } -.region-header #block-user-login input.form-submit { +[class*="region-header-"] #block-user-login input.form-submit { border: 1px solid; border-color: #ccc; border-color: rgba(255, 255, 255, 0.5); @@ -535,31 +527,28 @@ h1.site-name { margin: 4px 0; padding: 3px 8px; } -.region-header #block-user-login input.form-submit:hover, -.region-header #block-user-login input.form-submit:focus { +[class*="region-header-"] #block-user-login input.form-submit:hover, +[class*="region-header-"] #block-user-login input.form-submit:focus { background: #fff; background: rgba(255, 255, 255, 0.9); } -/* Search block in region header. */ -.region-header #block-search-form { +/* Search block in region headers. */ +[class*="region-header-"] #block-search-form { width: 208px; } -.region-header #block-search-form .form-text { +[class*="region-header-"] #block-search-form .form-text { width: 154px; } -/* Language switcher block in region header. */ -.region-header .block-locale ul li { +/* Language switcher block in region headers. */ +[class*="region-header-"] .block-locale ul li { display: inline; padding: 0 0.5em; } - -[dir="rtl"] #logo, [dir="rtl"] .site-logo, -[dir="rtl"] #name-and-slogan, [dir="rtl"] .site-branding-text, -[dir="rtl"] .region-header .block, -[dir="rtl"] .region-header #block-user-login .form-item, -[dir="rtl"] .region-header #block-user-login .item-list li { +[dir="rtl"] [class*="region-header-"] .block, +[dir="rtl"] [class*="region-header-"] #block-user-login .form-item, +[dir="rtl"] [class*="region-header-"] #block-user-login .item-list li { float: right; } @@ -1882,18 +1871,15 @@ div.admin-panel .description { @media all and (min-width: 461px) and (max-width: 900px) { /* ------------ Header and Menus -------------------------- */ - .region-header { + .region-header-second { margin: .5em 5px .75em; } - #logo, .site-logo { padding: 5px 0 0 5px; /* LTR */ } - [dir="rtl"] #logo, [dir="rtl"] .site-logo { padding: 5px 5px 0 0; } - #name-and-slogan, .site-branding-text { padding: 10px 10px 8px; } @@ -1938,29 +1924,25 @@ div.admin-panel .description { @media all and (min-width: 901px) { - .region-header { + .region-header-second { margin: 1em 5px 1.5em; } - #logo, .site-logo { padding: 15px 15px 15px 10px; /* LTR */ } - [dir="rtl"] #logo, [dir="rtl"] .site-logo { padding: 15px 10px 15px 15px; } - #name-and-slogan, .site-branding-text { padding: 26px 0 0; margin: 0 0 30px 15px; /* LTR */ } - [dir="rtl"] #name-and-slogan, [dir="rtl"] .site-branding-text { margin: 0 15px 30px 0; } - #site-name, .site-name { font-size: 1.821em; + display: block; } .region-primary-menu .block-menu .menu { font-size: 0.929em; diff --git a/core/themes/bartik/templates/maintenance-page.html.twig b/core/themes/bartik/templates/maintenance-page.html.twig index 5de50cc..66e1c42 100644 --- a/core/themes/bartik/templates/maintenance-page.html.twig +++ b/core/themes/bartik/templates/maintenance-page.html.twig @@ -8,25 +8,22 @@ * @see template_preprocess_maintenance_page() */ #} + + + + {{ head }} + {{ head_title }} + {{ styles }} + {{ scripts }} + + +
diff --git a/core/themes/bartik/templates/page.html.twig b/core/themes/bartik/templates/page.html.twig index d52d3db..5bf2eda 100644 --- a/core/themes/bartik/templates/page.html.twig +++ b/core/themes/bartik/templates/page.html.twig @@ -53,7 +53,8 @@ * comment/reply/12345). * * Regions: - * - page.header: Items for the header region. + * - page.header_first: Items for the first header region. + * - page.header_second: Items for the second header region. * - page.primary_menu: Items for the primary menu region. * - page.secondary_menu: Items for the secondary menu region. * - page.featured: Items for the featured region. @@ -78,43 +79,16 @@ #}
-