Commit 8d07e3b2 authored by webchick's avatar webchick
Browse files

#169912 by Jeff Burnz, mgifford, and lutegrass, and brandonojc: Use...

#169912 by Jeff Burnz, mgifford, and lutegrass, and brandonojc: Use appropriate header-tags in Garland, following the W3C.
parent 490fd34f
......@@ -50,7 +50,7 @@
$site_html = implode(' ', $site_fields);
if ($logo || $site_title) {
print '<h1><a href="' . $base_path . '" title="' . $site_title . '">';
print '<h1 id="branding"><a href="' . $base_path . '" title="' . $site_title . '">';
if ($logo) {
print '<img src="' . $logo . '" alt="' . $site_title . '" id="logo" />';
}
......
......@@ -9,12 +9,21 @@
<div id="header">
<div id="logo-floater">
<?php if ($logo || $site_title): ?>
<h1><a href="<?php print $front_page ?>" title="<?php print $site_title ?>">
<?php if ($logo): ?>
<img src="<?php print $logo ?>" alt="<?php print $site_title ?>" id="logo" />
<?php endif; ?>
<?php print $site_html ?>
</a></h1>
<?php if ($title): ?>
<div id="branding"><strong><a href="<?php print $front_page ?>" title="<?php print $site_name_and_slogan ?>">
<?php if ($logo): ?>
<img src="<?php print $logo ?>" alt="<?php print $site_name_and_slogan ?>" id="logo" />
<?php endif; ?>
<?php print $site_html ?>
</a></strong></div>
<?php else: /* Use h1 when the content title is empty */ ?>
<h1 id="branding"><a href="<?php print $front_page ?>" title="<?php print $site_name_and_slogan ?>">
<?php if ($logo): ?>
<img src="<?php print $logo ?>" alt="<?php print $site_name_and_slogan ?>" id="logo" />
<?php endif; ?>
<?php print $site_html ?>
</a></h1>
<?php endif; ?>
<?php endif; ?>
</div>
......@@ -33,7 +42,7 @@
<?php if ($page['highlight']): ?><div id="highlight"><?php render($page['highlight']); ?></div><?php endif; ?>
<a name="main-content" id="main-content"></a>
<?php if ($tabs): ?><div id="tabs-wrapper" class="clearfix"><?php endif; ?>
<?php if ($title): ?><h2<?php print $tabs ? ' class="with-tabs"' : '' ?>><?php print $title ?></h2><?php endif; ?>
<?php if ($title): ?><h1<?php print $tabs ? ' class="with-tabs"' : '' ?>><?php print $title ?></h1><?php endif; ?>
<?php if ($tabs): ?><ul class="tabs primary"><?php print render($tabs) ?></ul></div><?php endif; ?>
<?php if ($tabs2): ?><ul class="tabs secondary"><?php print render($tabs2) ?></ul><?php endif; ?>
<?php if ($show_messages && $messages): print $messages; endif; ?>
......
......@@ -80,7 +80,7 @@ dl dd {
background: #edf5fa url("images/body.png") repeat-x 50% 0;
}
#wrapper #container #header h1 img {
#branding img {
padding-right: 0;
padding-left: 20px;
float: right;
......@@ -149,7 +149,7 @@ body.sidebar-second #squeeze {
*/
ul.main-menu {
float: left;
width:70%;
width:70%;
}
ul.main-menu li {
......@@ -176,7 +176,7 @@ ul.secondary {
clear: both;
text-align: right;
}
h2.with-tabs {
h1.with-tabs {
float: right;
margin: 0 0 0 2em;
}
......
......@@ -32,7 +32,7 @@ h1 {
font-size: 170%;
}
h2 {
h2, #center h1 {
font-size: 160%;
line-height: 130%;
}
......@@ -380,18 +380,18 @@ table .form-button, table .form-submit {
position: absolute;
}
#wrapper #container #header h1, #wrapper #container #header h1 a:link, #wrapper #container #header h1 a:visited {
#branding, #branding a:link, #branding a:visited {
line-height: 120px;
position: relative;
z-index: 2;
white-space: nowrap;
}
#wrapper #container #header h1 span {
#branding span {
font-weight: bold;
}
#wrapper #container #header h1 img {
#branding img {
padding-top: 14px;
padding-right: 20px; /* LTR */
float: left; /* LTR */
......@@ -526,14 +526,21 @@ body.two-sidebars .region-footer {
/**
* Header
*/
#wrapper #container #header h1, #wrapper #container #header h1 a:link, #wrapper #container #header h1 a:visited {
div#branding {
font-family: Helvetica,Arial,sans-serif;
}
div#branding strong {
font-weight: normal;
}
#branding, #branding a:link, #branding a:visited {
color: #fff;
font-weight: normal;
text-shadow: #1659ac 0px 1px 3px;
font-size: 1.5em;
}
#wrapper #container #header h1 a:hover {
#branding a:hover {
text-decoration: none;
}
......@@ -642,7 +649,7 @@ ul.secondary {
margin: -0.2em -26px 1em;
padding: 0 26px 0.6em;
}
h2.with-tabs {
h1.with-tabs {
float: left; /* LTR */
margin: 0 2em 0 0; /* LTR */
padding: 0;
......
......@@ -70,7 +70,7 @@ function garland_preprocess_page(&$vars) {
$vars['secondary_nav'] = FALSE;
}
// Prepare header
// Prepare header.
$site_fields = array();
if (!empty($vars['site_name'])) {
$site_fields[] = check_plain($vars['site_name']);
......@@ -83,7 +83,11 @@ function garland_preprocess_page(&$vars) {
$site_fields[0] = '<span>' . $site_fields[0] . '</span>';
}
$vars['site_html'] = implode(' ', $site_fields);
// Set a variable for the site name title and logo alt attributes text.
$slogan_text = filter_xss_admin(variable_get('site_slogan', ''));
$site_name_text = filter_xss_admin(variable_get('site_name', 'Drupal'));
$vars['site_name_and_slogan'] = $site_name_text . ' ' . $slogan_text;
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment