Skip to content

Commit 3aa816f

Browse files
committed
update docs
1 parent c979496 commit 3aa816f

3 files changed

Lines changed: 110 additions & 61 deletions

File tree

docs/core/ControlPanel.md

Lines changed: 88 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The path can be customized in your configuration if needed:
1414

1515
```php
1616
// config/inspirecms.php
17-
'filament' => [
17+
'admin' => [
1818
'path' => 'admin', // Changes the path from /cms to /admin
1919
// other settings...
2020
],
@@ -86,33 +86,21 @@ The Settings section includes:
8686

8787
### Branding
8888

89-
You can customize the appearance of the control panel in your service provider:
89+
You can customize the appearance of the control panel through the configuration file:
9090

9191
```php
92-
use Filament\Panel;
93-
use SolutionForest\InspireCms\CmsPanelProvider;
94-
95-
class AppServiceProvider extends ServiceProvider
96-
{
97-
public function boot(): void
98-
{
99-
CmsPanelProvider::configureUsing(function (Panel $panel): void {
100-
$panel
101-
->brandName('Your Site Name')
102-
->brandLogo(fn () => view('custom.logo'))
103-
->colors([
104-
'primary' => [
105-
50 => '238, 242, 255',
106-
100 => '224, 231, 255',
107-
// ...other color values
108-
],
109-
])
110-
->font('Poppins');
111-
});
112-
}
113-
}
92+
// config/inspirecms.php
93+
'admin' => [
94+
'brand' => [
95+
'name' => 'Your Site Name',
96+
'logo' => 'path/to/your-logo.svg',
97+
'favicon' => 'path/to/favicon.ico', // Optional
98+
],
99+
],
114100
```
115101

102+
The control panel automatically adapts to these branding settings, giving your admin area a custom look that matches your site's identity.
103+
116104
### Adding Custom Resources
117105

118106
You can extend the control panel with your own resources:
@@ -145,6 +133,56 @@ You can add custom pages to the control panel:
145133
],
146134
```
147135

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+
148186
## Widgets
149187

150188
InspireCMS comes with several dashboard widgets:
@@ -157,22 +195,36 @@ InspireCMS comes with several dashboard widgets:
157195

158196
### Adding Custom Widgets
159197

160-
Add custom widgets to extend dashboard functionality:
198+
You can add custom widgets by extending your custom panel provider:
161199

162200
```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+
}
174224
```
175225

226+
Remember to register your custom provider in `bootstrap/providers.php` as shown in the Customizing the Control Panel section.
227+
176228
## User Preferences
177229

178230
Users can customize their experience through the profile page:

docs/core/DirectoryStructure.md

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,24 @@ InspireCMS follows Laravel's standard directory structure, with additional direc
99
```
1010
project/
1111
├── app/
12-
│ └── Cms/ # Custom CMS extensions
13-
│ ├── Clusters/ # Custom admin panel clusters
14-
│ ├── Pages/ # Custom admin panel pages
15-
│ ├── Resources/ # Custom admin panel resources
16-
│ └── Widgets/ # Custom admin panel widgets
12+
└── Cms/ # Custom CMS extensions
13+
├── Clusters/ # Custom admin panel clusters
14+
├── Pages/ # Custom admin panel pages
15+
├── Resources/ # Custom admin panel resources
16+
└── Widgets/ # Custom admin panel widgets
1717
├── config/
18-
│ └── inspirecms.php # Main CMS configuration file
18+
└── inspirecms.php # Main CMS configuration file
1919
├── database/
20-
│ └── migrations/ # Database migrations (including CMS tables)
20+
└── migrations/ # Database migrations (including CMS tables)
2121
├── resources/
22-
│ ├── views/
23-
│ │ ├── components/
24-
│ │ │ └── inspirecms/ # CMS components and templates
25-
│ │ │ └── {theme}/ # Theme-specific components
26-
│ │ └── inspirecms/ # CMS view overrides
27-
│ │ └── templates/ # Exported templates
28-
│ └── lang/ # Localization files
29-
└── vendor/
30-
└── solution-forest/ # InspireCMS packages
31-
├── inspirecms-core/ # Core CMS functionality
32-
└── inspirecms-support/ # Support libraries
22+
│ ├── views/
23+
│ │ ├── components/
24+
│ │ │ └── inspirecms/ # CMS components and templates
25+
│ │ │ └── {theme}/ # Theme-specific components
26+
│ │ └── inspirecms/ # CMS view overrides
27+
│ │ └── templates/ # Exported templates
28+
│ └── lang/ # Localization files
29+
└── vendor/
3330
```
3431

3532
## Key Directories Explained
@@ -104,6 +101,6 @@ php artisan make:filament-page YourPage --panel=cms
104101

105102
Now that you understand the directory structure, you might want to explore:
106103

107-
* Control Panel overview
108-
* Creating custom fields
109-
* Working with themes
104+
* [Control Panel overview](./ControlPanel.md)
105+
* [Creating custom fields](./CustomFields.md)
106+
* [Working with themes](./Themes.md)

docs/getting-started/Installing.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ php artisan cache:clear
148148
## Next Steps
149149
After installing InspireCMS, you might want to:
150150

151-
* [Configure your settings](../core/)
152-
* [Create document types](../core/)
153-
* [Set up custom fields](../core/)
154-
* [Configure themes](../core/)
151+
* [Configure your settings](./Configuration.md)
152+
* [Create document types](../core/Document.md)
153+
* [Set up custom fields](../core/CustomFields.md)
154+
* [Configure themes](../core/Themes.md)

0 commit comments

Comments
 (0)