Commit c655cda6 authored by Dries's avatar Dries
Browse files

- Patch #658726 by bleen18: better home link.

parent 775b4561
......@@ -73,6 +73,16 @@ body.toolbar-drawer {
position: relative;
}
#toolbar-home a span {
vertical-align: text-bottom;
width: 15px;
height: 14px;
display: block;
background: url(toolbar.png) no-repeat 0px -61px;
text-indent: -9999px;
margin: 3px 0px;
}
#toolbar-user {
float: right;
}
......
......@@ -197,7 +197,7 @@ function toolbar_build() {
'#heading' => array('text' => t($system_menus['management']), 'level' => 'h2', 'class' => 'element-invisible'),
);
// Add logout & user account links or login link
// Add logout & user account links or login link.
if ($user->uid) {
$links = array(
'account' => array(
......@@ -224,6 +224,20 @@ function toolbar_build() {
'#links' => $links,
'#attributes' => array('id' => 'toolbar-user'),
);
// Add a "home" link.
$link = array(
'home' => array(
'title' => '<span class="home-link">Home</span>',
'href' => '<front>',
'html' => TRUE,
),
);
$build['toolbar_home'] = array(
'#theme' => 'links',
'#links' => $link,
'#attributes' => array('id' => 'toolbar-home'),
);
// Add an anchor to be able to toggle the visibility of the drawer.
$build['toolbar_toggle'] = array(
......@@ -259,6 +273,7 @@ function toolbar_get_menu_tree() {
$admin_link = array_pop($tree);
$tree = $admin_link['below'] ? $admin_link['below'] : array();
}
return $tree;
}
......
modules/toolbar/toolbar.png

590 Bytes | W: | H:

modules/toolbar/toolbar.png

746 Bytes | W: | H:

modules/toolbar/toolbar.png
modules/toolbar/toolbar.png
modules/toolbar/toolbar.png
modules/toolbar/toolbar.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -24,6 +24,7 @@
?>
<div id="toolbar" class="<?php print $classes; ?> clearfix">
<div class="toolbar-menu clearfix">
<?php print render($toolbar['toolbar_home']); ?>
<?php print render($toolbar['toolbar_user']); ?>
<?php print render($toolbar['toolbar_menu']); ?>
<?php if ($toolbar['toolbar_drawer']):?>
......
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