diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 43b7e2b..102bc5e 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -2897,6 +2897,11 @@ function template_preprocess_page(&$variables) { $variables['feed_icons'] = drupal_get_feeds(); $variables['language'] = $language_interface; $variables['language']->dir = $language_interface->direction ? 'rtl' : 'ltr'; + $variables['logo'] = theme_get_setting('logo.url'); + $variables['action_links'] = menu_get_local_actions(); + $variables['site_name'] = (theme_get_setting('features.name') ? check_plain($site_config->get('name')) : ''); + $variables['site_slogan'] = (theme_get_setting('features.slogan') ? filter_xss_admin($site_config->get('slogan')) : ''); + $variables['tabs'] = menu_local_tabs(); // Pass the main menu and secondary menu to the template as render arrays. if (!empty($variables['main_menu'])) { diff --git a/core/themes/bartik/bartik.theme b/core/themes/bartik/bartik.theme index 7155621..6036b12 100644 --- a/core/themes/bartik/bartik.theme +++ b/core/themes/bartik/bartik.theme @@ -42,20 +42,6 @@ function bartik_process_html(&$variables) { } /** - * Implements hook_preprocess_HOOK() for page.html.twig. - */ -function bartik_preprocess_page(&$variables) { - // Pass the main menu and secondary menu to the template as render arrays. - if (!empty($variables['main_menu'])) { - $variables['main_menu']['#attributes']['id'] = 'main-menu-links'; - $variables['main_menu']['#attributes']['class'] = array('links', 'clearfix'); - } - if (!empty($variables['secondary_menu'])) { - $variables['secondary_menu']['#attributes']['id'] = 'secondary-menu-links'; - } -} - -/** * Implements hook_process_HOOK() for page.html.twig. */ function bartik_process_page(&$variables) { diff --git a/core/themes/bartik/css/colors.css b/core/themes/bartik/css/colors.css index 96f3877..6a12fa1 100644 --- a/core/themes/bartik/css/colors.css +++ b/core/themes/bartik/css/colors.css @@ -9,8 +9,8 @@ body.overlay { } #page, #main-wrapper, -#main-menu-links li a.active, -#main-menu-links li.active-trail a { +#main-menu li a.active, +#main-menu li.active-trail a { background: #ffffff; } .tabs ul.primary li a.active { @@ -56,6 +56,6 @@ a:active, .region-header li a.active, #name-and-slogan, #name-and-slogan a, -#secondary-menu-links li a { +#secondary-menu li a { color: #fffeff; } diff --git a/core/themes/bartik/css/style-rtl.css b/core/themes/bartik/css/style-rtl.css index dc7c2a4..800fc08 100644 --- a/core/themes/bartik/css/style-rtl.css +++ b/core/themes/bartik/css/style-rtl.css @@ -77,7 +77,7 @@ ul.tips { /* --------------- Secondary Menu ------------ */ -#secondary-menu-links { +#secondary-menu { float: left; } diff --git a/core/themes/bartik/css/style.css b/core/themes/bartik/css/style.css index 89e4fd4..3912901 100644 --- a/core/themes/bartik/css/style.css +++ b/core/themes/bartik/css/style.css @@ -484,20 +484,20 @@ h1#site-name { #main-menu { clear: both; } -#main-menu-links { +#main-menu { font-size: 0.929em; margin: 0 5px; padding: 0; text-align: left; } -#main-menu-links li { +#main-menu li { float: none; list-style: none; margin: 0; padding: 0; width: 100%; } -#main-menu-links a { +#main-menu a { color: #333; background: #ccc; background: rgba(255, 255, 255, 0.7); @@ -509,36 +509,41 @@ h1#site-name { margin-bottom: 4px; padding: 0.9em 0 0.9em 10px; } -#main-menu-links a:hover, -#main-menu-links a:focus { +#main-menu a:hover, +#main-menu a:focus { background: #f6f6f2; background: rgba(255, 255, 255, 0.95); } -#main-menu-links a:active { +#main-menu a:active { background: #b3b3b3; background: rgba(255, 255, 255, 1); } -#main-menu-links li a.active { +#main-menu li a.active { border-bottom: none; } /* --------------- Secondary Menu ------------ */ -#secondary-menu-links { +.region-secondary-menu .content { + margin-top: 0; +} + +#secondary-menu { float: right; /* LTR */ font-size: 0.929em; - margin: 0 10px; + margin: 10px 10px 0; + text-align: right; } -#secondary-menu-links li{ +#secondary-menu li { margin: 0; padding: 0; -} -#secondary-menu-links a { display: inline-block; +} +#secondary-menu a { padding: 0.8em; } -#secondary-menu-links a:hover, -#secondary-menu-links a:focus { +#secondary-menu a:hover, +#secondary-menu a:focus { text-decoration: underline; } @@ -1553,22 +1558,22 @@ div.admin-panel .description { #name-and-slogan { padding: 10px 10px 8px; } - #main-menu-links { + #main-menu { margin: 0 5px; padding: 0; text-align: center; } - #main-menu-links li { + #main-menu li { float: left; margin-right: 5px; padding: 0; display: inline-block; width: 32.75%; } - #main-menu-links li:nth-child(3n) { + #main-menu li:nth-child(3n) { margin-right: -5px; } - #main-menu-links a { + #main-menu a { float: none; display: block; border-radius: 8px; @@ -1592,27 +1597,30 @@ div.admin-panel .description { #site-name { font-size: 1.821em; } - #main-menu-links { + #main-menu { font-size: 0.929em; margin: 0; padding: 0 15px; } - #main-menu-links li { + #main-menu ul { + padding: 0px 0px 35px 15px; + } + #main-menu li { float: left; /* LTR */ list-style: none; padding: 0 1px; margin: 0 1px; width: auto; } - #main-menu-links a { + #main-menu a { float: left; /* LTR */ padding: 0.7em 0.8em; margin-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; } - .featured #main-menu-links li a:active, - .featured #main-menu-links li a.active { + .featured #main-menu li a:active, + .featured #main-menu li a.active { background: #f0f0f0; background: rgba(240, 240, 240, 1.0); }