I just inadvertently dismissed the AI-generated (suggested) answer! I was working through its suggestions - didn't get to the end - can I get it back?
Filament / Custom Page / No styling
Hi all, I have created a custom page and it lacks any styling. It appears as a navigation item on e.g. my app home page but when I click through, no styling is present.
I followed the steps here to generate a custom theme (as I read somewhere that this mandatory to have styling on custom pages etc.)
https://filamentphp.com/docs/3.x/panels/themes#creating-a-custom-theme
And this is the screen output I get
me@hcatdev:~/code/hcat$ php artisan make:filament-theme
Using npm v9.2.0
<snip>
INFO Filament theme [resources/css/filament/admin/theme.css] and [resources/css/filament/admin/tailwind.config.js] created successfully.
WARN Action is required to complete the theme setup:
⇂ First, add a new item to the `input` array of `vite.config.js`: `resources/css/filament/admin/theme.css`
⇂ Next, register the theme in the admin panel provider using `->viteTheme('resources/css/filament/admin/theme.css')`
⇂ Finally, run `npm run build` to compile the theme
So I modified my vite.config.js from this
export default defineConfig({
plugins: [
laravel({
input: 'resources/js/app.js',
...
...
to this
export default defineConfig({
plugins: [
laravel({
input: [
'resources/js/app.js', // Existing JS file
'resources/css/filament/admin/theme.css', // Add your custom Filament theme
],
...
...
And I modified AdminPanelProvider.php to change this
class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
->default()
...
...
to this
class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
->default()
->viteTheme('resources/css/filament/admin/theme.css')
...
...
I think that's what the instructions were telling me to do - but I still have no styling present (and the blade content doesn't appear within the app as such - just as a a new page all squiggled up in the top left hand corner).
Have I followed the instructions correctly and what should I do to further identify the issue?
many thanks for your help, j
Please or to participate in this conversation.