How to customize the Statamic login and control panel
Is it possible to customize the Statamic login page? What about the control panel? Maybe you want to customize everything? Let me show you, how to do so.
Don't get me wrong: I am a big fan of the Design by Jack for Statamic, but there might be cases where you want to customize some views. Maybe using some different colors to better fit the brand colors of your customer.
Customizing Statamic view
Go inside your views directory
and add two more folder, so you will get the following structure
Copy and paste the views you want to customize from the Statamic resources folder and customize them as you like. You will find them here, starting from your application root folder:
In case you can't find a vendor directory inside your application root directory, you may have forgotten to run
It's important to keep the exact file names and structure from the statamic repository.
Customizing the login page
Make a copy of the
login.blade.php inside the auth folder from the Statamic repository. To keep the exact structure, you need to create:
Customize the view and you should see your changes instantly.
Customizing the Control Panel
It's the same as with the login screen. If you like to customize the Control Panel header, find the
global-header.blade.php inside the partials directory and copy the file over.
Why does it work like that?
If we think it about: Technically the Statamic CMS is a Laravel Package and all packages do follow a Laravel convention:
"When you use the loadViewsFrom method, Laravel actually registers two locations for your views: the application's resources/views/vendor directory and the directory you specify." https://laravel.com/docs/7.x/packages#views
Have fun customizing!