Index: includes/theme.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/theme.inc,v retrieving revision 1.312 diff -u -F^f -r1.312 theme.inc --- includes/theme.inc 24 Aug 2006 00:04:44 -0000 1.312 +++ includes/theme.inc 24 Aug 2006 06:44:37 -0000 @@ -499,35 +499,53 @@ function theme_status_messages($display * * @param $links * A keyed array of links to be themed. - * @param $delimiter - * A string used to separate the links. + * @param $attributes + * A keyed array of attributes * @return - * A string containing the themed links. + * A string containing an unordered list of links. */ -function theme_links($links, $delimiter = ' | ') { - $output = array(); +function theme_links($links, $attributes = array('class' => 'links')) { + $output = ''; if (is_array($links)) { + $output = ''; + + $num_links = count($links); + $i = 1; + foreach ($links as $key => $link) { - // Automatically add a class to each link and convert all _ to - for XHTML compliance + $class = ''; + + // Automatically add a class to each link and also to each LI if (isset($link['attributes']) && isset($link['attributes']['class'])) { - $link['attributes']['class'] .= ' '. str_replace('_', '-', $key); + $link['attributes']['class'] .= ' ' . $key; + $class = $key; } else { - $link['attributes']['class'] = str_replace('_', '-', $key); + $link['attributes']['class'] = $key; + $class = $key; } + // Add first and last classes to the list of links to help out themers + $extra_class = ($i == 1) ? 'first ' : (($i == $num_links) ? 'last ' : ''); + $output .= '
  • '; + if ($link['href']) { - $output[] = l($link['title'], $link['href'], $link['attributes'], $link['query'], $link['fragment']); + $output .= l($link['title'], $link['href'], $link['attributes'], $link['query'], $link['fragment']); } else if ($link['title']) { //Some links are actually not links, but we wrap these in for adding title and class attributes - $output[] = ''. check_plain($link['title']) .''; + $output .= ''. check_plain($link['title']) .''; } + + $i++; + $output .= '
  • '; } + + $output .= ''; } - return implode($delimiter, $output); + return $output; } /** Index: modules/menu/menu.css =================================================================== RCS file: /cvs/drupal/drupal/modules/menu/menu.css,v retrieving revision 1.3 diff -u -F^f -r1.3 menu.css --- modules/menu/menu.css 16 Aug 2006 07:32:16 -0000 1.3 +++ modules/menu/menu.css 24 Aug 2006 06:44:37 -0000 @@ -32,3 +32,15 @@ td.menu-disabled { background: #ccc; } +ul.links { + margin: 0; + padding: 0; +} +ul.links.inline { + display: inline; +} +ul.links li { + display: inline; + list-style-type: none; + padding: 0 0.5em; +} Index: themes/bluemarine/page.tpl.php =================================================================== RCS file: /cvs/drupal/drupal/themes/bluemarine/page.tpl.php,v retrieving revision 1.19 diff -u -F^f -r1.19 page.tpl.php --- themes/bluemarine/page.tpl.php 23 Aug 2006 05:55:38 -0000 1.19 +++ themes/bluemarine/page.tpl.php 24 Aug 2006 06:44:38 -0000 @@ -19,8 +19,8 @@
    -
    -
    + 'links', 'id' => 'subnavlist')) ?> + 'links', 'id' => 'navlist')) ?> Index: themes/bluemarine/style.css =================================================================== RCS file: /cvs/drupal/drupal/themes/bluemarine/style.css,v retrieving revision 1.14 diff -u -F^f -r1.14 style.css --- themes/bluemarine/style.css 23 May 2006 02:11:17 -0000 1.14 +++ themes/bluemarine/style.css 24 Aug 2006 06:44:38 -0000 @@ -94,24 +94,30 @@ fieldset { text-align: right; vertical-align: middle; } -#primary { +#navlist { font-size: 1.0em; - padding: 0em 0.8em 0.5em 0; + padding: 0 0.8em 1.2em 0; color: #9cf; } -#primary a { +#navlist a { font-weight: bold; color: #fff; } -#secondary { - padding: 0 1em 0.5em 0; +#subnavlist { + padding: 0.5em 1.2em 0.4em 0; font-size: 0.8em; color: #9cf; } -#secondary a { +#subnavlist a { font-weight: bold; color: #9cf; } +ul.links li { + border-left: 1px solid #9cf; +} +ul.links li.first { + border: none; +} #search .form-text, #search .form-submit { border: 1px solid #369; font-size: 1.1em; Index: themes/chameleon/chameleon.theme =================================================================== RCS file: /cvs/drupal/drupal/themes/chameleon/chameleon.theme,v retrieving revision 1.50 diff -u -F^f -r1.50 chameleon.theme --- themes/chameleon/chameleon.theme 23 Aug 2006 18:32:39 -0000 1.50 +++ themes/chameleon/chameleon.theme 24 Aug 2006 06:44:38 -0000 @@ -55,15 +55,15 @@ function chameleon_page($content, $show_ $output .= "\n"; - $primary_links = theme('links', menu_primary_links()); - $secondary_links = theme('links', menu_secondary_links()); + $primary_links = theme('links', menu_primary_links(), array('class' => 'links', 'id' => 'navlist')); + $secondary_links = theme('links', menu_secondary_links(), array('class' => 'links', 'id' => 'subnavlist')); if (isset($primary_links) || isset($secondary_links)) { $output .= ' \n"; } @@ -150,7 +150,7 @@ function chameleon_node($node, $teaser = $links = array_merge($links, $node->links); } if (count($links)) { - $output .= "
    ". theme('links', $links) ."
    \n"; + $output .= '\n"; } $output .= "\n"; Index: themes/chameleon/common.css =================================================================== RCS file: /cvs/drupal/drupal/themes/chameleon/common.css,v retrieving revision 1.10 diff -u -F^f -r1.10 common.css --- themes/chameleon/common.css 7 Aug 2006 15:04:16 -0000 1.10 +++ themes/chameleon/common.css 24 Aug 2006 06:44:38 -0000 @@ -93,7 +93,7 @@ .content { margin: 0 0 .5em 0; } -.links { +ul.links.inline { font-size: 0.8em; line-height: 1.25em; } Index: themes/chameleon/style.css =================================================================== RCS file: /cvs/drupal/drupal/themes/chameleon/style.css,v retrieving revision 1.3 diff -u -F^f -r1.3 style.css --- themes/chameleon/style.css 2 Sep 2005 19:18:14 -0000 1.3 +++ themes/chameleon/style.css 24 Aug 2006 06:44:38 -0000 @@ -55,6 +55,15 @@ margin-top: -0.1em; font-size: 0.8em; } +#subnavlist { + font-size: 0.8em; +} +ul.links li { + border-left: 1px solid #000; +} +ul.links li.first { + border-left: none; +} .node .title { font-size: 1.2em; } @@ -68,10 +77,10 @@ .node .title a:hover { text-decoration: underline; } -.links { +div.links { margin: 1em 0 3em 0; text-align: right; - } +} .comment .content, .block .content, .menu { font-size: 0.9em; } Index: themes/chameleon/marvin/style.css =================================================================== RCS file: /cvs/drupal/drupal/themes/chameleon/marvin/style.css,v retrieving revision 1.3 diff -u -F^f -r1.3 style.css --- themes/chameleon/marvin/style.css 23 May 2006 02:11:17 -0000 1.3 +++ themes/chameleon/marvin/style.css 24 Aug 2006 06:44:38 -0000 @@ -45,6 +45,15 @@ #header .title { padding-top: .75em; } +#subnavlist { + font-size: 0.8em; +} +ul.links li { + border-left: 1px solid #888; +} +ul.links li.first { + border: none; +} /* ** Common declarations for child classes of node, comment, block, box etc @@ -65,7 +74,7 @@ padding-left: 1em; } .node .links { - padding: 1em; + padding: 1em 0 1em 0.2em; } .comment { border: solid 1px #777; Index: themes/engines/phptemplate/phptemplate.engine =================================================================== RCS file: /cvs/drupal/drupal/themes/engines/phptemplate/phptemplate.engine,v retrieving revision 1.46 diff -u -F^f -r1.46 phptemplate.engine --- themes/engines/phptemplate/phptemplate.engine 23 Aug 2006 18:32:39 -0000 1.46 +++ themes/engines/phptemplate/phptemplate.engine 24 Aug 2006 06:44:38 -0000 @@ -269,14 +269,14 @@ function phptemplate_node($node, $teaser $variables = array( 'content' => ($teaser && $node->teaser) ? $node->teaser : $node->body, 'date' => format_date($node->created), - 'links' => $node->links ? theme('links', $node->links) : '', + 'links' => $node->links ? theme('links', $node->links, array('class' => 'links inline')) : '', 'name' => theme('username', $node), 'node' => $node, // we pass the actual node to allow more customization 'node_url' => url('node/'. $node->nid), 'page' => $page, 'taxonomy' => $taxonomy, 'teaser' => $teaser, - 'terms' => theme('links', $taxonomy), + 'terms' => theme('links', $taxonomy, array('class' => 'links inline')), 'title' => check_plain($node->title) ); Index: themes/pushbutton/page.tpl.php =================================================================== RCS file: /cvs/drupal/drupal/themes/pushbutton/page.tpl.php,v retrieving revision 1.15 diff -u -F^f -r1.15 page.tpl.php --- themes/pushbutton/page.tpl.php 23 Aug 2006 05:55:38 -0000 1.15 +++ themes/pushbutton/page.tpl.php 24 Aug 2006 06:44:38 -0000 @@ -29,7 +29,7 @@ - + 'links', 'id' => 'navlist')) ?> @@ -37,7 +37,7 @@ Index: themes/pushbutton/style.css =================================================================== RCS file: /cvs/drupal/drupal/themes/pushbutton/style.css,v retrieving revision 1.17 diff -u -F^f -r1.17 style.css --- themes/pushbutton/style.css 23 May 2006 02:11:17 -0000 1.17 +++ themes/pushbutton/style.css 24 Aug 2006 06:44:39 -0000 @@ -125,6 +125,18 @@ fieldset { #secondary-menu .secondary-links { font-size: 0.85em; } +ul.links li { + border-left: 1px solid #ff8c00; +} +#navlist li { + border-left: 1px solid #369; +} +#subnavlist li, ul.primary-links li, ul.secondary-links li { + border-left: 1px solid #fff; +} +#navlist li.first, #subnavlist li.first, ul.links li.first { + border: none; +} .tabs { margin: 15px 0; } @@ -362,11 +374,8 @@ fieldset { color: #999; font-size: 0.79em; } -.links { +div.links { color: #ff8c00; - font-size: 0.8em; - padding: 0; - margin: 0; } .links a { font-weight: bold; @@ -436,10 +445,10 @@ fieldset { float: right; margin: 10px; } -.links { +div.links { font-size: 0.75em; } -.links .prev, .links .next, .links .up { +div.links .prev, div.links .next, div.links .up { font-size: 1.15em; } .titles .prev, .titles .next {
    @@ -99,14 +99,10 @@
    - + 'links primary-links')) ?> - + 'links secondary-links',)) ?>