diff --git a/css/admin-toolbar-tools.css b/css/admin-toolbar-tools.css new file mode 100644 index 0000000000000000000000000000000000000000..720028aafa1f02bf631b01c7f7fe77a2511fc6e8 --- /dev/null +++ b/css/admin-toolbar-tools.css @@ -0,0 +1,10 @@ +.toolbar-icon-admin-toolbar-tools-help:before, +.toolbar-icon-admin-toolbar-tools-help:active:before, +.toolbar-icon-admin-toolbar-tools-help.active:before, +.adminimal-admin-toolbar .toolbar-icon-admin-toolbar-tools-help:before, +.adminimal-admin-toolbar .toolbar-icon-admin-toolbar-tools-help:active:before, +.adminimal-admin-toolbar .toolbar-icon-admin-toolbar-tools-help.is-active:before, +.adminimal-admin-toolbar .toolbar-tray-horizontal .menu-item--expanded:hover .toolbar-icon-admin-toolbar-tools-help:before, +.adminimal-admin-toolbar .toolbar-icon-admin-toolbar-tools-help:hover:before { + background-image: url(../files/images/varbase-x-small-emblem-white.png); +} diff --git a/files/images/varbase-x-small-emblem-white.png b/files/images/varbase-x-small-emblem-white.png new file mode 100644 index 0000000000000000000000000000000000000000..4bfbdb1f887164977232409e6750af65c07b8b1b Binary files /dev/null and b/files/images/varbase-x-small-emblem-white.png differ diff --git a/varbase.libraries.yml b/varbase.libraries.yml new file mode 100644 index 0000000000000000000000000000000000000000..7084d2ed05d06ae4cf535749654fedf7e89542a8 --- /dev/null +++ b/varbase.libraries.yml @@ -0,0 +1,4 @@ +toolbar.icon: + css: + theme: + css/admin-toolbar-tools.css: {} diff --git a/varbase.profile b/varbase.profile index 8094fa0e6574f3ff95f6c3041cea5cc8c53e4544..c86211a3a35e7f3c2ce444716a3972dba8e43bec 100644 --- a/varbase.profile +++ b/varbase.profile @@ -228,3 +228,13 @@ function varbase_hide_warning_and_status_messages($hide) { unset($_SESSION['messages']); } } + +/** + * Implements hook_toolbar_alter(). + */ +function varbase_toolbar_alter(&$items) { + if (\Drupal::currentUser()->hasPermission('access toolbar') + && !empty($items['admin_toolbar_tools'])) { + $items['admin_toolbar_tools']['#attached']['library'][] = 'varbase/toolbar.icon'; + } +}