summaryrefslogtreecommitdiff
path: root/themes/garland
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-11-22 03:25:42 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-11-22 03:25:42 +0000
commit8d07e3b2943eede5eea0954e718d72437b8c461a (patch)
treea9737b442ddb897b63b9eddeae347e1fcc995a75 /themes/garland
parent490fd34fb046163ab46084c3663e23606dfe46d1 (diff)
downloadbrdo-8d07e3b2943eede5eea0954e718d72437b8c461a.tar.gz
brdo-8d07e3b2943eede5eea0954e718d72437b8c461a.tar.bz2
#169912 by Jeff Burnz, mgifford, and lutegrass, and brandonojc: Use appropriate header-tags in Garland, following the W3C.
Diffstat (limited to 'themes/garland')
-rw-r--r--themes/garland/maintenance-page.tpl.php2
-rw-r--r--themes/garland/page.tpl.php23
-rw-r--r--themes/garland/style-rtl.css6
-rw-r--r--themes/garland/style.css23
-rw-r--r--themes/garland/template.php8
5 files changed, 41 insertions, 21 deletions
diff --git a/themes/garland/maintenance-page.tpl.php b/themes/garland/maintenance-page.tpl.php
index 900ee8a71..1edfcb46a 100644
--- a/themes/garland/maintenance-page.tpl.php
+++ b/themes/garland/maintenance-page.tpl.php
@@ -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" />';
}
diff --git a/themes/garland/page.tpl.php b/themes/garland/page.tpl.php
index cf01a8ee1..3ac18c279 100644
--- a/themes/garland/page.tpl.php
+++ b/themes/garland/page.tpl.php
@@ -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; ?>
diff --git a/themes/garland/style-rtl.css b/themes/garland/style-rtl.css
index 729f9fad9..130e15e66 100644
--- a/themes/garland/style-rtl.css
+++ b/themes/garland/style-rtl.css
@@ -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;
}
diff --git a/themes/garland/style.css b/themes/garland/style.css
index eac8f2fb1..8b2cb6747 100644
--- a/themes/garland/style.css
+++ b/themes/garland/style.css
@@ -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;
diff --git a/themes/garland/template.php b/themes/garland/template.php
index a3fccfb6f..66f3f3957 100644
--- a/themes/garland/template.php
+++ b/themes/garland/template.php
@@ -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;
}
/**