Skip to content

Commit

Permalink
[BootstrapAdminUi] Improve Twig hooks to customize logos (#119)
Browse files Browse the repository at this point in the history
Also created on Sylius/Sylius#17397
  • Loading branch information
loic425 authored Nov 5, 2024
2 parents ea403f0 + 1f40d9c commit b741239
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/BootstrapAdminUi/config/app/twig_hooks/layout/sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
'template' => '@SyliusBootstrapAdminUi/shared/crud/common/sidebar/menu.html.twig',
],
],

'sylius_admin.common.component.sidebar.logo' => [
'image' => [
'template' => '@SyliusBootstrapAdminUi/shared/crud/common/sidebar/logo/image.html.twig',
],
],
],
]);
};
6 changes: 6 additions & 0 deletions src/BootstrapAdminUi/config/app/twig_hooks/security/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
],
],

'sylius_admin.security.login.logo' => [
'image' => [
'template' => '@SyliusBootstrapAdminUi/security/common/logo/image.html.twig',
],
],

'sylius_admin.security.login.content' => [
'header' => [
'template' => '@SyliusBootstrapAdminUi/security/common/content/header.html.twig',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div class="text-center mb-4">
<img src="{{ asset('bundles/syliusbootstrapadminui/images/sylius-logo-dark-text.png') }}" alt="Sylius" class="sylius navbar-brand-image">
{% hook 'logo' %}
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<img src="{{ asset('bundles/syliusbootstrapadminui/images/sylius-logo-dark-text.png') }}" alt="Sylius" class="sylius navbar-brand-image">
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

<h1 class="navbar-brand">
<a href="{{ dashboard_path }}">
<img src="{{ asset('bundles/syliusbootstrapadminui/images/sylius-logo.svg') }}" alt="Sylius" class="navbar-brand-image" />
{% hook 'logo' %}
</a>
</h1>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<img src="{{ asset('bundles/syliusbootstrapadminui/images/sylius-logo.svg') }}" alt="Sylius" class="navbar-brand-image" />

0 comments on commit b741239

Please sign in to comment.