This documentation is still Work in Progress and thus incomplete. For more accurate examples, please look at already published themes.
Themes allow you to dynamically change the appearance of your panel without affecting any backend programs.
In this example, we will be creating a new client theme called Material
resources/themes/client/tailwind
to resources/themes/client/material
theme.php
here you can specify the new name. Make sure to change the name to Materialapp/Services/Universal/Resources/views/client/tailwind
-> app/Services/Universal/Resources/views/client/material
Modules/Affiliates/Resources/views/client/tailwind
-> Modules/Affiliates/Resources/views/client/material
Please make sure all of the service and module folders are duplicated.
In this example, we will be changing the background color from gray-900 (#111827) to neutral-900 (#171717)
Note: In this example, the custom client theme is called Material
gray: {"50":"#F9FAFB","100":"#F3F4F6","200":"#E5E7EB","300":"#D1D5DB","400":"#9CA3AF","500":"#6B7280","600":"#4B5563","700":"#374151","800":"#1F2937","900":"#111827"},
gray: {"50":"#F9FAFB","100":"#F3F4F6","200":"#E5E7EB","300":"#D1D5DB","400":"#9CA3AF","500":"#6B7280","600":"#4B5563","700":"#374151","800":"#1F2937","900":"#171717"},
You should see the background color change to "#171717" after the reload.
These steps are also true for changing the background colors of the cards, but instead of the value in "900", the value in "800" should be changed:
gray: {"50":"#F9FAFB","100":"#F3F4F6","200":"#E5E7EB","300":"#D1D5DB","400":"#9CA3AF","500":"#6B7280","600":"#4B5563","700":"#374151","800":"#262626","900":"#171717"},
<?php
use App\Facades\Theme;
# You may use this function to return active theme view from Controller
Theme::view($path);
# You may use this function to return details about current active theme
Theme::active();
# You may use this function to retrieve information about a specific theme, if theme does not exists it will display the default theme
Theme::get($theme);
# You may use this function to retrieve view path to a specific theme, additionally you may pass optional variable $path to direct to a specific folder
Theme::getViewPath($theme, $path = NULL);
# You may use this function to retrieve all available themes
Theme::list();
In this example, we will be creating a new admin theme called Material
resources/themes/admin/default
to resources/themes/admin/material
theme.php
here you can specify the new name. Make sure to change the name to Material<?php
# NOTE: In controllers that require both Theme facades, import AdminTheme without as Theme
use App\Facades\AdminTheme as Theme;
# You may use this function to return active theme view from Controller
Theme::view($path);
# You may use this function to return details about current active theme
Theme::active();
# You may use this function to retrieve information about a specific theme, if theme does not exists it will display the default theme
Theme::get($theme);
# You may use this function to retrieve view path to a specific theme, additionally you may pass optional variable $path to direct to a specific folder
Theme::getViewPath($theme, $path = NULL);
# You may use this function to retrieve all available themes
Theme::list();