You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The control panel automatically adapts to these branding settings, giving your admin area a custom look that matches your site's identity.
103
+
116
104
### Adding Custom Resources
117
105
118
106
You can extend the control panel with your own resources:
@@ -145,6 +133,56 @@ You can add custom pages to the control panel:
145
133
],
146
134
```
147
135
136
+
### Control Panel Appearance
137
+
138
+
You can fully customize the control panel's theme by overriding the default CmsPanelProvider. This allows you to change colors, fonts, and other visual elements to match your brand.
139
+
140
+
#### Creating a Custom Panel Provider
141
+
142
+
First, create a custom provider class that extends the base CmsPanelProvider:
143
+
144
+
```php
145
+
<?php
146
+
147
+
namespace App\Providers;
148
+
149
+
use SolutionForest\InspireCms\CmsPanelProvider;
150
+
use Filament\Panel;
151
+
152
+
class CustomCmsPanelProvider extends CmsPanelProvider
153
+
{
154
+
protected function configureCmsPanel(Panel $panel)
155
+
{
156
+
return parent::configureCmsPanel($panel)
157
+
->colors([
158
+
'primary' => '#6366f1',
159
+
'secondary' => '#8b5cf6',
160
+
'success' => '#10b981',
161
+
'info' => '#06b6d4',
162
+
'warning' => '#fbbf24',
163
+
'danger' => '#f43f5e',
164
+
'gray' => '#71717a',
165
+
])
166
+
->font('Poppins');
167
+
}
168
+
}
169
+
```
170
+
171
+
#### Registering Your Custom Provider
172
+
173
+
Next, register your custom provider in `bootstrap/providers.php`:
174
+
175
+
```php
176
+
<?php
177
+
178
+
return [
179
+
App\Providers\CustomCmsPanelProvider::class,
180
+
// Other providers...
181
+
];
182
+
```
183
+
184
+
For more advanced theme customization options, refer to the [Filament Panels documentation](https://filamentphp.com/docs/3.x/panels/themes).
185
+
148
186
## Widgets
149
187
150
188
InspireCMS comes with several dashboard widgets:
@@ -157,22 +195,36 @@ InspireCMS comes with several dashboard widgets:
157
195
158
196
### Adding Custom Widgets
159
197
160
-
Add custom widgets to extend dashboard functionality:
198
+
You can add custom widgets by extending your custom panel provider:
161
199
162
200
```php
163
-
// config/inspirecms.php
164
-
'filament' => [
165
-
// Other settings...
166
-
'widgets' => [
167
-
// Default widgets
168
-
Widgets\CmsInfoWidget::class,
169
-
Widgets\PageActivity::class,
170
-
// Your custom widget
171
-
App\Filament\Widgets\AnalyticsWidget::class,
172
-
],
173
-
],
201
+
<?php
202
+
203
+
namespace App\Providers;
204
+
205
+
use SolutionForest\InspireCms\CmsPanelProvider;
206
+
use Filament\Panel;
207
+
use App\Filament\Widgets\AnalyticsWidget;
208
+
use SolutionForest\InspireCms\Filament\Widgets;
209
+
210
+
class CustomCmsPanelProvider extends CmsPanelProvider
211
+
{
212
+
protected function configureCmsPanel(Panel $panel)
213
+
{
214
+
return parent::configureCmsPanel($panel)
215
+
->widgets([
216
+
// Default widgets
217
+
Widgets\CmsInfoWidget::class,
218
+
Widgets\PageActivity::class,
219
+
// Your custom widget
220
+
AnalyticsWidget::class,
221
+
]);
222
+
}
223
+
}
174
224
```
175
225
226
+
Remember to register your custom provider in `bootstrap/providers.php` as shown in the Customizing the Control Panel section.
227
+
176
228
## User Preferences
177
229
178
230
Users can customize their experience through the profile page:
0 commit comments