From f9be1f55a87f74ee4bf2d6173ee5adf100333dde Mon Sep 17 00:00:00 2001 From: Nathaniel Date: Tue, 20 Dec 2011 14:32:29 +0900 Subject: [PATCH] Issue #1347266 by Everett Zufelt, pcambra, JohnAlbin, tim.plunkett: Convert theme_breadcrumb() to HTML5. --- core/includes/theme.inc | 11 ++++++----- core/modules/book/book.test | 2 +- core/modules/node/node.test | 2 +- core/modules/simpletest/tests/menu.test | 2 +- core/modules/system/page.tpl.php | 4 +--- core/modules/system/system.theme.css | 10 ++++++++++ core/themes/bartik/css/layout.css | 2 +- core/themes/bartik/templates/page.tpl.php | 4 +--- 8 files changed, 22 insertions(+), 15 deletions(-) diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 6c7272c421d..5304d25c0c1 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -1687,15 +1687,16 @@ function theme_image($variables) { */ function theme_breadcrumb($variables) { $breadcrumb = $variables['breadcrumb']; - + $output = ''; if (!empty($breadcrumb)) { + $output .= ''; } + return $output; } /** diff --git a/core/modules/book/book.test b/core/modules/book/book.test index 6b457428507..83328e05324 100644 --- a/core/modules/book/book.test +++ b/core/modules/book/book.test @@ -156,7 +156,7 @@ class BookTestCase extends DrupalWebTestCase { } // Fetch links in the current breadcrumb. - $links = $this->xpath('//div[@class="breadcrumb"]/a'); + $links = $this->xpath('//nav[@class="breadcrumb"]/ol/li/a'); $got_breadcrumb = array(); foreach ($links as $link) { $got_breadcrumb[] = (string) $link['href']; diff --git a/core/modules/node/node.test b/core/modules/node/node.test index a04b0e66300..2e9b075d330 100644 --- a/core/modules/node/node.test +++ b/core/modules/node/node.test @@ -1732,7 +1732,7 @@ class NodeTitleTestCase extends DrupalWebTestCase { // Test breadcrumb in comment preview. $this->drupalGet("comment/reply/$node->nid"); - $xpath = '//div[@class="breadcrumb"]/a[last()]'; + $xpath = '//nav[@class="breadcrumb"]/ol/li[last()]/a'; $this->assertEqual(current($this->xpath($xpath)), $node->title, 'Node breadcrumb is equal to node title.', 'Node'); // Test node title in comment preview. diff --git a/core/modules/simpletest/tests/menu.test b/core/modules/simpletest/tests/menu.test index d0612ac77a6..5a173b146c5 100644 --- a/core/modules/simpletest/tests/menu.test +++ b/core/modules/simpletest/tests/menu.test @@ -107,7 +107,7 @@ class MenuWebTestCase extends DrupalWebTestCase { */ protected function getParts() { $parts = array(); - $elements = $this->xpath('//div[@class="breadcrumb"]/a'); + $elements = $this->xpath('//nav[@class="breadcrumb"]/ol/li/a'); if (!empty($elements)) { foreach ($elements as $element) { $parts[] = array( diff --git a/core/modules/system/page.tpl.php b/core/modules/system/page.tpl.php index 23b577e8b30..c76e27f20af 100644 --- a/core/modules/system/page.tpl.php +++ b/core/modules/system/page.tpl.php @@ -107,9 +107,7 @@ - - - +
diff --git a/core/modules/system/system.theme.css b/core/modules/system/system.theme.css index 1993d176d74..7121813ba88 100644 --- a/core/modules/system/system.theme.css +++ b/core/modules/system/system.theme.css @@ -294,6 +294,16 @@ ul.inline li { .breadcrumb { padding-bottom: 0.5em; } +.breadcrumb ol { + margin: 0; + padding: 0; +} +.breadcrumb li { + display: inline; + list-style-type: none; + margin: 0; + padding: 0; +} /** * Markup generated by theme_menu_local_tasks(). diff --git a/core/themes/bartik/css/layout.css b/core/themes/bartik/css/layout.css index b561f4c021c..7dfddf77d50 100644 --- a/core/themes/bartik/css/layout.css +++ b/core/themes/bartik/css/layout.css @@ -75,7 +75,7 @@ body, .sidebar .section { padding: 0 15px; } -#breadcrumb { +.breadcrumb { margin: 0 15px; } .region-triptych-first, diff --git a/core/themes/bartik/templates/page.tpl.php b/core/themes/bartik/templates/page.tpl.php index 7b0f99097a0..44e9ceae68b 100644 --- a/core/themes/bartik/templates/page.tpl.php +++ b/core/themes/bartik/templates/page.tpl.php @@ -172,9 +172,7 @@
- - - +