diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-10-05 01:48:11 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-10-05 01:48:11 +0000 |
commit | 8f43edf27ee1f78eaf4a7d615c5d0b50803b72e5 (patch) | |
tree | 554ce2acbafb8d38286d06bb726e9348bf6b5849 | |
parent | 5c918691d3c10a221bc89e3da71286c4ed679dcf (diff) | |
download | brdo-8f43edf27ee1f78eaf4a7d615c5d0b50803b72e5.tar.gz brdo-8f43edf27ee1f78eaf4a7d615c5d0b50803b72e5.tar.bz2 |
- Patch #845834 by Jeff Burnz, opalescent, bleen18: fix Bartik's header because its totally borked.
-rw-r--r-- | themes/bartik/css/colors.css | 6 | ||||
-rw-r--r-- | themes/bartik/css/ie-rtl.css | 22 | ||||
-rw-r--r-- | themes/bartik/css/ie.css | 3 | ||||
-rw-r--r-- | themes/bartik/css/ie6.css | 3 | ||||
-rw-r--r-- | themes/bartik/css/layout-rtl.css | 3 | ||||
-rw-r--r-- | themes/bartik/css/layout.css | 12 | ||||
-rw-r--r-- | themes/bartik/css/style-rtl.css | 57 | ||||
-rw-r--r-- | themes/bartik/css/style.css | 210 | ||||
-rw-r--r-- | themes/bartik/template.php | 5 | ||||
-rw-r--r-- | themes/bartik/templates/page.tpl.php | 2 |
10 files changed, 190 insertions, 133 deletions
diff --git a/themes/bartik/css/colors.css b/themes/bartik/css/colors.css index 0e7ef684c..328ae1a59 100644 --- a/themes/bartik/css/colors.css +++ b/themes/bartik/css/colors.css @@ -12,7 +12,8 @@ body.overlay { background-color: #ffffff; color: #3b3b3b; } -#main-menu ul.links li.active-trail a { +#main-menu-links li a.active, +#main-menu-links li.active-trail a { background: #ffffff; } .tabs ul.primary li a.active { @@ -44,6 +45,9 @@ a:active { #footer-wrapper { background: #292929; } +.region-header, +.region-header a, +.region-header li a.active, #header #name-and-slogan, #header #name-and-slogan a, #secondary-menu-links li a { diff --git a/themes/bartik/css/ie-rtl.css b/themes/bartik/css/ie-rtl.css index d5981eeaa..f88b40a88 100644 --- a/themes/bartik/css/ie-rtl.css +++ b/themes/bartik/css/ie-rtl.css @@ -3,6 +3,26 @@ fieldset legend { left: 6px; } -ul.action-links li a { +ul.action-links li a, +#user-login-form li.openid-link a, +#user-login li.openid-link a { + zoom: 1; +} +.region-header .block, +.region-header #block-user-login .form-item { + float: none; + display: inline; + vertical-align: top; +} +.region-header #block-user-login .item-list li { + float: none; +} +.region-header #block-user-login .item-list li.last { + padding-right: 0; +} +#user-login-form li.openid-link a, +#user-login li.openid-link a { + background-position: right -3px; + padding-right: 20px; zoom: 1; } diff --git a/themes/bartik/css/ie.css b/themes/bartik/css/ie.css index c48800de3..17713b807 100644 --- a/themes/bartik/css/ie.css +++ b/themes/bartik/css/ie.css @@ -21,6 +21,9 @@ fieldset legend { .meta { margin-bottom: 10px; } +.region-header .form-required { + color: #eee; +} #search-block-form input.form-submit:hover, #search-block-form input.form-submit:focus, #search-form input.form-submit:hover, diff --git a/themes/bartik/css/ie6.css b/themes/bartik/css/ie6.css index 207130435..ea11867db 100644 --- a/themes/bartik/css/ie6.css +++ b/themes/bartik/css/ie6.css @@ -6,7 +6,8 @@ .form-item-search-block-form { width: 50%; } -.tabs ul.primary { +.tabs ul.primary, +.region-header .block-menu li a { zoom: 1; } #block-search-form .form-item-search-block-form input { diff --git a/themes/bartik/css/layout-rtl.css b/themes/bartik/css/layout-rtl.css index 4ec5ce455..56718d9c8 100644 --- a/themes/bartik/css/layout-rtl.css +++ b/themes/bartik/css/layout-rtl.css @@ -13,6 +13,9 @@ .region-footer-fourthcolumn { float: right; } +.region-header { + float: left; +} #secondary-menu { left: 0; right: auto; diff --git a/themes/bartik/css/layout.css b/themes/bartik/css/layout.css index 04e4caf2a..1dbbe5917 100644 --- a/themes/bartik/css/layout.css +++ b/themes/bartik/css/layout.css @@ -16,9 +16,19 @@ #header div.section { position: relative; } +.region-header { + float: right; /* LTR */ + margin: 0 5px 10px; +} +.with-secondary-menu .region-header { + margin-top: 3em; +} +.without-secondary-menu .region-header { + margin-top: 15px; +} #secondary-menu { position: absolute; - right: 0; + right: 0; /* LTR */ top: 0; width: 480px; } diff --git a/themes/bartik/css/style-rtl.css b/themes/bartik/css/style-rtl.css index 3fc789a85..1b5124573 100644 --- a/themes/bartik/css/style-rtl.css +++ b/themes/bartik/css/style-rtl.css @@ -37,54 +37,31 @@ ul.tips { /* ------------------ Header ------------------ */ #logo { - float: right; - padding: 15px 0 15px 30px; -} -/* Menus when in the header region. */ -#header div.block-menu, -#header div#block-system-main-menu { - float: right; + padding: 15px 10px 15px 30px; } -#header .block-menu li a, -#header #block-system-main-menu li a { +#logo, +#name-and-slogan, +.region-header .block, +.region-header #block-user-login .form-item, +.region-header #block-user-login .item-list li { float: right; - border-left: 1px solid #555; - border-right: none; } -#header .block-menu li.first a, -#header #block-system-main-menu li.first a { - padding-right: 0; - padding-left: 12px; +.region-header .form-text { + margin-left: 2px; + margin-right: 0; } -#header .block-menu li.last a, -#header #block-system-main-menu li.last a { +.region-header #block-user-login .item-list li.last { padding-left: 0; - padding-right: 12px; - border-left: none; + padding-right: 0.5em; } -#header #block-search-form { - float: left; -} -#header #block-user-login { - left: 2%; - right: auto; - float: left; -} -#header #block-user-login .form-text { - margin-left: 5px; -} -#header #block-user-login .item-list ul li { - margin: 0 15px 0 5px; -} -#header #block-user-login .userbox { - margin-right: 10px; +.region-header #block-user-login ul.openid-links li.last { + padding-right: 0; } - -/* --------------- Main Menu ------------ */ - -#main-menu-links li.first { - padding-right: 2px; +.region-header #user-login-form li.openid-link a, +.region-header #user-login li.openid-link a { + background-position: right -3px; padding-left: 0; + padding-right: 20px; } /* --------------- Secondary Menu ------------ */ diff --git a/themes/bartik/css/style.css b/themes/bartik/css/style.css index dd3bcdc28..95833f812 100644 --- a/themes/bartik/css/style.css +++ b/themes/bartik/css/style.css @@ -255,24 +255,18 @@ ul.tips { position: static; width: auto; } -#header, -#preview #preview-header { - color: #fff; -} -#header a, -#preview #preview-header a { - color: #fff; -} #logo, #preview #preview-header #preview-logo { float: left; /* LTR */ - padding: 15px 30px 15px 0; /* LTR */ + padding: 15px 30px 15px 10px; /* LTR */ +} +#name-and-slogan { + float: left; /* LTR */ } #name-and-slogan, #preview #preview-header #preview-name-and-slogan { padding-top: 34px; margin-bottom: 30px; - margin-left: 15px; } #site-name, #preview #preview-header #preview-site-name { @@ -294,102 +288,146 @@ h1#site-name, word-spacing: 0.1em; font-style: italic; } -/* Menus when in the header region. */ -#header .block-menu { - height: 1.1em; - margin: 10px 0; +/* Region header blocks. */ +.region-header .block { + font-size: 0.857em; float: left; /* LTR */ - width: 75%; + margin: 0 10px; + padding: 0; } -#header .block ul, /* Any menu block in the header region. */ -#header .block li { - list-style: none; +.region-header .block .content { margin: 0; padding: 0; } -#header .block-menu li a { - float: left; /* LTR */ - padding: 0 12px; - display: block; - border-right: 1px solid #555; /* LTR */ +.region-header .block ul { + margin: 0; + padding: 0; } -#header .block-menu li.first a { - padding-left: 0; /* LTR */ +.region-header .block li { + list-style: none; + list-style-image: none; + padding: 0; } -#header .block-menu li.last a { - padding-right: 0; /* LTR */ - border-right: none; /* LTR */ +.region-header .form-text { + background: #fefefe; + background: rgba(255, 255, 255, 0.7); + border-color: #ccc; + border-color: rgba(255, 255, 255, 0.3); + margin-right: 2px; /* LTR */ + width: 120px; +} +.region-header .form-text:hover, +.region-header .form-text:focus, +.region-header .form-text:active { + background: #fff; + background: rgba(255, 255, 255, 0.8); } -#header #block-search-form { /* Search block in the Header region. */ - float: right; /* LTR */ - width: 24%; - margin: 8px 0; +.region-header .form-required { + color: #eee; + color: rgba(255, 255, 255, 0.7); } -#header #block-user-login { /* Login block in the Header region. */ +/* Region header block menus. */ +.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 { display: block; - position: absolute; - top: 0; - right: 2%; /* LTR */ - background: #464748; - color: #fff; - float: right; /* LTR */ - padding: 4px 10px 5px; - text-transform: uppercase; - font-size: 0.857em; + 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:focus, +.region-header .block-menu li a:active { + text-decoration: none; + background: rgba(255, 255, 255, 0.15) } -#header #block-user-login a { - color: #fff; - font-size: 0.929em; +.region-header .block-menu li.last a { + border-bottom: 0; } -#header #block-user-login .form-item label { - display: inline; - font-weight: normal; +/* User Login block in the header region */ +.region-header #block-user-login { + width: auto; } -#header #block-user-login .form-item { - display: inline; - font-weight: normal; +.region-header #block-user-login .content { + margin-top: 2px; } -#header #block-user-login .form-text { - margin-right: 5px; /* LTR */ +.region-header #block-user-login .form-item { + float: left; /* LTR */ + margin: 0; + padding: 0; } -#header #block-user-login .form-item label .form-required { - display: none; +.region-header #block-user-login div.item-list, +.region-header #block-user-login div.description { + font-size: 0.916em; + margin: 0; } -#header #block-user-login div.item-list, -#header #block-user-login .item-list ul { - display: inline; +.region-header #block-user-login div.item-list { + clear: both; } -#header #block-user-login .item-list ul li { +.region-header #block-user-login div.description { display: inline; - margin: 0 5px 0 15px; /* LTR */ } -#header #block-user-login div.item-list { - margin-top: 5px; - font-style: italic; - font-size: 1.3em; - text-transform: none; +.region-header #block-user-login .item-list ul { + padding: 0; + line-height: 1; } -#header #block-user-login .userbox { - margin-left: 10px; /* LTR */ +.region-header #block-user-login .item-list li { + list-style: none; + float: left; /* LTR */ + padding: 3px 0 1px; } -#header #block-user-login input.form-submit { - color: #fff; - background: #929599; - border: 1px solid #73767c; - padding: 1px; - text-transform: uppercase; - margin-top: 1px; - position: relative; - display: inline; +.region-header #block-user-login .item-list li.last { + padding-left: 0.5em; /* LTR */ } -#header #block-user-login #user-login-form div.item-list { /* Hide create new account + email replacement password links. */ - display: none; +.region-header #block-user-login ul.openid-links li.last { + padding-left: 0; /* LTR */ +} +.region-header #user-login-form li.openid-link a, +.region-header #user-login li.openid-link a { + padding-left: 20px; /* LTR */ +} +.region-header #block-user-login .form-actions { + margin: 4px 0 0; + padding: 0; + clear: both +} +.region-header #block-user-login input.form-submit { + border: 1px solid; + border-color: #ccc; + border-color: rgba(255, 255, 255, 0.5); + background: #eee; + background: rgba(255, 255, 255, 0.7); + margin: 4px 0; + padding: 3px 8px; +} +.region-header #block-user-login input.form-submit:hover, +.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 { + width: 208px; +} +.region-header #block-search-form .form-text { + width: 154px; +} +/* Language switcher block in region header. */ +#block-locale-language ul li { + display: inline; + padding: 0 0.5em; } /* --------------- Main Menu ------------ */ #main-menu { - padding: 0 15px; + padding: 0 15px 3px; clear: both; } #main-menu-links a { @@ -399,7 +437,7 @@ h1#site-name, #main-menu-links { font-size: 0.929em; padding: 2px 0; - padding: 0.6em 0.6em 3px; + padding: 0; } #main-menu-links a { color: #333; @@ -424,24 +462,26 @@ h1#site-name, background: #b3b3b3; background: rgba(255, 255, 255, 1); } -#main-menu-links li.active-trail a { +#main-menu-links li a.active { border-bottom: none; } +.featured #main-menu-links li a.active, +.featured #main-menu-links li.active-trail a { + background: #f0f0f0; + background: rgba(240, 240, 240, 1.0); +} #main-menu-links li { display: inline; list-style-type: none; padding: 0.6em 0 0.4em; } -#main-menu-links li.first { - padding-left: 2px; /* LTR */ -} /* --------------- Secondary Menu ------------ */ #secondary-menu-links { float: right; /* LTR */ font-size: 0.929em; - margin: 10px; + margin: 10px 10px 0; } #secondary-menu-links a:hover, #secondary-menu-links a:focus { diff --git a/themes/bartik/template.php b/themes/bartik/template.php index 55d32a37c..9132a9f0e 100644 --- a/themes/bartik/template.php +++ b/themes/bartik/template.php @@ -103,9 +103,8 @@ function bartik_process_maintenance_page(&$variables) { * Override or insert variables into the block template. */ function bartik_preprocess_block(&$variables) { - // In the header region, visually hide the title of any menu block or of the - // user login block, but leave it accessible. - if ($variables['block']->region == 'header' && ($variables['block']->module == 'user' && $variables['block']->delta == 'login' || in_array('block-menu', $variables['classes_array']))) { + // In the header region visually hide block titles. + if ($variables['block']->region == 'header') { $variables['title_attributes_array']['class'][] = 'element-invisible'; } } diff --git a/themes/bartik/templates/page.tpl.php b/themes/bartik/templates/page.tpl.php index fbd7fe174..879923452 100644 --- a/themes/bartik/templates/page.tpl.php +++ b/themes/bartik/templates/page.tpl.php @@ -87,7 +87,7 @@ ?> <div id="page-wrapper"><div id="page"> - <div id="header"><div class="section clearfix"> + <div id="header" class="<?php print $secondary_menu ? 'with-secondary-menu': 'without-secondary-menu'; ?>"><div class="section clearfix"> <?php if ($logo): ?> <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo"> |