Add a graduation cap icon to the W&K-Tools navigation group

Uses the Lucide icon in the same size and colours as the core group
icons, with a dark variant, loaded through the backend menu listener.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Jürgen MummertandClaude Fable 5.1 committed 2026-09-26 16:59:33 +02:00
1 parent ee9ef3a848
commit 8835e15f85
4 files changed
+14 -5

No files matched your search

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="none" stroke="#9fa4a8" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><path d="M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z"/><path d="M22 10v6"/><path d="M6 12.5V16a6 3 0 0 0 12 0v-3.5"/></svg>

After

Width:  |  Height:  |  Size: 375 B

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="none" stroke="#6c7174" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><path d="M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z"/><path d="M22 10v6"/><path d="M6 12.5V16a6 3 0 0 0 12 0v-3.5"/></svg>

After

Width:  |  Height:  |  Size: 375 B

+3
View File
@@ -0,0 +1,3 @@
/* Icon der Navigationsgruppe „W&K-Tools“ (Lucide „graduation-cap“, wie die Gruppen-Icons des Contao-Cores) */
#tl_navigation .group-wk_tools { background: url(graduation-cap.svg) 3px 2px no-repeat; }
[data-color-scheme=dark] #tl_navigation .group-wk_tools { background-image: url(graduation-cap--dark.svg); }
@@ -8,13 +8,15 @@ use Contao\CoreBundle\Event\MenuEvent;
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;
/**
* Contao escaped die Modul-Beschreibungen für den Tooltip der Backend-Navigation bereits in
* BackendUser::navigation() (StringUtil::specialchars) und das Menü-Template escaped das
* title-Attribut ein zweites Mal, sodass aus „W&K“ im Tooltip „W&amp;K“ wird. Der Core-Listener
* läuft mit Priorität 10; dieser Listener nimmt die erste Escapierung für die W&K-Module zurück.
* Backend-Navigation der Gruppe „W&K-Tools“: Gruppen-Icon einbinden und die Tooltips korrigieren.
*
* Contao escaped die Modul-Beschreibungen für den Tooltip bereits in BackendUser::navigation()
* (StringUtil::specialchars) und das Menü-Template escaped das title-Attribut ein zweites Mal, sodass
* aus „W&K“ im Tooltip „W&amp;K“ wird. Der Core-Listener läuft mit Priorität 10; dieser Listener nimmt
* die erste Escapierung für die W&K-Module zurück.
*/
#[AsEventListener]
class BackendMenuTitleListener
class BackendMenuListener
{
public function __invoke(MenuEvent $event): void
{
@@ -24,6 +26,8 @@ class BackendMenuTitleListener
return;
}
$GLOBALS['TL_CSS'][] = 'bundles/contaowksync/wk-sync-menu.css|static';
foreach ($group->getChildren() as $item) {
$title = $item->getLinkAttribute('title');