mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-01 15:09:33 +08:00
WIP
This commit is contained in:
@@ -65,6 +65,8 @@ use Filament\View\PanelsRenderHook;
|
||||
- `PanelsRenderHook::HEAD_START` - After `<head>`
|
||||
- `PanelsRenderHook::LAYOUT_END` - End of the layout container, also [can be scoped](#scoping-render-hooks) to the page class
|
||||
- `PanelsRenderHook::LAYOUT_START` - Start of the layout container, also [can be scoped](#scoping-render-hooks) to the page class
|
||||
- `PanelsRenderHook::LOGO_AFTER` - After the logo in the topbar or sidebar
|
||||
- `PanelsRenderHook::LOGO_BEFORE` - Before the logo in the topbar or sidebar
|
||||
- `PanelsRenderHook::PAGE_END` - End of the page content container, also [can be scoped](#scoping-render-hooks) to the page or resource class
|
||||
- `PanelsRenderHook::PAGE_FOOTER_WIDGETS_AFTER` - After the page footer widgets, also [can be scoped](#scoping-render-hooks) to the page or resource class
|
||||
- `PanelsRenderHook::PAGE_FOOTER_WIDGETS_BEFORE` - Before the page footer widgets, also [can be scoped](#scoping-render-hooks) to the page or resource class
|
||||
|
||||
@@ -21,13 +21,17 @@
|
||||
<header
|
||||
class="fi-sidebar-header"
|
||||
>
|
||||
@if ($homeUrl = filament()->getHomeUrl())
|
||||
{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::LOGO_BEFORE) }}
|
||||
|
||||
@if ($homeUrl = filament()->getHomeUrl())
|
||||
<a {{ \Filament\Support\generate_href_html($homeUrl) }}>
|
||||
<x-filament-panels::logo />
|
||||
</a>
|
||||
@else
|
||||
<x-filament-panels::logo />
|
||||
@endif
|
||||
|
||||
{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::LOGO_AFTER) }}
|
||||
</header>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -72,7 +72,9 @@
|
||||
class="fi-topbar-close-collapse-sidebar-btn"
|
||||
/>
|
||||
@endif
|
||||
|
||||
|
||||
{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::LOGO_BEFORE) }}
|
||||
|
||||
@if ($homeUrl = filament()->getHomeUrl())
|
||||
<a {{ \Filament\Support\generate_href_html($homeUrl) }}>
|
||||
<x-filament-panels::logo />
|
||||
@@ -80,6 +82,8 @@
|
||||
@else
|
||||
<x-filament-panels::logo />
|
||||
@endif
|
||||
|
||||
{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::LOGO_AFTER) }}
|
||||
</div>
|
||||
|
||||
@if ($hasTopNavigation || (! $hasNavigation))
|
||||
|
||||
@@ -49,6 +49,10 @@ class PanelsRenderHook
|
||||
const LAYOUT_END = 'panels::layout.end';
|
||||
|
||||
const LAYOUT_START = 'panels::layout.start';
|
||||
|
||||
const LOGO_BEFORE = 'panels::logo.before';
|
||||
|
||||
const LOGO_AFTER = 'panels::logo.after';
|
||||
|
||||
const PAGE_END = 'panels::page.end';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user